-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doctest step to docs build (#3997)
* move linters to separate CI file * don't run darker on merge * add doctest to docs building step * CI actions invoke use-mamba not uses-mamba
- Loading branch information
Showing
5 changed files
with
127 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ jobs: | |
channel-priority: flexible | ||
channels: conda-forge, bioconda | ||
add-pip-as-python-dependency: true | ||
uses-mamba: true | ||
use-mamba: true | ||
miniforge-variant: Mambaforge | ||
architecture: x64 | ||
|
||
|
@@ -154,7 +154,7 @@ jobs: | |
channels: conda-forge, bioconda | ||
add-pip-as-python-dependency: true | ||
architecture: x64 | ||
uses-mamba: true | ||
use-mamba: true | ||
miniforge-variant: Mambaforge | ||
|
||
- name: install_deps | ||
|
@@ -171,6 +171,12 @@ jobs: | |
build-tests: false | ||
build-docs: true | ||
|
||
- name: doctests | ||
if: github.event_name == 'pull_request' | ||
continue-on-error: true | ||
run: | | ||
cd package && sphinx-build -b doctest --keep-going ./doc/sphinx/source ./doc/html | ||
- name: deploy_docs | ||
if: github.event_name != 'pull_request' | ||
env: | ||
|
@@ -226,64 +232,6 @@ jobs: | |
git push -q upstream HEAD:gh-pages | ||
pylint_check: | ||
if: "github.repository == 'MDAnalysis/mdanalysis'" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: install | ||
run: | | ||
python -m pip install pylint | ||
- name: pylint | ||
env: | ||
PYLINTRC: package/.pylintrc | ||
run: | | ||
pylint package/MDAnalysis && pylint testsuite/MDAnalysisTests | ||
darker_lint: | ||
if: "github.repository == 'MDAnalysis/mdanalysis'" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: darker main code | ||
uses: akaihola/[email protected] | ||
with: | ||
version: "@master" | ||
options: "--check --diff --color" | ||
src: "./package/MDAnalysis" | ||
revision: "HEAD^" | ||
lint: "flake8" | ||
|
||
- name: darker test code | ||
uses: akaihola/[email protected] | ||
if: success() || failure() | ||
with: | ||
version: "@master" | ||
options: "--check --diff --color" | ||
src: "./testsuite/MDAnalysisTests" | ||
revision: "HEAD^" | ||
lint: "flake8" | ||
|
||
|
||
pypi_check: | ||
if: "github.repository == 'MDAnalysis/mdanalysis'" | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: "linters" | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
concurrency: | ||
# Probably overly cautious group naming. | ||
# Commits to develop/master will cancel each other, but PRs will only cancel | ||
# commits within the same PR | ||
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}" | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
darker_lint: | ||
if: | | ||
github.repository == 'MDAnalysis/mdanalysis' && | ||
github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: darker main code | ||
uses: akaihola/[email protected] | ||
with: | ||
version: "@master" | ||
options: "--check --diff --color" | ||
src: "./package/MDAnalysis" | ||
revision: "HEAD^" | ||
lint: "flake8" | ||
|
||
- name: darker test code | ||
uses: akaihola/[email protected] | ||
if: success() || failure() | ||
with: | ||
version: "@master" | ||
options: "--check --diff --color" | ||
src: "./testsuite/MDAnalysisTests" | ||
revision: "HEAD^" | ||
lint: "flake8" | ||
|
||
|
||
pylint_check: | ||
if: "github.repository == 'MDAnalysis/mdanalysis'" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: install | ||
run: | | ||
python -m pip install pylint | ||
- name: pylint | ||
env: | ||
PYLINTRC: package/.pylintrc | ||
run: | | ||
pylint package/MDAnalysis && pylint testsuite/MDAnalysisTests | ||
mypy : | ||
if: "github.repository == 'MDAnalysis/mdanalysis'" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: setup_miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: 3.8 | ||
auto-update-conda: true | ||
channel-priority: flexible | ||
channels: conda-forge, bioconda | ||
add-pip-as-python-dependency: true | ||
use-mamba: true | ||
miniforge-variant: Mambaforge | ||
architecture: x64 | ||
|
||
- name: install_deps | ||
uses: ./.github/actions/setup-deps | ||
with: | ||
mamba: true | ||
full-deps: true | ||
numpy: numpy=1.20.0 | ||
|
||
- name: install | ||
run: | | ||
python -m pip install mypy | ||
- name: "Run mypy" | ||
run: | | ||
mypy package/MDAnalysis/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters