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

Improve config #79

Closed
wants to merge 185 commits into from
Closed

Improve config #79

wants to merge 185 commits into from

Conversation

noootch
Copy link
Contributor

@noootch noootch commented Oct 2, 2024

My first contribution : )

I updated the configuration handling. The configuration is now done via json file.
I tried to find all spots where the configuration is used.

This PR includes:

  • new configuration handling
  • testing of the configuration handling
  • some vscode improvements

Sharing vscode configurations and settings

Sharing vscode settings with the suggested extension allows users to create some local settings. Project specific configuration is put in xyz.shared.json, local settings can be added in xyz.local.json. The plugin merges both files to xyz.json which is then used by vscode. This is especially helpful with launch.json.

Pydantic

With pydantic the config is type safe and the data is validated. Also it improves the workflow a lot when you can directly access the config attributes.

drbacke and others added 30 commits February 16, 2024 12:19
2 stufige Optimierung, erst binär, dann mit float
PV Prognose aufsummieren der Strings eingebaut
michaelosthege and others added 14 commits October 3, 2024 17:28
datetime.datetime.now() is incorrectly accessing the datetime class
- Optimized Imports: Removed unused imports and organized them.
- Refactored Code: Introduced split_individual function for clarity.
- Improved Efficiency: Enhanced penalty calculation and streamlined loops.
- Updated Evaluation Logic: Better handling of penalties in evaluate.
- Type Hints added
- fixed seed option added for automated tests
- verbose comment added, default False

Notes:
- isfloat is only used in flask_server.py
- start_hour is not used in this class
@drbacke
Copy link
Collaborator

drbacke commented Oct 5, 2024

Please check the conflicts

drbacke and others added 6 commits October 5, 2024 09:22
deleted comments
flask_server path with os lib
removed comments
fixed Bug in visualize.py (extra data empty)
removed dead cp
Test meant for class_optimize.
Will only work with PR #88 since the old class has no way to use a fixed random seed.
* Add first unit test for heatpump COP calculation

* Translate to english,

add type hints, improve unit tests.

* Run pre-commit

* Apply suggestions from code review

Co-authored-by: Michael Osthege <[email protected]>

* Remove conftest file

---------

Co-authored-by: Michael Osthege <[email protected]>
@drbacke drbacke self-requested a review October 6, 2024 05:31
drbacke and others added 5 commits October 6, 2024 07:39
- configuration via config.json
- validation with pydantic
- test loading config.json
- add example config
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.

8 participants