rcpch / digital-growth-charts-server

RCPCH's open source Digital Growth Chart API
https://growth.rcpch.ac.uk/
GNU Affero General Public License v3.0
16 stars 11 forks source link

Automatic Package Versioning #164

Closed eatyourpeas closed 3 years ago

eatyourpeas commented 3 years ago

Now that we have extracted RCPCHGrowth out into its own repository and published it to PyPi, it has become a dependency for the server and the CLI. Each time the RCPCHGrowth package version updates, we need a way automatically to update where it is a dependency

pacharanero commented 3 years ago

OK so the pseudocode solution for this would be:

WHEN (new version of rcpchgrowth-python) GET (version identifier) UPDATE (version identifier) in server (requirements.txt) UPDATE (version identifier) in cli (requirements.txt)

however, I'd be nervous about doing this in an automated way unless there was a lot more testing of both CLI and server, so that we could do all this updating in a feature branch, update, test, then merge if passing.

Agreed that it's going to be a headache to do manually though.

eatyourpeas commented 3 years ago

This would then trigger a deploy action also of the server and the CLI.

eatyourpeas commented 3 years ago

Just to add we have the same issue with the charting package and NPM.

pacharanero commented 3 years ago

We can use PyPi API to get data about new versions of the python package https://warehouse.readthedocs.io/api-reference/json.html#project

a-wei-william commented 3 years ago

@pacharanero does this issue still need solving? if so i will do it

pacharanero commented 3 years ago

@a-wei-0513 yes this is not yet resolved so if you have an approach that you think would work then we'd be happy to discuss. Probably need to outline how you would propose to solve it first. It is likely to require some kind of GitHub Actions hook in the Python package, to trigger the Server update.

eatyourpeas commented 3 years ago

Although not solved totally, this is in hand on the rcpchgrowth-python repo. In short, on creation of a new release, the action publishes to pypi and then triggers a rebuild of the server