Skip to content

Commit

Permalink
Merge pull request #297 from libAtoms/docs_CI
Browse files Browse the repository at this point in the history
Update github CI for docs to use conda's correct version python
  • Loading branch information
bernstei authored Mar 7, 2024
2 parents ffaddfa + 4ef2ac8 commit 47752b6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 28 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,51 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8 ]
python-version: [ "3.9" ]
max-parallel: 5
env:
coverage-on-version: 3.8
coverage-on-version: "3.9"
use-mpi: True
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4

- name: Set up python ${{ matrix.python-version }} via conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- name: Add conda to system path
- name: Check python version
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
# - name: Install Dependencies from Conda
# run: conda env update --file=devtools/conda-envs/environment.yml --name=base
which python3
python3 --version
- name: Install pip from Conda
run: conda install pip
- name: Install dependencies from pip
run: python3 -m pip install wheel setuptools numpy scipy click matplotlib pyyaml spglib phonopy phono3py rdkit flake8 pytest pytest-cov nbsphinx ipython requests

- name: Install phono3py from Conda forge
run: conda install -c conda-forge phono3py h5py

- name: Install dependencies from pip (some will already be taken care of by conda's phonop3py and its dependencies)
run: pip install wheel setuptools ase numpy scipy click matplotlib pandas pyyaml spglib phonopy phono3py rdkit-pypi flake8 pytest pytest-cov nbsphinx ipython
- name: Install latest ASE from gitlab
run: |
python3 -m pip install git+https://gitlab.com/ase/ase.git
echo -n "ASE VERSION "
python3 -c "import ase; print(ase.__file__, ase.__version__)"
- name: Install Quippy from PyPI
run: pip install quippy-ase
run: python3 -m pip install quippy-ase

- name: Install wfl (expyre and universalSOAP are dependencies)
run: pip install .
run: python3 -m pip install .

- name: Install pandoc
run: sudo apt-get install pandoc

- name: Build documentation
run: |
pip install sphinx sphinx-book-theme docutils==0.16 sphinx-click myst-parser
pip install --upgrade jinja2
python3 -m pip install sphinx sphinx-book-theme docutils==0.16 sphinx-click myst-parser
python3 -m pip install --upgrade jinja2
cd docs
make html
- name: Deploy documentation
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up python via conda
- name: Set up python ${{ matrix.python-version }} via conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
Expand All @@ -40,11 +40,6 @@ jobs:
- name: Install dependencies from pip
run: python3 -m pip install wheel setuptools numpy scipy click matplotlib pyyaml spglib rdkit flake8 pytest pytest-cov requests

- name: Check numpy
run: |
python3 -m pip list | grep numpy
python3 -c "import numpy; print(numpy.__file__, numpy.__version__)"
- name: Install latest ASE from gitlab
run: |
python3 -m pip install git+https://gitlab.com/ase/ase.git
Expand Down

0 comments on commit 47752b6

Please sign in to comment.