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

installation: added docker script to auto update dependencies for all Py versions #843

Merged
merged 9 commits into from Sep 15, 2023

Conversation

Nischay-Pro
Copy link
Contributor

Description

This PR adds a new script which automatically builds the docker images for multiple python versions, installs the required dependencies for flexmeasures, and updates the dependency files of the current project folder.

This simplifies the dependency upgrade chore by automating the updates using docker.

To run simply follow the following steps

cd ci
./update-packages.sh

The script will check if docker is installed, running, and controllable without root requirement before building the images.

The script will also automatically clean up the containers, images and builder caches once completed.


  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

Signed-off-by: Nischay Mamidi <NischayPro@gmail.com>
Copy link
Contributor

@Flix6x Flix6x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this! I immediately tested it out on #838 and it works very nicely.

@nhoening this seems to me potentially useful in the context of our release process, too. If you agree, a follow-up ticket could be to amend our release process notes.

ci/update-packages.sh Show resolved Hide resolved
ci/update-packages.sh Outdated Show resolved Hide resolved
ci/update-packages.sh Outdated Show resolved Hide resolved
ci/update-packages.sh Outdated Show resolved Hide resolved
@nhoening
Copy link
Contributor

@Flix6x I agree and created FlexMeasures/tsc#10

Makefile Outdated Show resolved Hide resolved
ci/update-packages.sh Outdated Show resolved Hide resolved
Signed-off-by: Nischay Mamidi <NischayPro@gmail.com>
@Nischay-Pro
Copy link
Contributor Author

Updated the PR to copy only the required files for updating the package versions.

Makefile Outdated Show resolved Hide resolved
@Nischay-Pro
Copy link
Contributor Author

@nhoening @Flix6x I was thinking if it was possible to integrate this into the CI. Each time a new package gets added to the requirement base files execute the update-packages.sh script automatically to update the requirements.txt files. We can specify in the CI yaml to track only changes to requirement base files.

Copy link
Contributor

@Flix6x Flix6x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

I'm not sure about adding it to the ci. @nhoening is more knowledgeable on the matter.

@nhoening
Copy link
Contributor

I decided that we don't need to do that right now. Maybe later.

Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, very good and valuable.

With the testing of all versions in the CI, there is now good support for doing these updates.

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening changed the title installation: added docker script to auto update images installation: added docker script to auto update dependencies for all Py versions Sep 15, 2023
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening merged commit cb5f5ce into main Sep 15, 2023
9 checks passed
@nhoening nhoening deleted the docker-update branch September 15, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants