-
Notifications
You must be signed in to change notification settings - Fork 2
Main #31
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?
Main #31
Conversation
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 PR updates the README.md example code to reflect the latest r2x-reeds API changes. The primary change is simplifying how DataStore is created by using the from_plugin_config method instead of the more verbose from_json approach with explicit file mapping.
Key changes:
- Replaces
DataStore.from_json()withDataStore.from_plugin_config()for simpler initialization - Updates
ReEDSParserinitialization to use the current parameter naming convention
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| path="path/to/reeds_folder/" | ||
| ) | ||
| run_path = "path/to/reeds_folder/" | ||
| data_store = DataStore.from_plugin_config(path=run_path, plugin_config=config) |
Copilot
AI
Dec 17, 2025
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.
The parameter order for DataStore.from_plugin_config is incorrect. According to the test fixture at tests/conftest.py:78, the correct order should be DataStore.from_plugin_config(config, path=run_path) where the config is the first positional argument.
| data_store = DataStore.from_plugin_config(path=run_path, plugin_config=config) | |
| data_store = DataStore.from_plugin_config(config, path=run_path) |
|
|
||
| # Parse | ||
| parser = ReEDSParser(config, store=data_store) | ||
| parser = ReEDSParser(system_name="reeds_system", store=data_store, config=config) |
Copilot
AI
Dec 17, 2025
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.
The parameter name should be name instead of system_name according to the test fixtures at tests/conftest.py:86 and other test files. The correct initialization is ReEDSParser(config=config, store=data_store, name="reeds_system").
| parser = ReEDSParser(system_name="reeds_system", store=data_store, config=config) | |
| parser = ReEDSParser(config=config, store=data_store, name="reeds_system") |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
=======================================
Coverage 90.45% 90.45%
=======================================
Files 27 27
Lines 2284 2284
=======================================
Hits 2066 2066
Misses 218 218 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR updates readme.md example of r2x-reeds according to latest api.