Releases: NatLabRockies/gdx-pandas
Releases · NatLabRockies/gdx-pandas
Version 4.0.0
- BREAKING: GAMS EPS is now encoded as numpy.finfo(float).tiny (~2.22e-308), not numpy.finfo(float).eps (machine epsilon, ~2.22e-16). EPS detection is exact equality on the sentinel, so a legitimate small float (e.g. 1e-200) now round-trips as itself instead of silently mapping to GAMS EPS on write (closes #39). If you wrote numpy.finfo(float).eps to mean GAMS EPS, switch to numpy.finfo(float).tiny; gdxpds.special.NUMPY_SPECIAL_VALUES[-1] is always the canonical sentinel.
Version 3.1.0
- Large read/write perf and memory wins on both engines. On a 5M-row synthetic Parameter: gdxcc write peak drops ~358 MB → ~129 MB, gdxcc read drops ~2.4 GB → ~1.5 GB. (Closes #113 and #65. Requires Pandas >=3.0.0 to realize full performance gain.)
- Closes #75: Set reorder under UEL collisions is a GDX file-format semantic, not a gdxpds bug. Documented in overview.md with a workaround and pinned by tests/test_set_ordering.py.
- Closes #106: non-Set/Alias strict-domain parents now raise DomainError up front instead of silently falling back to a relaxed write.
- overview.md "Subset (Domain) Relationships" renamed to "Domain Relationships"; the docs now spell out that any symbol type can carry a strict domain over a Set or Alias-of-Set.
- Dropped the deprecated pd.option_context("future.no_silent_downcasting") wrapper in convert_gdx_to_np_svs; silences a Pandas4Warning.
Version 3.0.0
- BREAKING: the default I/O engine is now gams.transfer when it is usable, falling back to gdxcc otherwise; pass engine="gdxcc" (or set GDXPDS_ENGINE) to pin the gdxcc engine
- BREAKING: a Set or Alias value column is now always the GAMS element text (a string; "" for a member with no text), and membership is conveyed by row presence. The load_set_text argument is removed: text is always read, and any non-empty text is always written
- aliases are now fully supported: they read with a populated GdxSymbol.alias_of (the parent Set), round-trip through both engines, and can be created via to_gdx(aliases={alias: parent}) or gdxpds.gdx.append_alias()
- BREAKING: GDX UNDEF (Python None) is now preserved on write by both engines, round-tripping as None (previously it collapsed to 0.0)
- BREAKING: removed GdxFile.H; reach the raw gdxcc handle, if needed, via gdx_file._engine_impl.handle
- import gdxpds no longer requires a GAMS binding to be installed; the bindings load on the first GDX operation, so gdxpds info / gdxpds test can diagnose a no-bindings environment
- new TransferError for gams.transfer I/O failures (a subclass of gdxpds.tools.Error, parallel to GdxError)
Version 2.1.0
- gams.transfer I/O engine for reading and writing GDX, opt-in and non-breaking; select it with the backend= keyword, the GDXPDS_BACKEND environment variable, or the --backend CLI flag. gdxcc stays the default, and the two engines produce identical DataFrames and GDX files
- gams.transfer is much faster on large files (order-of-magnitude on hundreds-of-MB GDX) but slower on very small ones; it is usable only with a compatible gamsapi installed (check gdxpds.HAVE_GAMS_TRANSFER)
- gdxpds info reports the resolved backend and gams.transfer usability
- to_dataframes() gains a symbols= argument to read only the named symbols
- New SymbolNotFoundError, raised for an unknown symbol name (subclass of gdxpds.tools.Error, like BackendError)
Version 2.0.0
- BREAKING: to_dataframe() now always returns a plain DataFrame; the old_interface argument is removed. Migrate by dropping any old_interface=False from calls (old_interface=True previously returned a {symbol_name: DataFrame} dict)
- BREAKING: removed the deprecated .py-suffixed commands csv_to_gdx.py / gdx_to_csv.py; use csv_to_gdx / gdx_to_csv
- Removed the optional gdx2py read accelerator (not an API change); Parameter reads now use the standard gdxDataReadStr path
Last non-breaking release: https://github.com/NatLabRockies/gdx-pandas/releases/tag/v1.6.0
Version 1.6.0
- Ship PEP 561 type information with a py.typed marker and type annotations on the public API
- Add developer tooling: ruff (lint + format), pyright, and pre-commit hooks, enforced by a new GAMS-free lint CI job
- Deprecate to_dataframe()'s old_interface argument; pass old_interface=False to get a plain DataFrame. The dict-returning default is deprecated and old_interface will be removed in v2.0.0
Version 1.5.0
- Support modern
gamsapibindings (gams.core.gdx); the standalonegdxccpackage moves to a[legacy]extra - Require Python >= 3.11, pandas >= 2.2, numpy >= 2.0
- New
get_subset_relationships()reads Set subset (domain) relationships, andto_gdx()gains adomains=argument to record them on write - The
GdxFilereturned byto_gdx()is now safe to reuse (previously a Windows crash / double-free) - Invalid GAMS directories raise
gdxpds.tools.Errorinstead of crashing Python, and GDX handle teardown no longer segfaults or double-frees - New CLI commands
gdxpds test,gdxpds info, andgdxpds --version, pluscsv_to_gdx/gdx_to_csv(the old.py-suffixed names are deprecated) - Removed the requirement that
import gdxpdsprecedeimport pandas; GAMS is now bound on the first GDX operation, whosegams_dir=selects the install GamsDirFinderhandles the modernC:\GAMS\<version>\install layout- Packaging modernized:
pyproject.tomland asrclayout (tests no longer ship in the wheel)
Version 1.4.0
- New get_data_types function maps symbol name to gdx.GamsDataType
- New load_set_text kwarg in gdx.GdxSymbol.load, to_dataframe, and to_dataframes lets users retrieve GamsDataType.Set Text fields instead of c_bool
Version 1.3.0
- Performance improvements (faster read and write)
- GAMS directory finder improvements
- Documentation improvements
- Skip over individual GdxSymbols that fail to load
- Drop support for Python versions < 3.7
- Various minor improvements and bug fixes
Version 1.2.0
- search for GAMS in more places, especially on Windows
- gdxpds.gdx.GdxSymbol.unload method for user-directed memory managment
- convenience functions gdxpds.gdx.append_set and append_parameter
- special value handling moved to its own module
- clarifying that Python 2.X is not longer supported
- general documentation, pylint, and testing improvements