Skip to content
Snippets Groups Projects
Unverified Commit 34031173 authored by James Graham's avatar James Graham Committed by GitHub
Browse files

Merge pull request #40 from jag1g13/clean-build

Clean up CI and fix dependencies on macOS
parents a3e3365f 7a8a2036
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ jobs: ...@@ -15,7 +15,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: [3.6, 3.7, 3.8] python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-11.0] os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
...@@ -27,33 +27,28 @@ jobs: ...@@ -27,33 +27,28 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install pre-install dependencies - name: Install Poetry
run: | uses: snok/install-poetry@v1.1.1
python -m pip install --upgrade pip
pip install poetry wheel
poetry config virtualenvs.in-project true
- name: Cache venv
uses: actions/cache@v2
with:
path: .venv
key: ${{ matrix.os }}-${{ matrix.python-version }}-venv-${{ hashFiles('poetry.lock') }}
- name: Install project dependencies - name: Install project and dependencies
run: | run: |
poetry install --no-root --extras docs --extras test poetry install
- name: Test with pytest - name: Test with pytest
run: | run: |
make test poetry run pytest --cov=pycgtool --cov-report=
- name: Lint with flake8 - stop build if fails
run: |
poetry run prospector --strictness veryhigh --test-warnings --tool pyflakes
- name: Lint with flake8 and prospector - name: Full lint - don't stop build
run: | run: |
make lint poetry run prospector --strictness veryhigh --test-warnings --member-warnings --max-line-length 120 --zero-exit
- name: Test that docs build - name: Test that docs build
run: | run: |
make docs SPHINXBUILD="poetry run sphinx-build" make -C docs html
- name: Check that test coverage is above 80% - name: Check that test coverage is above 80%
run: | run: |
......
This diff is collapsed.
...@@ -15,7 +15,7 @@ keywords = [ ...@@ -15,7 +15,7 @@ keywords = [
] ]
classifiers = [ classifiers = [
"Development Status :: 2 - Pre-Alpha", "Development Status :: 3 - Alpha",
"Environment :: Console", "Environment :: Console",
"Intended Audience :: Science/Research", "Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Chemistry",
...@@ -28,16 +28,14 @@ pycgtool = "pycgtool.__main__:main" ...@@ -28,16 +28,14 @@ pycgtool = "pycgtool.__main__:main"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.6" python = "^3.6"
wheel = "^0.35.1" wheel = "^0.35.1"
numpy = "^1.19.1" numpy = [
{ version = "^1.19.1", python = "<3.7" }, # Support for Python 3.6 was dropped in 1.20
{ version = "^1.20.0", python = ">=3.7" } # But 1.20 should resolve issue with MDTraj on macOS
]
cython = "^0.29.21" cython = "^0.29.21"
mdtraj = "^1.9.4" mdtraj = "^1.9.5"
rich = "^9.2.0" rich = "^9.2.0"
# Optional extras to enable additional functionality
sphinx-autoapi = { version = "^1.5.0", optional = true }
sphinx-rtd-theme = { version = "^0.5.0", optional = true }
sphinx = { version = "^3.2.1", optional = true }
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
prospector = "^1.3.0" prospector = "^1.3.0"
pytest = "^6.0.1" pytest = "^6.0.1"
...@@ -45,10 +43,10 @@ pytest-cov = "^2.10.1" ...@@ -45,10 +43,10 @@ pytest-cov = "^2.10.1"
yapf = "^0.30.0" yapf = "^0.30.0"
vulture = "^2.1" vulture = "^2.1"
rstcheck = "^3.3.1" rstcheck = "^3.3.1"
flake8 = "^3.8.4"
[tool.poetry.extras] Sphinx = "^3.4.3"
docs = ["sphinx", "sphinx-autoapi", "sphinx-rtd-theme"] sphinx-autoapi = "^1.5.1"
test = ["pytest", "pytest-cov", "prospector", "flake8"] sphinx-rtd-theme = "^0.5.1"
[build-system] [build-system]
requires = ["poetry>=0.12"] requires = ["poetry>=0.12"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment