Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
cdonnay committed Mar 29, 2024
2 parents f1a233f + f2b1acd commit 9e35545
Show file tree
Hide file tree
Showing 115 changed files with 708,226 additions and 9,151 deletions.
23 changes: 15 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
version: 2
version: 2.1

jobs:
test:
parameters:
python-version:
type: string
docker:
- image: python:3.8
- image: cimg/python:<< parameters.python-version >>
working_directory: ~/repo
steps:
- checkout
Expand Down Expand Up @@ -33,13 +36,14 @@ jobs:
# install dependencies in conda env
conda install pytest pytest-cov
conda install codecov
python setup.py install
conda install shapely==1.6.4
python -m pip install .[geo]
# run tests
echo "backend: Agg" > "matplotlibrc"
pytest -v --runslow --cov=gerrychain --junitxml=test-reports/junit.xml tests
codecov
no_output_timeout: 40m
environment:
PYTHONHASHSEED: "0"
- store_test_results:
Expand All @@ -49,15 +53,15 @@ jobs:

deploy:
docker:
- image: python:3.8
- image: python:3.9
working_directory: ~/repo
steps:
- checkout
- run:
name: install dependencies
command: |
pip install --upgrade setuptools wheel twine
python setup.py install
python -m pip install .[geo]
- run:
name: set up .pypirc
command: |
Expand All @@ -75,10 +79,13 @@ jobs:
twine upload dist/*
workflows:
version: 2
version: 2.1
test_and_deploy:
jobs:
- test
- test:
matrix:
parameters:
python-version: ["3.9", "3.10", "3.11"]
- deploy:
requires:
- test
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/docs-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Pull Request Docs Check"
on:
- pull_request

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
32 changes: 32 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Publish Docs"
on:
push:
branches:
- main

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
- name: Commit documentation changes
run: |
git clone https://github.com/mggg/GerryChain.git --branch gh-pages --single-branch gh-pages
cp -r docs/_build/html/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ target/

# pyenv python configuration file
.python-version

.venv
.docs_venv
junit.xml

# crapple
Expand All @@ -74,4 +75,7 @@ junit.xml

# Pytest cache
.pytest_cache/
Dockerfile
Dockerfile

# Extra Documentation Stuff
release_notes.md
Loading

0 comments on commit 9e35545

Please sign in to comment.