Skip to content

Commit

Permalink
Merge branch 'main' into redirect-faq
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshanuikabundi authored Oct 2, 2024
2 parents 028e4ff + fd7b8b0 commit 02a8fc4
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 92 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
- name: Install environment with ${{ env.JOBNAME }}
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.10-0'
environment-file: devtools/conda-envs/${{ env.ENVFILE }}.yaml
create-args: >-
python=${{ matrix.python-version }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/beta_rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ jobs:
- name: Install environment with ${{ env.JOBNAME }}
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.10-0'
environment-file: devtools/conda-envs/test_env.yaml
condarc: |
channels:
- conda-forge/label/openmm_rc
- conda-forge/label/mdtraj_rc
- conda-forge/label/openff-toolkit_rc
- conda-forge/label/openff-interchange_rc
- openeye/label/rc
- openeye
- conda-forge
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ jobs:
uses: mamba-org/setup-micromamba@v1
if: ${{ matrix.openeye == 'false' }}
with:
micromamba-version: '1.5.10-0'
environment-file: devtools/conda-envs/conda.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Install from conda with OpenEye
uses: mamba-org/setup-micromamba@v1
if: ${{ matrix.openeye == 'true' }}
with:
micromamba-version: '1.5.10-0'
environment-file: devtools/conda-envs/conda_oe.yaml
create-args: >-
python=${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
- name: Install conda environment with ${{ env.ENVFILE }}
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.10-0'
environment-file: devtools/conda-envs/${{env.ENVFILE}}-examples.yaml
create-args: >-
python=${{ matrix.python-version }}
Expand Down
181 changes: 89 additions & 92 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,95 +20,92 @@ jobs:
PYVER: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v4

- name: Install conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/installer.yaml
create-args: >-
python=${{ matrix.python-version }}
# default - will pull down 2.0 which we don't want!
# micromamba-version: latest
# pin to latest 1.x release
micromamba-version: "1.5.10-0"

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
shell: bash -l {0}
run: |
conda info
conda list
- name: Prepare and run the constructor
shell: bash -l {0}
run: |
#cd ..
# Find the tag of the last release (excluding RCs)
# TODO: Make this a variable that can be passed through from trigger and/or allow RC
export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -E "([0-9]+)\.([0-9]+)\.([0-9]+)$" | sort --version-sort | tail -1 | sed 's/refs\/tags\///')
echo $LATEST_TAG
git clone https://github.com/openforcefield/toolkit-installer-constructor
cd toolkit-installer-constructor
python ../devtools/scripts/build_cookiecutter_json.py $LATEST_TAG $PYVER $CI_OS
cp new_cookiecutter.json cookiecutter/cookiecutter.json
cat new_cookiecutter.json
python run.py
pwd
ls
ls build
- name: Upload installer as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_py${{ matrix.python-version }}.sh
path: toolkit-installer-constructor/build/openff-toolkit*/openff-toolkit*.sh

- name: Install from installer
shell: bash -l {0}
run: |
#cd ..
pwd
ls
ls toolkit-installer-constructor
ls toolkit-installer-constructor/build
ls toolkit-installer-constructor/build/openff-toolkit-*/
mkdir scratch
cd scratch
echo $HOME/constructor_install/ | bash ../toolkit-installer-constructor/build/openff-toolkit-*/openff-toolkit-*.sh
conda activate $HOME/constructor_install/
conda info
conda list
export FOUND_VER=$(python -c "import openff.toolkit; print(openff.toolkit.__version__)")
export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -v "rc" | tail -1 | sed 's/refs\/tags\///')
echo $LATEST_TAG
echo $FOUND_VER
if [[ $LATEST_TAG != $FOUND_VER ]];
then echo "Version mismatch"
exit 1
fi
PYTEST_ARGS=" -r fE --tb=short"
PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_links.py"
# This should work if run directly at release time, but a safer approach would be
# to `git checkout` the corresponding tag of the release, see PR #577
pytest $PYTEST_ARGS ../
- uses: actions/checkout@v4

- name: Install conda environment
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.10-0'
environment-file: devtools/conda-envs/installer.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
shell: bash -l {0}
run: |
conda info
conda list
- name: Prepare and run the constructor
shell: bash -l {0}
run: |
#cd ..
# Find the tag of the last release (excluding RCs)
# TODO: Make this a variable that can be passed through from trigger and/or allow RC
export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -E "([0-9]+)\.([0-9]+)\.([0-9]+)$" | sort --version-sort | tail -1 | sed 's/refs\/tags\///')
echo $LATEST_TAG
git clone https://github.com/openforcefield/toolkit-installer-constructor
cd toolkit-installer-constructor
python ../devtools/scripts/build_cookiecutter_json.py $LATEST_TAG $PYVER $CI_OS
cp new_cookiecutter.json cookiecutter/cookiecutter.json
cat new_cookiecutter.json
python run.py
pwd
ls
ls build
- name: Upload installer as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_py${{ matrix.python-version }}.sh
path: toolkit-installer-constructor/build/openff-toolkit*/openff-toolkit*.sh

- name: Install from installer
shell: bash -l {0}
run: |
#cd ..
pwd
ls
ls toolkit-installer-constructor
ls toolkit-installer-constructor/build
ls toolkit-installer-constructor/build/openff-toolkit-*/
mkdir scratch
cd scratch
echo $HOME/constructor_install/ | bash ../toolkit-installer-constructor/build/openff-toolkit-*/openff-toolkit-*.sh
conda activate $HOME/constructor_install/
conda info
conda list
export FOUND_VER=$(python -c "import openff.toolkit; print(openff.toolkit.__version__)")
export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -v "rc" | tail -1 | sed 's/refs\/tags\///')
echo $LATEST_TAG
echo $FOUND_VER
if [[ $LATEST_TAG != $FOUND_VER ]];
then echo "Version mismatch"
exit 1
fi
PYTEST_ARGS=" -r fE --tb=short"
PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_links.py"
# This should work if run directly at release time, but a safer approach would be
# to `git checkout` the corresponding tag of the release, see PR #577
pytest $PYTEST_ARGS ../

0 comments on commit 02a8fc4

Please sign in to comment.