Skip to content
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

fix: rely on JuliaSyntax's tokenize instead of regex-based splitting of strings during conversion to expr #36

Merged
merged 6 commits into from
Nov 27, 2024

Conversation

sstroemer
Copy link
Member

Fixes #35

This attempts to (sustainably) fix the error that occurred due to the regex-based splitting of strings during "to expression" conversion. It now properly tokenizes strings. However, that also revealed that column names like 08_pv@data are ambigous, since that would be valid Julia syntax for 8 * _pv@data. If this is detected the model building is aborted (since we don't know what a user actually means).

The MWE from #35 is now included as test case, and a base set of reasonable unit tests has been added.


This pull request includes updates to various example configuration files to ensure compatibility with version 2.0.3 of the core library. Additionally, it updates the references to data columns in several examples to reflect new naming conventions.

Data column reference updates:

  • Updated availability_factor and value references in src/assets/examples/07_csv_filestorage.iesopt.yaml to use the new naming convention. [1] [2]
  • Updated availability_factor and value references in src/assets/examples/08_basic_investment.iesopt.yaml to use the new naming convention. [1] [2]
  • Updated availability_factor and value references in src/assets/examples/10_basic_load_shedding.iesopt.yaml to use the new naming convention. [1] [2]
  • Updated conversion and value references in src/assets/examples/15_varying_efficiency.iesopt.yaml to use the new naming convention. [1] [2]
  • Updated capacity reference in src/assets/examples/17_varying_connection_capacity.iesopt.yaml to use the new naming convention.

@sstroemer
Copy link
Member Author

CI runs are manually started here: https://github.com/sstroemer/IESopt.jl/actions/runs/12058593193

@sstroemer
Copy link
Member Author

80f7605 fixes a spelling mistake (not checked again in CI; not sure why my pre-commit did not catch that locally)

@sstroemer
Copy link
Member Author

This already includes a full bump to v2.0.3, which we then need to replicate over at iesopt.

@sstroemer sstroemer merged commit 5f57289 into ait-energy:main Nov 27, 2024
2 checks passed
@sstroemer sstroemer deleted the fix-issue-35 branch November 27, 2024 21:42
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.

Parser fails with multi-term-expression containing scientific notation in v2
1 participant