-
Notifications
You must be signed in to change notification settings - Fork 3
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
Expose configuring input CSV file formatting options #53
Conversation
…ents, delim, sep)
…nd report warnings/errors in CSV.jl
…"private" convention), since that is now in use for CSV format configs; minor fix to config usage in functions
This is the first time we add an "experimental" feature to the YAML spec. This now starts with "_" (which we could re-use in the future), and we settled on potentially changing/discontinuing such "private" features of the YAML without the need for a major version bump. |
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #53 +/- ##
==========================================
+ Coverage 49.57% 50.20% +0.63%
==========================================
Files 109 109
Lines 4303 4322 +19
==========================================
+ Hits 2133 2170 +37
+ Misses 2170 2152 -18
|
This was initially triggered by ait-energy/iesopt#27 |
We need to create a new |
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.
Looks good! :)
As discussed internally on 17.01.2025.
The most common two use cases might be:
Auto-summary below.
This pull request introduces several changes related to CSV file handling and configuration in the project. The key updates include the addition of a new example configuration file, modifications to the file parsing logic, and updates to the CSV reading function to support custom delimiters and decimal separators.
CSV Configuration Enhancements:
49_csv_formats.iesopt.yaml
to demonstrate different CSV formats and configurations._prepare_config_files!
function insrc/config/sections/files.jl
to handle_csv_config
settings and issue warnings for file names starting with an underscore.File Parsing and Preloading:
_parse_model!
and_parse_global_addons
functions insrc/parser.jl
to exclude files starting with an underscore from preloading and to streamline file parsing logic. [1] [2]CSV Reading Function:
_getcsv
function insrc/utils/general.jl
to utilize the_csv_config
settings for comment characters, delimiters, and decimal separators. Added error logging for CSV reading issues. [1] [2]Testing:
test/src/examples.jl
to validate the new CSV format configurations and ensure proper functionality.