Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Direct Github dependencies cause issues with locking #127

Open
callumforrester opened this issue Mar 24, 2023 · 0 comments
Open

Direct Github dependencies cause issues with locking #127

callumforrester opened this issue Mar 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@callumforrester
Copy link
Contributor

When I add a dependency such as

"dodal @ git+https://github.com/DiamondLightSource/dodal.git",

to pyproject.toml, it gets locked into requirements.txt as

dodal @ git+https://github.com/DiamondLightSource/dodal.git@6b387f690f7978d2e3f0a4f180dd46b10e2623ba

i.e. the most recent commit hash. The container CI job then fails because it thinks these two are different things i.e.

#12 12.87 ERROR: Cannot install dodal 0.0.2.dev3+g6b387f6 (from git+https://github.com/DiamondLightSource/dodal.git@6b387f690f7978d2e3f0a4f180dd46b10e2623ba) and htss-rig-bluesky==0.1.dev58+g1ace857 because these package versions have conflicting dependencies.

I cannot determine exactly why, the workaround is to exclude the affected package from the lockfile altogether in .github/install_requirements/action.yml, in this case:

    - name: Create lockfile
      run: |
        mkdir -p lockfiles
        pip freeze --exclude-editable --exclude dodal > lockfiles/${{ inputs.requirements_file }}
        # delete the self referencing line and make sure it isn't blank
        sed -i '/file:/d' lockfiles/${{ inputs.requirements_file }}
      shell: bash
@callumforrester callumforrester added the bug Something isn't working label Mar 24, 2023
abbiemery added a commit to DiamondLightSource/blueapi that referenced this issue May 15, 2023
abbiemery added a commit to DiamondLightSource/blueapi that referenced this issue May 15, 2023
* Add dodal git dependency

* Add initial dodal device loading to context

* Allow only dodal style device modules

* Allow list of device and plan sources

* Enable context to search multiple modules for devices and plans

* Update to use dodal function format

* Add checking when adding devices to context

* Update p45 config to use dodal

* Update adsim.yaml to use multiple sources

* Update worker config for multiple sources

* Add module loading tests for context
DiamondLightSource/python3-pip-skeleton#127
* Correct ignore pre-commit comment

* Make module name qualification explicit

* Swap typedict for basemodel in config

* Test device functions with dependencies

* Make source type an enum

* Allocate device and plan adding based on source kind

* Change source type to kind

* Remove unused imports

* Make test context use default environment config

* Update source format

* Update enum case to abide by pep8

* Update dodal dependency format

* Exclude dodal from lockfile

Avoids current skeleton bug, DiamondLightSource/python3-pip-skeleton#127.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant