Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ current_version = 0.6.4
commit = True
tag = True

[bumpversion:file:__pkginfo__.py]

[bumpversion:file:README.rst]

[bumpversion:file:doc-source/index.rst]

[bumpversion:file:enum_tools/__init__.py]

search = : str = "{current_version}"
replace = : str = "{new_version}"

[bumpversion:file:repo_helper.yml]

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:.github/workflows/conda_ci.yml]
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If possible, please include a small, self-contained reproduction.
* enum_tools:

## Installation source
<!-- e.g. Github repository, Github Releases, PyPI/pip, Anaconda/conda -->
<!-- e.g. GitHub repository, GitHub Releases, PyPI/pip, Anaconda/conda -->


## Other Additional Information:
Expand Down
7 changes: 3 additions & 4 deletions .github/actions_build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@

set -e -x

python -m repo_helper make-recipe || exit 1
python -m mkrecipe --type wheel || exit 1

# Switch to miniconda
source "/home/runner/miniconda/etc/profile.d/conda.sh"
hash -r
conda activate base
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda install conda-build
conda install anaconda-client
conda install conda=4.8.5 conda-build=3.18.11
conda info -a

conda config --add channels conda-forge || exit 1
conda config --add channels domdfcoding || exit 1
conda config --remove channels defaults

conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing

Expand Down
3 changes: 1 addition & 2 deletions .github/actions_deploy_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ source "/home/runner/miniconda/etc/profile.d/conda.sh"
hash -r
conda activate base
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda install anaconda-client
conda install conda=4.8.5 anaconda-client
conda info -a

for f in conda/dist/noarch/enum_tools-*.tar.bz2; do
Expand Down
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exemptMilestones: false
exemptAssignees: false

# Label to use when marking as stale
staleLabel: wontfix
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/conda_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ name: Conda Tests

on:
push:
pull_request:
branches: ["master"]

permissions:
contents: read

jobs:
tests:
name: "Conda"
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- name: Checkout 🛎️
Expand All @@ -26,19 +28,30 @@ jobs:
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade repo_helper
python -m pip install --upgrade whey-conda
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda update -q conda
$CONDA/bin/conda install conda-build=3.21.0

$CONDA/bin/conda config --add channels conda-forge
$CONDA/bin/conda config --add channels domdfcoding

- name: "Build and install package"
- name: "Build and index channel"
run: |
# This mess is only necessary because conda won't fix it themselves
# https://github.com/conda/conda/issues/1884

python -m repo_helper build --conda --out-dir conda-bld/noarch
python -m whey --builder whey_conda --out-dir conda-bld/noarch
$CONDA/bin/conda index ./conda-bld || exit 1
$CONDA/bin/conda install -c file://$(pwd)/conda-bld enum_tools -y || exit 1

- name: "Search for package"
run: |
$CONDA/bin/conda search -c file://$(pwd)/conda-bld enum_tools
$CONDA/bin/conda search -c file://$(pwd)/conda-bld --override-channels enum_tools

- name: "Install package"
run: |
$CONDA/bin/conda install -c file://$(pwd)/conda-bld enum_tools=0.6.4=py_1 -y || exit 1

- name: "Run Tests"
run: |
rm -rf enum_tools
$CONDA/bin/pip install -r tests/requirements.txt
$CONDA/bin/pytest tests/
26 changes: 22 additions & 4 deletions .github/workflows/docs_test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,36 @@
---
name: "Docs Check"
on:
- pull_request
- push
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'
pull_request:

permissions:
contents: read

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v1"

- name: Check for changed files
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!tests/**'

- name: Install and Build 🔧
uses: ammaraskar/sphinx-action@master
uses: sphinx-toolbox/sphinx-action@sphinx-3.3.1
if: steps.changes.outputs.code == 'true'
with:
pre-build-command: apt-get update && apt-get install gcc python3-dev git pandoc -y && python -m pip install tox
pre-build-command: python -m pip install tox
docs-folder: "doc-source/"
build-command: "tox -e docs -- "
24 changes: 21 additions & 3 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ name: Flake8

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'
pull_request:
branches: ["master"]

permissions:
contents: read

jobs:
Run:
Expand All @@ -16,17 +22,29 @@ jobs:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Check for changed files
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'

- name: Setup Python 🐍
if: steps.changes.outputs.code == 'true'
uses: "actions/setup-python@v2"
with:
python-version: "3.8"
python-version: "3.6"

- name: Install dependencies 🔧
if: steps.changes.outputs.code == 'true'
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox

- name: "Run Flake8"
run: "python -m tox -e lint -- --format github"
if: steps.changes.outputs.code == 'true'
run: "python -m tox -e lint -s false -- --format github"
23 changes: 20 additions & 3 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ name: mypy

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'
pull_request:
branches: ["master"]

permissions:
contents: read

jobs:
Run:
Expand All @@ -14,14 +20,24 @@ jobs:

strategy:
matrix:
os: ['windows-2019', 'macos-latest', 'ubuntu-20.04']
os: ['ubuntu-20.04', 'windows-2019']
fail-fast: false

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Check for changed files
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'

- name: Setup Python 🐍
if: steps.changes.outputs.code == 'true'
uses: "actions/setup-python@v2"
with:
python-version: "3.6"
Expand All @@ -34,4 +50,5 @@ jobs:
python -m pip install --upgrade tox virtualenv

- name: "Run mypy"
run: "python -m tox -e mypy"
if: steps.changes.outputs.code == 'true'
run: "python -m tox -e mypy -s false"
4 changes: 1 addition & 3 deletions .github/workflows/octocheese.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@

name: "GitHub Releases"
on:
push:
branches: ["master"]
schedule:
- cron: 0 12 * * 2,4,6
- cron: 0 12 * * *

jobs:
Run:
Expand Down
32 changes: 27 additions & 5 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@ name: Windows

on:
push:
branches-ignore:
- 'repo-helper-update'
- 'pre-commit-ci-update-config'
- 'imgbot'

pull_request:
branches: ["master"]

permissions:
actions: write
contents: read

jobs:
tests:
name: "windows-2019 / Python ${{ matrix.config.python-version }}"
runs-on: "windows-2019"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.6,pypy-3.6,pypy-3.7'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.6,pypy-3.7'

strategy:
fail-fast: False
Expand All @@ -23,32 +31,46 @@ jobs:
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.6", testenvs: "py310-dev,build", experimental: True}
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Check for changed files
if: startsWith(github.ref, 'refs/tags/') != true
uses: dorny/paths-filter@v2
id: changes
with:
list-files: "json"
filters: |
code:
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'

- name: Setup Python 🐍
id: setup-python
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.config.python-version }}"

- name: Install dependencies 🔧
if: steps.setup-python.outcome == 'success'
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox virtualenv

- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"
if: steps.setup-python.outcome == 'success'
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false

- name: "Upload Coverage 🚀"
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() && steps.setup-python.outcome == 'success' }}
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
Loading