-
Notifications
You must be signed in to change notification settings - Fork 9
Feature/testing+linting #140
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Remove not needed function * Add comment to docstring * Add parameter use_element_label tp have shorter representation without duplication of information * Add use_element_label = False to all data conversion before saving to JSON
…-path handling is not working. No caching as time savings are minimal (<10sec, if cache is found, while 2min for inital caching)
Using ruff format on the whole codebase
This reverts commit a3a12d6.
This reverts commit e8937b7.
…ixOpt" and Parameters with NOT lowercase names in linear_converters.py ( ".COP", ".Q_th", ...)
This was referenced Jan 20, 2025
Closed
…+linting # Conflicts: # examples/02_Complex/complex_example.py # flixOpt/calculation.py # flixOpt/features.py # flixOpt/flow_system.py # flixOpt/structure.py # tests/test_integration.py
Closed
FBumann
added a commit
that referenced
this pull request
Jan 22, 2025
* Feature/simplify datastructure (#136) * Remove not needed function * Add comment to docstring * Add parameter use_element_label tp have shorter representation without duplication of information * Add use_element_label = False to all data conversion before saving to JSON * Add ci-cd to run test automatically. Currently exclude pyvis, as file-path handling is not working. No caching as time savings are minimal (<10sec, if cache is found, while 2min for inital caching) * Add functional tests * Adding InvestmentTests * Adding TestOnOff * Changing some names * Adding on count * Update to new function * Add docstrings to tests * adding pytest and adding if __name__ == '__main__': * Remove change in minimal_example.py (empty line) * Improving test to use new dict based datastructure * Some refinements * Add test for consecutive hours * Running ruff check --fix * Running `ruff check . --fix` with options defined in pyproject.toml * Adopt fx. approach in tests * Bugfix ruff config * Fix some ruff errors * Fix some ruff errors * Removing outdated function (fund with ruff) * Finalizing linting issues * fixing lint error * Add linting to CI-CD Using ruff format on the whole codebase * Lint BEFORE test * Revert "Lint BEFORE test" This reverts commit a3a12d6. * Revert "Add linting to CI-CD" This reverts commit e8937b7. * Lint before test and add formating settings * format the whole codebase * Enforcing naming conventions (except: "flixOpt as fx" module name "flixOpt" and Parameters with NOT lowercase names in linear_converters.py ( ".COP", ".Q_th", ...) * Correct comment * formating * Adjusting test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linting and formating
Using ruff, the whole codebase was linted and formatted running
ruff check .andruff formatLinting was also added to CI-CD. This ensures code quality throughout the project.
Following the Linting rules is easy by running
ruff check . --fixbefore every push.The rules of listing and formatting are specified in
pyproject.toml.ruffwas added to the dev-dependencies