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

Support flag option for OFT blocks #171

Merged
merged 6 commits into from
Aug 19, 2024
Merged

Support flag option for OFT blocks #171

merged 6 commits into from
Aug 19, 2024

Conversation

keurfonluu
Copy link
Owner

@keurfonluu keurfonluu commented Aug 19, 2024

  • Fixed: removal of duplicate connection outputs.
  • Added: support for option flag in FOFT, COFT, and GOFT.

Reminders:

  • Run invoke format to make sure the code follows the style guide,
  • Add tests for new features or tests that would have caught the bug that you're fixing,
  • Write detailed docstrings for all functions, classes and/or methods,
  • If adding new functionality, unit test it and add it to the documentation.

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.24%. Comparing base (636014e) to head (321e9b1).
Report is 24 commits behind head on master.

Files Patch % Lines
toughio/_io/output/_common.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #171      +/-   ##
==========================================
+ Coverage   90.20%   90.24%   +0.03%     
==========================================
  Files          97       97              
  Lines        6433     6437       +4     
==========================================
+ Hits         5803     5809       +6     
+ Misses        630      628       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@geowomen
Copy link

Thanks, man! I hope there will be a Python script as an example to showcase all these new features.

@keurfonluu keurfonluu merged commit 589f304 into master Aug 19, 2024
8 of 9 checks passed
@keurfonluu
Copy link
Owner Author

Thanks, man! I hope there will be a Python script as an example to showcase all these new features.

Basically, it used to be, for instance for "element_history" (FOFT):

parameters["element_history"] = [
    "AAA00",
    "AAA01",
    "AAA02",
]

Now, you can define it as a list of dictionary, so:

parameters["element_history"] = [
    {"label": "AAA00", "flag": -1},
    {"label": "AAA01", "flag": -1},
    {"label": "AAA02", "flag": -1},
]

Same for "connection_history" (COFT) and "generator_history" (GOFT).

Note that the old way is still valid (i.e., list of labels).

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