-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Wordcab/first-release
First release 0.1.0
- Loading branch information
Showing
22 changed files
with
5,563 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[darglint] | ||
strictness = long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
models | ||
models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[flake8] | ||
select = B,B9,C,D,DAR,E,F,N,RST,S,W | ||
ignore = D212,E203,E501,RST201,RST203,RST301,W503,S106 | ||
max-line-length = 119 | ||
max-complexity = 10 | ||
docstring-convention = google | ||
per-file-ignores = tests/*:S101 | ||
rst-roles = class,const,func,meth,mod,ref | ||
rst-directives = deprecated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pip==23.0 | ||
nox==2022.11.21 | ||
nox-poetry==1.0.2 | ||
poetry==1.4.1 | ||
virtualenv==20.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
name: Quality Checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
quality: | ||
name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- { python: "3.10", os: "ubuntu-latest", session: "pre-commit" } | ||
env: | ||
NOXSESSION: ${{ matrix.session }} | ||
FORCE_COLOR: "1" | ||
PRE_COMMIT_COLOR: "always" | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt pip | ||
pip --version | ||
- name: Upgrade pip in virtual environments | ||
shell: python | ||
run: | | ||
import os | ||
import pip | ||
with open(os.environ["GITHUB_ENV"], mode="a") as io: | ||
print(f"VIRTUALENV_PIP={pip.__version__}", file=io) | ||
- name: Install Poetry | ||
run: | | ||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | ||
poetry --version | ||
- name: Install Nox | ||
run: | | ||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox | ||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry | ||
nox --version | ||
- name: Compute pre-commit cache key | ||
if: matrix.session == 'pre-commit' | ||
id: pre-commit-cache | ||
shell: python | ||
run: | | ||
import hashlib | ||
import sys | ||
python = "py{}.{}".format(*sys.version_info[:2]) | ||
payload = sys.version.encode() + sys.executable.encode() | ||
digest = hashlib.sha256(payload).hexdigest() | ||
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8]) | ||
print("::set-output name=result::{}".format(result)) | ||
- name: Restore pre-commit cache | ||
uses: actions/cache@v3 | ||
if: matrix.session == 'pre-commit' | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: ${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
restore-keys: | | ||
${{ steps.pre-commit-cache.outputs.result }}- | ||
- name: Run Nox | ||
run: | | ||
nox --python=${{ matrix.python }} | ||
# tests: | ||
# name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }} | ||
# runs-on: ${{ matrix.os }} | ||
# needs: [quality] | ||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# include: | ||
# - { python: "3.10", os: "ubuntu-latest", session: "tests" } | ||
# env: | ||
# NOXSESSION: ${{ matrix.session }} | ||
# FORCE_COLOR: "1" | ||
# PRE_COMMIT_COLOR: "always" | ||
# WORDCAB_API_KEY: ${{ secrets.WORDCAB_API_KEY }} | ||
|
||
# steps: | ||
# - name: Check out the repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Set up Python ${{ matrix.python }} | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python }} | ||
|
||
# - name: Upgrade pip | ||
# run: | | ||
# pip install --constraint=.github/workflows/constraints.txt pip | ||
# pip --version | ||
# - name: Upgrade pip in virtual environments | ||
# shell: python | ||
# run: | | ||
# import os | ||
# import pip | ||
# with open(os.environ["GITHUB_ENV"], mode="a") as io: | ||
# print(f"VIRTUALENV_PIP={pip.__version__}", file=io) | ||
# - name: Install Poetry | ||
# run: | | ||
# pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | ||
# poetry --version | ||
# - name: Install Nox | ||
# run: | | ||
# pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox | ||
# pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry | ||
# nox --version | ||
# - name: Run Nox | ||
# run: | | ||
# nox --python=${{ matrix.python }} | ||
# - name: Upload coverage data | ||
# if: always() && matrix.session == 'tests' | ||
# uses: "actions/upload-artifact@v3" | ||
# with: | ||
# name: coverage-data | ||
# path: ".coverage.*" | ||
|
||
# coverage: | ||
# runs-on: ubuntu-latest | ||
# needs: tests | ||
# steps: | ||
# - name: Check out the repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Set up Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.10" | ||
|
||
# - name: Upgrade pip | ||
# run: | | ||
# pip install --constraint=.github/workflows/constraints.txt pip | ||
# pip --version | ||
# - name: Install Poetry | ||
# run: | | ||
# pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | ||
# poetry --version | ||
# - name: Install Nox | ||
# run: | | ||
# pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox | ||
# pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry | ||
# nox --version | ||
# - name: Download coverage data | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: coverage-data | ||
|
||
# - name: Combine coverage data and display human readable report | ||
# run: | | ||
# nox --session=coverage | ||
# - name: Create coverage report | ||
# run: | | ||
# nox --session=coverage -- xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
__pycache__ | ||
__pycache__/ | ||
*.mp3 | ||
*.wav | ||
.mypy_cache/ | ||
/.coverage | ||
/.coverage.* | ||
/.nox/ | ||
/.python-version | ||
/.pytype/ | ||
/dist/ | ||
/docs/_build/ | ||
/src/*.egg-info/ | ||
.DS_Store | ||
test.ipynb | ||
test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: black | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
- id: check-added-large-files | ||
name: Check for added large files | ||
entry: check-added-large-files | ||
language: system | ||
- id: check-toml | ||
name: Check Toml | ||
entry: check-toml | ||
language: system | ||
types: [toml] | ||
- id: check-yaml | ||
name: Check Yaml | ||
entry: check-yaml | ||
language: system | ||
types: [yaml] | ||
- id: darglint | ||
name: darglint | ||
entry: darglint | ||
language: system | ||
types: [python] | ||
stages: [manual] | ||
- id: end-of-file-fixer | ||
name: Fix End of Files | ||
entry: end-of-file-fixer | ||
language: system | ||
types: [text] | ||
stages: [commit, push, manual] | ||
- id: flake8 | ||
name: flake8 | ||
entry: flake8 | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
args: [--darglint-ignore-regex, .*] | ||
- id: isort | ||
name: isort | ||
entry: isort | ||
require_serial: true | ||
language: system | ||
types_or: [cython, pyi, python] | ||
args: ["--filter-files"] | ||
- id: pyupgrade | ||
name: pyupgrade | ||
description: Automatically upgrade syntax for newer versions. | ||
entry: pyupgrade | ||
language: system | ||
types: [python] | ||
args: [--py37-plus] | ||
- id: trailing-whitespace | ||
name: Trim Trailing Whitespace | ||
entry: trailing-whitespace-fixer | ||
language: system | ||
types: [text] | ||
stages: [commit, push, manual] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.6.0 | ||
hooks: | ||
- id: prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.