Skip to content

Commit

Permalink
Pull upstream changes to template module and reformat (#27)
Browse files Browse the repository at this point in the history
* Introduce changes to template module, stop supporting python 3.8 and 3.9 with pipenv, move dev dependencies to setup.py

* Pull changes to Github CI
  • Loading branch information
callumforrester committed Oct 12, 2021
1 parent 9ce188a commit 653cc5f
Show file tree
Hide file tree
Showing 5 changed files with 364 additions and 62 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,24 @@ jobs:
matrix:
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
python: ["3.7", "3.8", "3.9"]
pipenv: ["skip-lock"] # --${flag} will be passed to pipenv command

include:
# Tag the Python3.7 runner as the one to publish wheels
# Add an extra Python3.7 runner to publish wheels and use the lockfile
- os: "ubuntu-latest"
python: "3.7"
pipenv: "deploy"
publish: true

name: build/${{ matrix.python }}/${{ matrix.os }}
name: build/${{ matrix.python }}/${{ matrix.os }}/${{ matrix.pipenv }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout Source
uses: actions/checkout@v2
with:
# require history to get back to last tag for version number of branches
fetch-depth: 0

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
Expand All @@ -33,7 +38,7 @@ jobs:
- name: Install Python Dependencies
run: |
pip install pipenv build
pipenv install --dev --deploy --python $(python -c 'import sys; print(sys.executable)') && pipenv graph
pipenv install --dev --${{ matrix.pipenv }} --python $(python -c 'import sys; print(sys.executable)') && pipenv graph
- name: Create Sdist and Wheel
if: matrix.publish
Expand All @@ -49,9 +54,9 @@ jobs:
run: pipenv run tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
name: ${{ matrix.python }}/${{ matrix.os }}
name: ${{ matrix.python }}/${{ matrix.os }}/${{ matrix.pipenv }}
files: cov.xml

- name: Upload Wheel and Sdist as artifacts
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
build:
name: "Docs CI"
runs-on: ubuntu-latest

steps:
Expand All @@ -32,15 +33,9 @@ jobs:
- name: Build Docs
run: pipenv run docs

- uses: rishabhgupta/split-by@v1
id: split
with:
string: ${{ github.ref }}
split-by: /

- name: Move to versioned directory
# e.g. master or 0.1.2
run: mv build/html ".github/pages/${{ steps.split.outputs._2 }}"
run: mv build/html ".github/pages/${GITHUB_REF##*/}"

- name: Publish Docs to gh-pages
# Only master and tags are published
Expand Down
24 changes: 1 addition & 23 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,9 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
# Pinning black stops us having to allow pre-releases globally
black = "==21.7b0"
# Pins to make lockfile usable on multiple Python versions and platforms
mypy = "*"
typed-ast = "*"
atomicwrites = "*"
importlib-metadata = "*"
# Test and docs dependencies
pytest-cov = "*"
pytest-mypy = "*"
pytest-flake8 = "*"
pytest-black = "*"
flake8-isort = "*"
isort = ">5.0"
sphinx-rtd-theme-github-versions = "*"
mock = "*"
types-mock = "*"
types-PyYAML = "*"
pytest-asyncio = "*"
pytest-pydocstyle = "*"
tickit = {editable = true, extras = ["dev"], path = "."}

[packages]
# Required by immutables
typing-extensions = "*"
# All other package requirements from setup.cfg
tickit = {editable = true, path = "."}

[scripts]
Expand Down
Loading

0 comments on commit 653cc5f

Please sign in to comment.