refactor: migrate from tox/PyScaffold to uv for dependency management, consolidating all dependencies into pyproject.toml and a single uv.lock file.#177
Conversation
…, consolidating all dependencies into pyproject.toml and a single uv.lock file. This simplifies and speeds up the development setup greatly. Changes: - Switch build backend from setuptools to hatchling - Remove setup.cfg, tox.ini, .isort.cfg and setup.py in favour of .flake8 and pyproject.toml - Add Poethepoet tasks - Upgrade main Python version (CI/CD, .python-version, etc.) to 3.12 - Deprecate Python 3.9 - Add .python-version for consistent Python version management - Create separate Dockerfile for flexmeasures-client - Replace pip-tools with uv in all CI/CD workflows - Remove ci/run_mypy.sh in favour of Poethepoet task - Update documentation Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
|
Checkpoint: UV/GH actions/pre-commit changes are now in sync with FlexMeasures/flexmeasures#1973 |
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
|
TODO: update docs |
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/FlexMeasures/flexmeasures-client" | ||
| Documentation = "https://flexmeasures-client.readthedocs.io/" |
There was a problem hiding this comment.
@nhoening @TeaDrinkingProgrammer would you recommend we start a separate RTD project for the FlexMeasures Client?
There was a problem hiding this comment.
Not what I had high in my priority list.
Of course it might deserve it.
- Usage examples
- HEMS example
- S2 section
There was a problem hiding this comment.
Then I suggest we link the "Documentation" to https://github.com/FlexMeasures/flexmeasures-client for now.
…hods for JSON serialization. Use environment variables for server script. Use variable pricing in server script. Delete redundant demo_setup.py. Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
…x miscellaneous docker compose issues Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
…up. Remove docs about deprecated demo file. Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
|
Update: I updated all the docs to reflect the new setup and fixed some issues that arose due to the dockerfile now being separate from the flexmeasures repo. I just noticed that @Flix6x also pushed some fixes for the CEM use-case, so we'll have to see how that can be consolidated. Feel free to remove part/all of the fixes in favour of that version, whatever works best. |
|
Let me know if I can help to move this forward |
Flix6x
left a comment
There was a problem hiding this comment.
I'm finding little time to test, sorry. It's a large PR. Halfway through my review. Two questions so far.
There was a problem hiding this comment.
Why did you add a Dockerfile?
There was a problem hiding this comment.
I added that in order for the flexmeasures-client repo to be independend from the flexmeasures repo, could revert that though
| docker compose \ | ||
| -f docker-compose.yml \ | ||
| -f ../flexmeasures-client/docker-compose.yml \ | ||
| up |
There was a problem hiding this comment.
Does the CEM not still rely on a local server?
There was a problem hiding this comment.
It does, but you can start it separately, using any method you like. It could also be an existing online server, a stand-alone docker compose file etc.
No worries, thank you for putting in the time |
This simplifies and speeds up the development setup greatly.
Changes:
Probably best to keep this in draft until the FlexMeasures PR is merged so we can take learnings from that.