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

Update github CI for docs to use conda's correct version python #297

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading