Skip to content
Snippets Groups Projects
Unverified Commit 2978439d authored by Jan Janssen's avatar Jan Janssen Committed by GitHub
Browse files

Build Documentation and Docs on Azure (#1139)

* Update azure-pipelines.yml

* Create azure-notebooks-template.yml

* Create azure-backwards-template.yml

* Delete travis_setup_notebooks.sh

* Update .travis.yml

* Update azure-backwards-template.yml

* Update azure-notebooks-template.yml

* Create unittests.yml

* Update travis_build_notebooks.sh

* Rename travis_build_notebooks.sh to build_notebooks.sh

* Update azure-notebooks-template.yml

* Create deploy.yml

* Create coverage.yml

* Create notebooks.yml

* Create backwards.yml

* Update and rename travis_test_backwards.sh to test_backwards.sh

* Update build_notebooks.sh

* Delete azure-backwards-template.yml

* Delete azure-notebooks-template.yml

* Delete azure-unix-test-template.yml

* Delete .travis.yml

* Delete appveyor.yml

* Delete azure-pipelines.yml

* Delete travis_setup_pyiron.sh

* Create environment-docs.yml

* Create docs.yml

* Update and rename travis_build_docs.sh to build_docs.sh

* Update notebooks.yml

* Update environment.yml

* Update build_notebooks.sh

* Create pyironconfignotebook.py

* Update notebooks.yml

* Update pyironconfignotebook.py

* Update notebooks.yml

* Update notebooks.yml

* Delete pyironconfignotebook.py

* Update notebooks.yml
parent 10559002
No related branches found
No related tags found
No related merge requests found
Showing
with 235 additions and 272 deletions
steps:
- bash: |
python .ci_support/pyironconfig.py
cat ~/.pyiron
displayName: pyiron config
- bash: |
conda info -a
conda config --set always_yes yes --set changeps1 no
conda install -c anaconda setuptools
conda update -q conda
displayName: conda setup
- bash: sed 's/=/>=/g' .ci_support/environment.yml > environment.yml
displayName: update environment
- bash: conda create -n pyiron -q --yes -c conda-forge python=$(python.version)
displayName: Init environment
- bash: |
source activate pyiron
conda env update --file environment.yml
displayName: pyiron environment
- bash: |
source activate pyiron
pip install --pre .
displayName: Installing deeptools
- bash: |
source activate pyiron
coverage run --omit pyiron/_version.py -m unittest discover tests
displayName: coverage
#!/bin/bash
mkdir public_html
cd docs
sphinx-build -b html ./ ../public_html || exit 1;
cd ..
#!/bin/bash
# Conda fix
eval "$(conda shell.bash hook)"
conda activate root
env
# Remove excluded notebooks
for f in $(cat .ci_support/exclude); do
rm "notebooks/$f";
done;
# Select ipykernelt
if [ "$PYTHONVER" = "2.7" ]; then
......
channels:
- conda-forge
dependencies:
- sphinx
- nbsphinx
- ipywidgets
- sphinx_rtd_theme
- pylint
- Graphviz
- sphinxcontrib-applehelp
- seaborn
channels:
- conda-forge
dependencies:
- ase =3.20
- ase >=3.20
- coveralls
- coverage
- codacy-coverage
- defusedxml =0.6.0
- dill =0.3.1.1
- future =0.18.2
- h5py =2.10.0
- matplotlib =3.2.0
- mendeleev =0.5.2
- molmod =1.4.5
- numpy =1.18.1
- pandas =1.0.1
- phonopy =2.4.2
- pymatgen =2020.9.14
- pyiron_base =0.1.24
- pyscal =2.7.5
- pytables =3.6.1
- quickff =2.2.4
- scipy =1.4.1
- seekpath =1.9.4
- six =1.14.0
- scikit-learn =0.22
- spglib =1.14.1
- tamkin =1.2.6
- tqdm =4.43.0
- yaff =1.4.2
- defusedxml >=0.6.0
- dill >=0.3.1.1
- future >=0.18.2
- h5py >=2.10.0
- matplotlib >=3.2.0
- mendeleev >=0.5.2
- molmod >=1.4.5
- numpy >=1.18.1
- pandas >=1.0.1
- phonopy >=2.4.2
- pymatgen >=2020.9.14
- pyiron_base >=0.1.24
- pyscal >=2.7.5
- pytables >=3.6.1
- quickff >=2.2.4
- scipy >=1.4.1
- seekpath >=1.9.4
- six >=1.14.0
- scikit-learn >=0.22
- spglib >=1.14.1
- tamkin >=1.2.6
- tqdm >=4.43.0
- yaff >=1.4.2
#!/bin/bash
# # Conda fix
# eval "$(conda shell.bash hook)"
# conda activate root
# env
pip install --force --ignore-installed --no-deps pyiron==0.2.16
echo "Before save";
for t in tests/backwards/*save.py; do
......
#!/bin/bash
if [ "$TRAVIS_BRANCH" = "master" ]; then
# install
conda install -y -c conda-forge sphinx nbsphinx ipywidgets sphinx_rtd_theme pylint Graphviz sphinxcontrib-applehelp seaborn
git config --global user.email "${GH_EMAIL}"
git config --global user.name "${GH_USER}"
cd ..
mkdir pyiron.github.io
cd pyiron.github.io
touch .nojekyll
echo -e "# Build Status\n\nThis repository is automatically updated based on the changes in https://github.com/pyiron/pyiron .\n[![Build Status](https://travis-ci.org/pyiron/pyiron.svg?branch=master)](https://travis-ci.org/pyiron/pyiron)" > README.md
cd ..
cd pyiron/docs
sphinx-build -b html ./ ../../pyiron.github.io || exit 1;
cd ..
mkdir uml
cd uml
pyreverse -p pyiron -o png ../pyiron
cp *.png ../../pyiron.github.io
cd ..
fi;
#!/bin/bash
# Install additional requirements
conda env update --name root --file .ci_support/environment-notebooks.yml
# Remove excluded notebooks
for f in $(cat .ci_support/exclude); do rm notebooks/$f; done;
#!/bin/bash
# Setup Miniconda
wget ${1} -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
conda info -a
conda config --set always_yes yes --set changeps1 no
# Setup pyiron
conda install python=${2}
conda env update --name root --file .ci_support/environment.yml
pip install --pre .
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Backwards
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: 3.8
conda-channels: anaconda, conda-forge
- run: python .ci_support/pyironconfig.py
- run: conda config --set always_yes yes --set changeps1 no
- run: conda env update --name root --file .ci_support/environment.yml
- run: pip install -e .
- run: conda env update --name root --file .ci_support/environment-notebooks.yml
- run: ./.ci_support/test_backwards.sh
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: 3.8
conda-channels: anaconda, conda-forge
- run: python .ci_support/pyironconfig.py
- run: conda config --set always_yes yes --set changeps1 no
- run: conda env update --name root --file .ci_support/environment.yml
- run: pip install -e .
- run: coverage run --omit pyiron/_version.py -m unittest discover tests
- run: coverage combine
- run: coveralls
- run: coverage xml
- run: python-codacy-coverage -r coverage.xml
name: PyPi Release
on:
push:
pull_request:
# based on https://github.com/pypa/gh-action-pypi-publish
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: >-
python -m pip install --user --upgrade setuptools wheel
- name: Build
run: >-
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Docs
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: 3.8
conda-channels: anaconda, conda-forge
- run: python .ci_support/pyironconfig.py
- run: conda config --set always_yes yes --set changeps1 no
- run: conda env update --name root --file .ci_support/environment.yml
- run: pip install -e .
- run: conda env update --name root --file .ci_support/environment-docs.yml
- run: ./.ci_support/build_docs.sh
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Notebooks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
env:
CONDA_PREFIX: /usr/share/miniconda/
GPAW_SETUP_PATH: /usr/share/miniconda/share/gpaw
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: 3.8
conda-channels: anaconda, conda-forge
- run: conda config --set always_yes yes --set changeps1 no
- run: conda env update --name root --file .ci_support/environment.yml
- run: pip install -e .
- run: conda env update --name root --file .ci_support/environment-notebooks.yml
- run: ./.ci_support/build_notebooks.sh
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- run: python .ci_support/pyironconfig.py
- run: conda config --set always_yes yes --set changeps1 no
- run: conda env update --name root --file .ci_support/environment.yml
- run: pip install -e .
- run: coverage run --omit pyiron/_version.py -m unittest discover tests
matrix:
include:
- stage: test
name: test_linux_3_7
os: linux
language: python
env: MINICONDA="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" PYTHONVER="3.7"
install:
- export PATH="$HOME/miniconda/bin:$PATH"
- ./.ci_support/travis_setup_pyiron.sh ${MINICONDA} ${PYTHONVER}
- python .ci_support/pyironconfig.py
script:
- coverage run -m unittest discover tests
- coverage combine
after_success:
- coveralls
- coverage xml
- python-codacy-coverage -r coverage.xml
deploy:
- provider: pypi
user: pyiron
password: ${PYPI_UPLOAD_TOKEN}
allow_failure: true
on:
branch: master
- provider: pypi
user: pyiron
password: ${PYPI_UPLOAD_TOKEN}
allow_failure: true
on:
tags: true
- name: notebook_linux_3_7
os: linux
language: python
env: MINICONDA="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" PYTHONVER="3.7"
install:
- export PATH="$HOME/miniconda/bin:$PATH"
- ./.ci_support/travis_setup_pyiron.sh ${MINICONDA} ${PYTHONVER}
- ./.ci_support/travis_setup_notebooks.sh
script:
- ./.ci_support/travis_build_notebooks.sh || travis_terminate 1;
- name: backwards_compatibility
os: linux
language: python
env: MINICONDA="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" PYTHONVER="3.7"
install:
- export PATH="$HOME/miniconda/bin:$PATH"
- ./.ci_support/travis_setup_pyiron.sh ${MINICONDA} ${PYTHONVER}
- ./.ci_support/travis_setup_notebooks.sh
script:
- ./.ci_support/travis_test_backwards.sh || travis_terminate 1;
- name: documentation
if: branch = master
os: linux
language: python
env: MINICONDA="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" PYTHONVER="3.7"
install:
- export PATH="$HOME/miniconda/bin:$PATH"
- ./.ci_support/travis_setup_pyiron.sh ${MINICONDA} ${PYTHONVER}
- python .ci_support/pyironconfig.py
script:
- ./.ci_support/travis_build_docs.sh || travis_terminate 1;
environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: 'cmd /E:ON /V:ON /C .\tools\appveyor\run_with_env.cmd'
PROJECT_NAME: pyiron
matrix:
- PYTHON_VERSION: 3.7
CONDA: C:\Miniconda37
version: '{build}'
image: Visual Studio 2019
# For testing only...
#skip_non_tags: true
platform:
- x64
init:
- ps: if ($Env:PLATFORM -eq "x64") { $Env:CONDA = "${Env:CONDA}-x64" }
- ps: Write-Host $Env:PYTHON_VERSION
- ps: Write-Host $Env:CONDA
- ps: Write-Host $Env:PLATFORM
- ps: Write-Host $Env:APPVEYOR_REPO_TAG
- ps: Write-Host $Env:APPVEYOR_REPO_TAG_NAME
- ps: Write-Host $Env:APPVEYOR_REPO_NAME
install:
# Make sure the compiler is accessible
- '"%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %PLATFORM%'
# Load the conda root environment, configure and install some packages
- '"%CONDA%\Scripts\activate.bat"'
- "conda config --set always_yes yes --set changeps1 no"
- "conda install -q python=%PYTHON_VERSION%"
- "conda env update --file .ci_support/environment.yml"
- "conda info -a"
- "pip install --pre ."
build: false
test_script:
# Build the package
- "python .ci_support/pyironconfig.py"
- "cat C:/Users/appveyor/.pyiron"
- "python -m unittest discover tests"
variables:
linux: 'ubuntu-latest'
mac: 'macOS-latest'
windows: 'windows-latest'
pr:
branches:
include:
- '*'
jobs:
- job: 'Linux'
pool:
vmImage: $(linux)
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
maxParallel: 4
steps:
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
- template: .ci_support/azure-unix-test-template.yml
- job: 'OSX'
pool:
vmImage: $(mac)
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
maxParallel: 1
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- template: .ci_support/azure-unix-test-template.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment