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

Fix compat tests #584

Merged
merged 15 commits into from Dec 14, 2021
26 changes: 18 additions & 8 deletions .github/workflows/atomistics-compat.yml
Expand Up @@ -23,24 +23,34 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: pyiron_atomistic
run: |
git clone https://github.com/pyiron/pyiron_atomistics ../pyiron_atomistics
grep -v "pyiron_base" ../pyiron_atomistics/.ci_support/environment.yml > environment.yml
tail -n +4 .ci_support/environment.yml >> environment.yml
Copy link
Member

Choose a reason for hiding this comment

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

What happens if we update a dependency in base but not (yet) in atomistics? would this work or throw an error due to twice the same dependency with different versions?

Copy link
Member Author

Choose a reason for hiding this comment

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

To my understanding the last entry for the same package overwrites all previous ones

Copy link
Member Author

Choose a reason for hiding this comment

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

It does not work ... here is an example Binder

Copy link
Member Author

Choose a reason for hiding this comment

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

I wrote a small python script to merge the environments https://github.com/pyiron/pyiron_base/blob/compatfix/.ci_support/condamerge.py

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.10"
mamba-version: "*"
channels: conda-forge
channel-priority: strict
auto-update-conda: true
environment-file: .ci_support/environment.yml
- name: Setup
environment-file: environment.yml
- name: pyironconfig
shell: bash -l {0}
run: |
pip install --no-deps .
cd ..
git clone https://github.com/pyiron/pyiron_atomistics
cd pyiron_atomistics
grep -v "pyiron_base" .ci_support/environment.yml > environment.yml
conda env update --name test --file environment.yml
cd ../pyiron_atomistics
python .ci_support/pyironconfig.py
cd ../pyiron_base
- name: Install pyiron_atomistics
shell: bash -l {0}
run: |
cd ../pyiron_atomistics
pip install --no-deps .
cd ../pyiron_base
- name: Install pyiron_base
shell: bash -l {0}
run: |
pip install --no-deps .
- name: Test
shell: bash -l {0}
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/contrib-compat.yml
Expand Up @@ -20,27 +20,38 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: pyiron_contrib
run: |
git clone https://github.com/pyiron/pyiron_contrib ../pyiron_contrib
grep -v "pyiron_base" ../pyiron_contrib/.ci_support/environment.yml > environment.yml
tail -n +4 .ci_support/environment.yml >> environment.yml
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.9"
python-version: "3.10"
mamba-version: "*"
channels: conda-forge
channel-priority: strict
auto-update-conda: true
environment-file: .ci_support/environment.yml
- name: Setup
environment-file: environment.yml
- name: pyironconfig
shell: bash -l {0}
run: |
cd ..
git clone https://github.com/pyiron/pyiron_contrib
cd pyiron_contrib
conda env update --name test --file .ci_support/environment.yml
cd ../pyiron_contrib
python .ci_support/pyironconfig.py
cd ../pyiron_base
- name: Install pyiron_contrib
shell: bash -l {0}
run: |
cd ../pyiron_contrib
pip install --no-deps .
cd ../pyiron_base
- name: Install pyiron_base
shell: bash -l {0}
run: |
pip install --no-deps .
- name: Test
shell: bash -l {0}
timeout-minutes: 30
run: |
cd ../pyiron_contrib
python -m unittest discover tests/