FZJ-INM1-BDA / siibra-api

Apache License 2.0
4 stars 3 forks source link

Clean solution for using different versions of dependencies #37

Closed marcenko closed 2 years ago

marcenko commented 3 years ago

Siibra-api has some external dependencies, that can exist in different states.

  1. Siibra-python: While developing new versions of siibra-api it makes sense to use the current develop version of siibra-python. The Production version should rather use a released version from pypi.org

  2. Siibra-configuration and datafeatures: Since this is directly connected to siibra-python it has to be ensured, that the matching version/branch is used.

xgui3783 commented 3 years ago

Re config, should already be possible with env var SIIBRA_CONFIG_GITLAB_PROJECT_TAG (https://github.com/FZJ-INM1-BDA/siibra-python/blob/develop/siibra/config.py#L26)

marcenko commented 3 years ago

At the moment I set SIIBRA_CONFIG_GITLAB_PROJECT_TAG="develop" hardcoded in the Dockerfile. I thought about having it more conditional, depending wether the docker image is build for develop or production.

The problem was also selecting an experimental version of a parcellation while the env var was not set in siibra-api. I guess this should also be dependet on SIIBRA_CONFIG_GITLAB_PROJECT_TAG.

So it's not an urgent feature but I didn't want to forget about it 😄

xgui3783 commented 3 years ago

Hmm, I believe the envar can be set at deploy time, rather than at build time.

marcenko commented 3 years ago

This could also be an option. I put it in the Dockerfile because there is already a condition what siibra-python version to install.

xgui3783 commented 2 years ago

is this still an issue?

For prod/staging, we pin req in requirements/prod.txt, and for dev, it targets main brainch of siibra-python and main branch of siibra-config