Skip to content

Commit

Permalink
Merge pull request #259 from ajhynes7/fix_readthedocs
Browse files Browse the repository at this point in the history
Set up readthedocs for use with poetry
  • Loading branch information
ajhynes7 committed Mar 14, 2021
2 parents aad0fca + 9300c77 commit 6657fff
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 90 deletions.
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

70 changes: 35 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@ name: scikit-spatial
on: push

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

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

- name: Install Poetry
uses: snok/install-poetry@v1.1.2

- name: Install tox
run: pip install tox==3.23.0

- name: Run tox
run: tox

- name: Upload coverage report to codecov
uses: codecov/codecov-action@v1.2.1
with:
fail_ci_if_error: true
verbose: true
gcov_prefix: ${{ env.GITHUB_WORKSPACE }}

- name: Build and publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: JRubics/poetry-publish@v1
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

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

- name: Install Poetry
uses: snok/install-poetry@v1.1.2

- name: Install tox
run: pip install tox==3.23.0

- name: Run tox
run: tox

- name: Upload coverage report to codecov
uses: codecov/codecov-action@v1.2.1
with:
fail_ci_if_error: true
verbose: true
gcov_prefix: ${{ env.GITHUB_WORKSPACE }}

- name: Build and publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: JRubics/poetry-publish@v1
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
92 changes: 48 additions & 44 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,49 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.4.0
hooks:
- id: reorder-python-imports
args: [--application-directories, ".:src"]
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
args: [-S, -l 120]
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.1.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies:
- flake8-blind-except==0.1.1
- flake8-bugbear==20.1.4
- flake8-builtins==1.5.3
- flake8-comprehensions==3.3.0
- flake8-eradicate==1.0.0
- flake8-pytest-style==1.3.0
- flake8-rst-docstrings==0.0.14
- flake8-unused-arguments==0.0.6
- repo: https://github.com/PyCQA/pydocstyle
rev: 5.1.1
hooks:
- id: pydocstyle
args: [--convention=numpy, "--add-ignore=D104,D105"]
exclude: tests|examples|conf.py
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.4.0
hooks:
- id: reorder-python-imports
args: [--application-directories, ".:src"]
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
args: [-S, -l 120]
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.1.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies:
- flake8-blind-except==0.1.1
- flake8-bugbear==20.1.4
- flake8-builtins==1.5.3
- flake8-comprehensions==3.3.0
- flake8-eradicate==1.0.0
- flake8-pytest-style==1.3.0
- flake8-rst-docstrings==0.0.14
- flake8-unused-arguments==0.0.6
- repo: https://github.com/PyCQA/pydocstyle
rev: 5.1.1
hooks:
- id: pydocstyle
args: [--convention=numpy, "--add-ignore=D104,D105"]
exclude: tests|examples|conf.py
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
hooks:
- id: prettier
5 changes: 3 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sphinx:
python:
version: 3.7
install:
- method: setuptools
- method: pip
path: .
- requirements: requirements/docs.txt
extra_requirements:
- docs

0 comments on commit 6657fff

Please sign in to comment.