Skip to content

Commit

Permalink
Merge pull request #10 from steven-murray/fix-installation
Browse files Browse the repository at this point in the history
Fix installation
  • Loading branch information
steven-murray committed Jul 12, 2023
2 parents b4a07c6 + 22d4cb8 commit 0097fac
Show file tree
Hide file tree
Showing 20 changed files with 518 additions and 230 deletions.
28 changes: 23 additions & 5 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
[flake8]
# Recommend matching the black default line length of 88,
# rather than the flake8 default of 79:
ignore =
E203
T201
max-line-length = 88
extend-ignore =
# See https://github.com/PyCQA/pycodestyle/issues/373
E203,
max-complexity = 20
rst-roles =
class
func
mod
data
const
meth
attr
exc
obj
rst-directives =
note
warning
versionadded
versionchanged
deprecated
seealso
per-file-ignores =
tests/*:D
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: monthly
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: monthly
- package-ecosystem: pip
directory: "/"
schedule:
interval: monthly
versioning-strategy: lockfile-only
allow:
- dependency-type: "all"
66 changes: 66 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
# Labels names are important as they are used by Release Drafter to decide
# regarding where to record them in changelog or if to skip them.
#
# The repository labels will be automatically configured using this file and
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
- name: breaking
description: Breaking Changes
color: bfd4f2
- name: bug
description: Something isn't working
color: d73a4a
- name: build
description: Build System and Dependencies
color: bfdadc
- name: ci
description: Continuous Integration
color: 4a97d6
- name: dependencies
description: Pull requests that update a dependency file
color: 0366d6
- name: documentation
description: Improvements or additions to documentation
color: 0075ca
- name: duplicate
description: This issue or pull request already exists
color: cfd3d7
- name: enhancement
description: New feature or request
color: a2eeef
- name: github_actions
description: Pull requests that update Github_actions code
color: "000000"
- name: good first issue
description: Good for newcomers
color: 7057ff
- name: help wanted
description: Extra attention is needed
color: 008672
- name: invalid
description: This doesn't seem right
color: e4e669
- name: performance
description: Performance
color: "016175"
- name: python
description: Pull requests that update Python code
color: 2b67c6
- name: question
description: Further information is requested
color: d876e3
- name: refactoring
description: Refactoring
color: ef67c4
- name: removal
description: Removals and Deprecations
color: 9ae7ea
- name: style
description: Style
color: c120e5
- name: testing
description: Testing
color: b1fc6f
- name: wontfix
description: This will not be worked on
color: ffffff
66 changes: 66 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# See https://github.com/marketplace/actions/release-drafter for configuration
categories:
- title: ":boom: Breaking Changes"
label: "breaking"
- title: ":rocket: Features"
label: "enhancement"
- title: ":fire: Removals and Deprecations"
label: "removal"
- title: ":beetle: Fixes"
label: "bug"
- title: ":racehorse: Performance"
label: "performance"
- title: ":rotating_light: Testing"
label: "testing"
- title: ":construction_worker: Continuous Integration"
label: "ci"
- title: ":books: Documentation"
label: "documentation"
- title: ":hammer: Refactoring"
label: "refactoring"
- title: ":lipstick: Style"
label: "style"
- title: ":package: Dependencies"
labels:
- "dependencies"
- "build"
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
autolabeler:
- label: 'documentation'
files:
- '*.md'
branch:
- '/.*docs{0,1}.*/'
- label: 'bug'
branch:
- '/fix.*/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature.*|add-.+/'
title:
- '/feat:.+|feature:.+/i'
- label: "removal"
title:
- "/remove .*/i"
- label: "performance"
title:
- "/.* performance .*/i"
- label: "ci"
files:
- '.github/*'
- '.pre-commit-config.yaml'
- '.coveragrc'
- label: "style"
files:
- ".flake8"
- label: "refactoring"
title:
- "/.* refactor.*/i"

template: |
## Changes
$CHANGES
14 changes: 14 additions & 0 deletions .github/workflows/auto-merge-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: auto-merge

on:
pull_request:

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.AUTO_MERGE }}
27 changes: 27 additions & 0 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check Distribution Build

on: push

jobs:
check-build:
name: Twine Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install Build Tools
run: pip install build twine

- name: Build a binary wheel
run: |
python -m build .
- name: Check Distribution
run: |
twine check dist/*
18 changes: 18 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Labeler

on:
push:
branches:
- main

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4.1.0
with:
skip-delete: true
21 changes: 21 additions & 0 deletions .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update Draft Release

on: push

jobs:
draft-release:
name: Update Draft Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Publish the release notes
uses: release-drafter/release-drafter@v5.24.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/testsuite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Suite
on: [push, pull_request]


jobs:
tests:
name: Test Suite
runs-on: ${{ matrix.os }}
# defaults:
# run:
# shell: bash -l {0}
env:
ENV_NAME: testing
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9, "3.10", "3.11"]
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1

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

- name: Install Package and Test Deps
run: |
echo $(which python)
python -m pip install .[tests]
- name: Run Tests
run: |
python -m pytest --cov-config=.coveragerc --cov-report xml:./coverage.xml
- uses: codecov/codecov-action@v3
if: success()
with:
file: ./coverage.xml #optional
59 changes: 59 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
exclude: '^docs/conf.py'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ['--fix=no']

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-comprehensions
- flake8-logging-format
- flake8-builtins
- flake8-eradicate
- pep8-naming
- flake8-pytest
- flake8-docstrings
- flake8-rst-docstrings
- flake8-rst
- flake8-copyright
- flake8-markdown
- flake8-bugbear
- flake8-comprehensions
- flake8-print


- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks

- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
hooks:
- id: pyupgrade
args: [--py38-plus]
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 0097fac

Please sign in to comment.