-
Notifications
You must be signed in to change notification settings - Fork 8
Release/v1.0.0 #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Release/v1.0.0 #97
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
==========================================
- Coverage 95.56% 91.17% -4.39%
==========================================
Files 49 37 -12
Lines 4328 3422 -906
==========================================
- Hits 4136 3120 -1016
- Misses 192 302 +110 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This is a major version release (v1.0.0) that introduces significant breaking changes to the infrasys library, primarily focusing on time series functionality enhancements, API refactoring, and database schema improvements.
- Adds new deterministic time series support with
DeterministicandDeterministicSingleTimeSeriesclasses - Migrates from
variable_nametonameanduser_attributestofeaturesacross the API - Introduces HDF5 storage backend and migrates from
jsontoorjsonfor performance - Implements database schema migration system for backwards compatibility
Reviewed Changes
Copilot reviewed 46 out of 47 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_time_utils.py | Adds tests for new str_timedelta_to_iso_8601 function |
| tests/test_time_series_metadata_store_migration.py | New test file for database migration functionality |
| tests/test_system.py | Updates API calls from variable_name to name and user_attributes to features |
| tests/test_single_time_series.py | Updates API calls and import order for consistency |
| tests/test_serialization.py | Updates API calls and adds @pytest.mark.xfail for deprecated normalization |
| tests/test_nonsequential_time_series.py | Updates API calls and import order |
| tests/test_in_memory_storage.py | Updates API calls and import order |
| tests/test_h5_storage.py | New test file for HDF5 storage backend |
| tests/test_deterministic_time_series.py | New test file for deterministic time series functionality |
| tests/test_cost_curves.py | Adds startup_fuel_offtake field to FuelCurve |
| tests/test_base_quantity.py | Minor import order fixes |
| tests/test_arrow_storage.py | Updates API calls and import order |
| tests/conftest.py | Updates API calls in test fixtures |
| src/infrasys/utils/time_utils.py | Adds str_timedelta_to_iso_8601 utility function |
| src/infrasys/utils/path_utils.py | Adds clean_tmp_folder utility function |
| src/infrasys/utils/metadata_utils.py | New utility file for metadata handling functions |
| src/infrasys/time_series_storage_base.py | Updates method signatures from connection to context |
| src/infrasys/time_series_models.py | Major refactor adding deterministic time series and API changes |
| src/infrasys/time_series_metadata_store.py | Complete rewrite for new database schema and API |
| src/infrasys/time_series_manager.py | Updates for new API and adds HDF5 support |
| src/infrasys/system.py | Updates for new API and adds migration support |
| src/infrasys/supplemental_attribute_associations.py | Minor index creation fixes |
| src/infrasys/supplemental_attribute.py | Updates serialization metadata handling |
| src/infrasys/serialization.py | Refactors type metadata handling |
| src/infrasys/migrations/metadata_migration.py | New migration system for component metadata |
| src/infrasys/migrations/db_migrations.py | New migration system for database schema |
| src/infrasys/in_memory_time_series_storage.py | Updates for new API |
| src/infrasys/h5_time_series_storage.py | New HDF5 storage backend implementation |
| src/infrasys/cost_curves.py | Adds startup_fuel_offtake field |
| src/infrasys/component.py | Updates serialization metadata handling |
| src/infrasys/chronify_time_series_storage.py | Updates for new API |
| src/infrasys/arrow_storage.py | Updates for new API and adds deterministic time series support |
| src/infrasys/init.py | Adds new exports and version constants |
| scripts/json_performance.py | New performance benchmarking script |
| scripts/conftest.py | Configuration for benchmarking scripts |
| pyproject.toml | Adds new dependencies and dev tools |
| docs/ | Multiple documentation updates for new features |
| .github/workflows/ci.yml | Updates CI to use uv package manager |
Comments suppressed due to low confidence (1)
src/infrasys/migrations/db_migrations.py:1
- Typo in comment: 'tehe' should be 'the'.
import json
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* ci: Adding mypy fix * fix: Adding missing ignore imports directly on the runner * fix: Adding new version of the metadata store according to feedback * fix: Adding display of `timedelta` to the info. * fix: Closing connection for Windows * fixup! fix: Closing connection for Windows * feat: Adding same function to serialize features. * fix: Renaming old functions with user attributes to features. * fix: Removing references for variable name * fix: Updating metadata store to match IS.jl * fix: CI to reflect migration from normalization * fix: Removing stale code
* feat: Add `orjson` as a dependency. * feat: Adding `orjson` as the default json dump load mechanism * ci: Updating CI to UV * docs: Move tutorial to right folder. * fix: Bug where we were saving the features as bytes instead of string. * fix: removing repeated logic
* feat: Adding h5py backend and propagating changes of variable_name -> name * docs: Adding documentation for backends * chore: Cleaning code * fixup! chore: Cleaning code
* feat: Adding new `DeterministicTimeSeries` * feat: Propagating changes of DeterministicTimeSeries to other backends and adding documentation * tests: Improving testing * fixes: #95 (comment) * fix: Changing order to match IS.jl * fix: Addressing #95 (comment) * fix: Addressing: #95 (comment)
* feat: Adding new `DeterministicTimeSeries` * feat: Propagating changes of DeterministicTimeSeries to other backends and adding documentation * tests: Improving testing * fixes: #95 (comment) * fix: Changing order to match IS.jl * fix: Addressing #95 (comment) * fix: Addressing: #95 (comment) * update formatting of initial_timestamp * move initial_timestamp formatting to metadata_utils --------- Co-authored-by: pesap <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 46 out of 48 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
tests/test_system.py:848
- The removal of the
test_time_series_uniqueness_queriesfunction removes important test coverage for time series uniqueness validation and query functionality. This test was validating behavior when multiple time series types are attached to the same component.
assert not system.has_time_series(gen, name=ts_name)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… on `Deterministic` (#109) * refactor: Removing `DeterministicSingleTimeSeries` in favor of a method on `Deterministic` * fix: Added patch for IS.jl compatibility * test: Improving test coverage * fix: Removing unnecesary convertion to pint.
* feat: Adding method to load system from a zip file List of changes: - Implemented a new System.load() method that enables loading systems from zip archives, automatically extracting the archive to a temporary directory, deserializing the system, and cleaning up temporary files while preserving time series storage files in permanent locations. - Added a deserialize() classmethod to all storage backend classes (Arrow, Chronify, HDF5, and InMemory), which abstracts backend-specific deserialization logic and handles the copying of storage files from temporary extraction directories to permanent locations before cleanup. - Refactored TimeSeriesManager.deserialize() to use a delegation pattern with the new TIME_SERIES_REGISTRY dictionary,. - Created TIME_SERIES_REGISTRY as a global dictionary mapping TimeSeriesStorageType enum values to storage backend classes. * test: Adding testing for load system
Fix missing time series after deserialization
This pull request updates documentation and CI workflows to modernize time series terminology, introduce new features, and improve flexibility for time series data storage and testing. The most significant changes are the addition of a comprehensive guide to storage backends, updates to time series terminology, and improvements to the CI/CD pipeline to use
uvfor Python environment management.Documentation Improvements
docs/how_tos/storage_backends.md, detailing all available time series storage backends (In-Memory, Arrow, Chronify, HDF5), how to select and switch between them, configuration options, performance considerations, and benchmarking examples.nameinstead ofvariable_name, and clarified class references (e.g.,{py:class}infrasys.time_series_models.SingleTimeSeries). [1] [2] [3]DeterministicTimeSeries,DeterministicSingleTimeSeries) with usage examples.CI/CD Workflow Modernization
.github/workflows/ci.yml,.github/workflows/gh-pages.yml) to useuvfor Python environment setup and dependency management, replacingsetup-pythonandpip. This streamlines and speeds up dependency installation and test runs. [1] [2] [3]General Documentation Enhancements
These changes collectively improve the usability, clarity, and maintainability of both the documentation and the development workflow.