Releases: glamod/cdm_reader_mapper
v2.2.1
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer)
Bug fixes
cdm_reader_mapper.cdm_mapper: set indexes to input data indexed when setting default values (PR/356).
v2.2.0
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer) and Joseph Siddons (@jtsiddons)
Announcements
This release adds support for Python 3.14 (PR/339).
New features and enhancements
-
new parameter in function
map_model(PR/327).drop_duplicates: If True remove duplicated rows (default: True).drop_missing_obs: If True remove observation rows without a validobservation_value(default: True).
-
new Pub47 testdata (test_data["test_pub47"]) (PR/327)
Breaking changes
cdm_reader_mapper.cdm_mapper: renamemap_and_convertto helper function_map_and_convert(PR/343)- replace
logging.errorwithraiseerror statements (PR/345)
Internal changes
-
rename test data class from test_data to TestData (PR/327)
-
update .gitignore (PR/324)
-
update and add docstrings for multiple functions (PR/324)
-
cdm_reader_mapper.cdm_mapper: update mapping functions for more readability (PR/324) -
cdm_reader_mapper.cdm_mapper: introduce some helper functions (PR/324) -
cdm_reader_mapper.cdm_mapper: splitmap_and_convertinto multiple helper functions (GH/333, PR/343) -
exclude tests/*.py from
pre-commitcodespell hook (PR/345) -
replace many
osfunctions withpathlib.Path(PR/345) -
re-work
mdf_reader(GH/334, PR/345)- remove
reader.MDFFileReaderclass - remove
utils.configuratormodule - remove both
utils.decoderandmdf_reader.utils.convertermodules - introduce
utils.parsermodule: bunch of functions to parse input data into MDF data - introduce
utils.convert_and_decode: make converter and decoder functions more modular - make
utils.validatormodule more modular utils.filereader.FileReaderusesutils.parserfunction for parsing- move many helper function to
utils.utilities - serialize
schemas.schemasmodule
- remove
-
add type hints and docstrings to
mdf_reader(PR/345) -
add unit tests for
mdf_readermodule to testing suite (PR/345)
Bug fixes
v2.1.1
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer), Joseph Siddons (@jtsiddons) and Jan Marius Willruth (@JanWillruth)
New features and enhancements
- add
encodingoptional argument tocdm_reader_mapper.read_mdfandcdm_reader_mapper.read_datawhich overrides default value set by model schema if set (GH/268, PR/273). cdm_reader_mapper.mdf_reader: Added preprocessing function to convert air pressure (PPPP) in IMMT format (PR/287)cdm_reader_mapper.cdm_mapper: Added mapping functions for IMMT datetime, latitude, and longitude conversions (PR/287)cdm_reader_mapper.cdm_mapper: New mapping functiondatetime_imma_d701for icoads_r300_d701 (GH/288, PR/295)cdm_reader_mapper.cdm_mapper: New mapping functiondatetime_imma1_to_utcfor mapping local midday to UTC (GH/288, PR/295)
License and Legal
Updated copyright statements in LICENSE (GH/271, PR/272).
Breaking changes
cdm_reader_mapper: Replace "gcc" with "gdac" (PR/287)cdm_reader_mapper: Update gdac schemas to adhere to IMMT-5 documentation (PR/287)cdm_reader_mapper: combine icoads_r300_d701_type1 and icoads_r300_d701_type1 test and result data to icoads_r300_d701 (GH/288, PR/295)cdm_reader_mapper.cdm_mapper: combine icoads_r300_d701_type1 and icoads_r300_d701_type1 mapping tables to icoads_r300_d701 (GH/288, PR/295)cdm_reader_mapper.read: Allow strings as input for cdm_subset (PR/281)cdm_reader_mapper.cdm_mapper: Remove timestamps and/or previous history information in columnhistory(PR/281)cdm_reader_mapper.DataBundle: Set empty pd.DataFrames as defaults for bothdataandmask(PR/281)cdm_reader_mapper.mdf_reader: read drifter numbers as strings not as integers with C-RAID (PR/281)
Internal changes
tests: create test data result hidden directory (PR/291)- ```cdm_reader_mapper.mdf_reader``: update and tidy-up ICOADS mapping tables (PR/281)
- timezonefinde is pinned below v7.0.0 (PR/281)
Bug fixes
v2.1.0
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer) and Joseph Siddons (@jtsiddons)
New features and enhancements
-
implement both wrapper functions
readandwritethat call the appropriate function based onmodeargument (PR/238):mode== "mdf"; callscdm_reader_mapper.read_mdfmode== "data"; callscdm_reader_mapper.read_dataorcdm_reader_mapper.write_datamode== "tables"; callscdm_reader_mapper.read_tablesorcdm_reader_mapper.write_tables
-
optionally, call
cdm_reader_mapper.read_tableswith either source file or source directory path (PR/238). -
apply attribute to
DataBundle.dataif attribute is nor defined inDataBundle(PR/248). -
apply pandas functions directly to
DataBundle.databy callingDataBundle.<pandas-func>(PR/248). -
make
DataBundlesupport item assignment forDataBundle.data(PR/248). -
optionally, apply selections to
DataBundle.maskinDataBundle.select_*functions (PR/248). -
cdm_reader.reader.read_tables: optionally, set null_label (PR/242) -
new method function:
DataBundle.select_where_all_false(PR/242) -
new method functions:
DataBundle.split_*which split a DataBundle into two new DataBundles containing data selected and rejected after user-defined selection criteria (PR/242)DataBundle.split_by_boolean_trueDataBundle.split_by_boolean_falseDataBundle.split_by_column_entriesDataBundle.split_by_index
-
implement pandas indexer like
ilocfor not chunked data (PR/242)
Internal changes
cdm_reader_mapper.common.select: restructure, simplify and summarize functions (PR/242)- split DataBundle class into main class (
cdm_reader_mapper.core._utilities) and method function class (cdm_reader_mapper.core.databundle) (PR/242)
Breaking changes
-
remove property
tablesfromDataBundleobject. Instead,DataBundle.map_modeloverwrites.DataBundle.data(PR/238). -
set default
overwritevalues fromTruetoFalsethat is consistent with pandasinplaceargument and renameoverwritetoinplace(PR/238, PR/248). -
inplacereturnsNonethat is consistent with pandas (PR/242) -
DataBundlemethod functions return aDataBundleinstead of apandas.DataFrame(PR/248). -
DataBundle.select_*functions write only selected entries toDataBundle.dataand do not take other list entries fromcommon.select_*function returns into account (PR/248). -
select functions do not reset indexes by default (PR/242)
-
rename
DataBundle.select_*functions:DataBundle.select_true->DataBundle.select_where_all_booleanDataBundle.select_from_list->DataBundle.select_where_entry_isinDataBundle.select_from_index->DataBundle.select_where_index_isin
-
rename
cdm_reader_mapper.common.select_*functions and make them returning a tuple of selected and rejected data after user-defined selection criteria (PR/242):select_true->split_by_boolean_trueselect_from_list->split_by_column_entriesselect_from_index->spit_by_index
Bug fixes
cdm_reder_mapper.metmetpy: set deck keys from???tod???in icoads json files which makes values accessible again (PR/238).cdm_reder_mapper.metmetpy: setimma1toicoadsandimmttogccin icoads/gcc json files which makes properties accessible again (PR/238).DataBundle.copyfunction now makes a real deepcopy ofDataBundleobject (PR/248).- correct key index->section for self.df.attrs in open_netcdf (PR/252)
cdm_reader_mapper.map_model: return null_label if conversion fails (PR/242)- keep indexes during duplicate check (PR/242)
v2.0.1
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer) and Joseph Siddons (@jtsiddons)
Announcements
This release drops support for Python 3.9 and adds support for Python 3.13 (PR/228, PR/229)
New features and enhancements
-
add environment.yml file (PR/229)
-
cdm_reader_mapper now separates the optional dependencies into dev and docs recipes (PR/232).
- $ python -m pip install cdm_reader_mapper # Install minimum dependency version
- $ python -m pip install cdm_reader_mapper[dev] # Install optional development dependencies in addition
- $ python -m pip install cdm_reader_mapper[docs] # Install optional dependencies for the documentation in addition
- $ python -m pip install cdm_reader_mapper[all] # Install all the above for complete dependency version
Internal changes
v2.0.0
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer) and Joseph Siddons (@jtsiddons)
New features and enhancements
- New core
DataBundleobject including callablecdm_mapper,metmemtpyandoperationsmethods (#84, #188, #197) - Update readthedocs documentation (#191, #197)
- new function:
write_datato write MDF data and validation mask according towrite_tablesfor writing CDM tables (#201) - new function:
read_datato read MDF data and validation mask according toread_tablesfor reading CDM tables (#201) - new property: DataBundle.encoding (#222)
- add overwrite option to some DataBundel method functions (#224)
Breaking changes
cdm_mapper:map_modelreturns pandas.DataFrame instead of CDM dictionary (#189)cdm_mapper: rename functioncdm_to_asciitowrite_tables(#182, #185)cdm_mapper: update parameter names and list of functionsread_tablesandwrite_tables(#185)- main
cdm_mapper,mdf_readerandduplicatesmodules are directly callable fromcdm_reader_mapper(#188) - new list of imported submodules: [
map_model,cdm_tables,read_tables,write_tables,duplicate_checkandread_mdf] (#188) - removed list of imported submodules: [
cdm_mapper,common,mdf_reader,metmetpy,operations] (#188) - remove imported submodules from
cdm_mapper,mdf_reader(#188) read_tables: returningDataBundleobject (#188)read_tables: resulting dataframe always includes multi-indexed columns (#188)duplicatesis now a direct submodule ofcdm_reader_mapper(#188)- import
readfunction frommdf_reader.readasread_mdf(#188) read_mdf: returningDataBundleobject (#188)read_mdf: remove parameterout_pathto dump attribute information on disk (#201)- move function
open_code_tablefromcommon.json_dicttocdm_mapper.codes.codes(#221) operationstocommon(#224)cdm_mapper: rename table_writer to writer and table_reader to reader (#224)mdf_reader: rename write to writer and read to reader (#224)metmetpy: gather correction functions to correct module and validation functions to validate module (#224)DataBundle: remove properties selected, deselected, tables_dup_flagged and tables_dups_removed (#224)
Internal changes
-
cdm_mapper: dtype conversion fromwrite_tablesto new submodule_conversionsofmap_model(#189) -
cdm_mapper: renamemappingsto_mapping_functions(#189) -
cdm_mapper: mapping functions frommapperto new submodule_mappings(#189) -
cdm_mapper: save utility functions fromtable_reader.pyandtable_writer.pyto_utilities.py(#185) -
reduce complexity of several functions (#25, #200):
mdf_reader.read.readmdf_reader.validate.validatemfd_reader.utils.decoders.signed_overpunchcdm_mapper._mappings._mappingmetmetmpy.station_id.validate.validate
-
split
mdf_reader.utils.auxiliaryintomdf_reader.utils.filereader,mdf_reader.utils.configuratorandmdf_reader.utils.utilities(#25, #200) -
simplify
cdm_mapper.read_tablesfunction (#192) -
mdf_reader: RefactoredConfiguratorclass,Configurator.open_pandasmethod, to handle looping through rows (#208, #210) -
mdf_reader: RefactoredConfiguratorclass,Configurator.open_datamethod, to avoid creating a pre-validation missing_value mask (#216) -
mdf_reader: movevalidatetoutils.validators(#216) -
mdf_reader: no need for multi-column key codes (e.g.("core", "VS")) (#221) -
mdf_reader.utils.validator: simplify functioncode_validation(#221) -
cdm_mapper.codes.common: convert range-key properties to list (#221) -
testing_suite: new chunksize test with icoads_r300_d721 (#222) -
mdf_reader,cdm_nmapper: use model-depending encoding while writing data on disk (#222) -
code restructuring (#224)
-
remove unused functions and methods (#224)
Bug fixes
v1.0.2
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer)
Announcements
-
New PyPi Classifiers:
- Development Status :: 5 - Production/Stable
- Development Status :: Intended Audience :: Science/Research
- License :: OSI Approved :: Apache Software License
- Operating System :: OS Independent
v1.0.1
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer)
Announcements
- set package version to v1.0.1
v1.0.0
Contributors to this version: Ludwig Lierhammer (@ludwiglierhammer)
Announcements
- Final version used for GLAMOD marine processing release 7.0
Bug fixes
cdm_mapper: Two reports that describe each other as best duplicates are not flagged as duplicates (DupDetect) (:pull:149)cdm_mapper: Reindex only if null values available (DupDetect) (:pull:153)
v0.4.3
Contributors to this version: Ludwig Lierhammer (:user:ludwiglierhammer)
Announcements
^^^^^^^^^^^^^
- First release on pypi (:issue:
17) - First release on zenodo (:issue:
18)