Skip to content

Conversation

@SebastianManriqueM
Copy link

This PR updates readme.md example of r2x-reeds according to latest api.

Copilot AI review requested due to automatic review settings December 17, 2025 23:35
Copy link

Copilot AI left a 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() with DataStore.from_plugin_config() for simpler initialization
  • Updates ReEDSParser initialization 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)
Copy link

Copilot AI Dec 17, 2025

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.

Suggested change
data_store = DataStore.from_plugin_config(path=run_path, plugin_config=config)
data_store = DataStore.from_plugin_config(config, path=run_path)

Copilot uses AI. Check for mistakes.

# Parse
parser = ReEDSParser(config, store=data_store)
parser = ReEDSParser(system_name="reeds_system", store=data_store, config=config)
Copy link

Copilot AI Dec 17, 2025

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").

Suggested change
parser = ReEDSParser(system_name="reeds_system", store=data_store, config=config)
parser = ReEDSParser(config=config, store=data_store, name="reeds_system")

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.45%. Comparing base (71a12a3) to head (770c554).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants