Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit 5bd37a7

Browse files
committed
initial commit
0 parents  commit 5bd37a7

74 files changed

Lines changed: 3702 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.deepsource.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version = 1
2+
exclude_patterns = [
3+
"typing-stubs-for-package-name-to-install-with/**",
4+
]
5+
test_patterns = [
6+
"**/tests/*.py",
7+
]
8+
9+
[[analyzers]]
10+
name = "python"
11+
enabled = true
12+
dependency_file_paths = [
13+
"pyproject.toml",
14+
"requirements/requirements.dev.txt",
15+
"requirements/requirements.doc.txt",
16+
"requirements/requirements.format.txt",
17+
"requirements/requirements.lint.txt",
18+
"requirements/requirements.release.txt",
19+
"requirements/requirements.test.txt",
20+
"requirements/requirements.txt",
21+
]
22+
23+
[analyzers.meta]
24+
runtime_version = "3.x.x"
25+
max_line_length = 99
26+
skip_doc_coverage = [
27+
"init",
28+
]
29+
type_checker = "mypy"
30+
31+
[[analyzers]]
32+
name = "secrets"
33+
enabled = true
34+
35+
[[transformers]]
36+
name = "black"
37+
enabled = true
38+
39+
[[transformers]]
40+
name = "isort"
41+
enabled = true

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# References
2+
3+
## https://github.com/alexkaratarakis/gitattributes/blob/c9e0391fd0f045478a3d122979eeb23d2311e21a/.gitattributes
4+
## https://github.com/alexkaratarakis/gitattributes/blob/bf082e21993dc589d27ac403b2c189f24c6e57a1/Common.gitattributes
5+
## https://github.com/alexkaratarakis/gitattributes/blob/eeb2ca9a67e5985e1c9e00b3d20ae2842eaa8852/Markdown.gitattributes
6+
## https://github.com/alexkaratarakis/gitattributes/blob/492d0bc3bb09d37cc36e6f1e346b4b61bd620197/Python.gitattributes
7+
8+
* text=auto
9+
10+
*.gitattributes text export-ignore linguist-detectable linguist-language=gitattributes
11+
*.gitignore text export-ignore linguist-detectable linguist-language=gitignore
12+
*.gitkeep export-ignore
13+
14+
*.md text diff=markdown linguist-detectable
15+
*.py text diff=python linguist-detectable
16+
*.toml text diff=toml linguist-detectable
17+
*.yaml text diff=yaml linguist-detectable
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: nox-session-action-name
2+
description: run nox session
3+
inputs:
4+
session-name-input-identifier:
5+
description: name of nox session
6+
required: true
7+
python-version-input-identifier:
8+
description: python version to run session
9+
required: false
10+
default: none
11+
runs:
12+
using: composite
13+
steps:
14+
- id: nox-step-identifier
15+
name: install nox
16+
run: python3 -m pip install nox
17+
shell: bash
18+
- id: session-all-versions-step-identifier
19+
name: run provided nox session for all configured python versions
20+
if: env.PYTHON_VERSION == 'none'
21+
run: nox --sessions ${{env.SESSION_NAME}} --force-venv-backend venv
22+
shell: bash
23+
env:
24+
SESSION_NAME: ${{ inputs.session-name-input-identifier }}
25+
PYTHON_VERSION: ${{ inputs.python-version-input-identifier }}
26+
- id: session-single-version-step-identifier
27+
name: run provided nox session for provided python version
28+
if: env.PYTHON_VERSION != 'none'
29+
run: nox --sessions ${{env.SESSION_NAME}} --pythons ${{env.PYTHON_VERSION}} --force-venv-backend venv
30+
shell: bash
31+
env:
32+
SESSION_NAME: ${{ inputs.session-name-input-identifier }}
33+
PYTHON_VERSION: ${{ inputs.python-version-input-identifier }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: nox-tag-action-name
2+
description: run nox tag
3+
inputs:
4+
tag-name-input-identifier:
5+
description: name of nox tag
6+
required: true
7+
python-version-input-identifier:
8+
description: python version to run tag
9+
required: false
10+
default: none
11+
runs:
12+
using: composite
13+
steps:
14+
- id: nox-step-identifier
15+
name: install nox
16+
run: python3 -m pip install nox
17+
shell: bash
18+
- id: tag-all-versions-step-identifier
19+
name: run provided nox tag for all configured python versions
20+
if: env.PYTHON_VERSION == 'none'
21+
run: nox --tags ${{env.TAG_NAME}} --force-venv-backend venv
22+
shell: bash
23+
env:
24+
TAG_NAME: ${{ inputs.tag-name-input-identifier }}
25+
PYTHON_VERSION: ${{ inputs.python-version-input-identifier }}
26+
- id: tag-single-version-step-identifier
27+
name: run provided nox tag for provided python version
28+
if: env.PYTHON_VERSION != 'none'
29+
run: nox --pythons ${PYTHON_VERSION} --tags ${{env.TAG_NAME}} --force-venv-backend venv
30+
shell: bash
31+
env:
32+
TAG_NAME: ${{ inputs.tag-name-input-identifier }}
33+
PYTHON_VERSION: ${{ inputs.python-version-input-identifier }}

.github/workflows/docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: docs-workflow-name
2+
run-name: docs workflow run name
3+
on: workflow_dispatch
4+
defaults:
5+
run:
6+
shell: bash
7+
jobs:
8+
docs-job-identifier:
9+
name: docs job name
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout commit
13+
uses: actions/checkout@v3
14+
- name: set up python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
check-latest: true
19+
architecture: x64
20+
cache: pip
21+
- name: build documentation
22+
uses: ./.github/actions/nox-sessions-action-identifier
23+
with:
24+
session-name-input-identifier: sphinx
25+
- name: upload documentation
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: docs
29+
path: ./docs/build

.github/workflows/format.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: format-workflow-name
2+
run-name: format workflow run name
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- opened
9+
- synchronize
10+
defaults:
11+
run:
12+
shell: bash
13+
jobs:
14+
format-job-identifier:
15+
name: format job name
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
runner-platform:
20+
- ubuntu-latest
21+
python-version:
22+
- "3.10"
23+
runs-on: ${{ matrix.runner-platform }}
24+
steps:
25+
- name: checkout commit
26+
uses: actions/checkout@v3
27+
- name: set up python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
check-latest: true
32+
architecture: x64
33+
cache: pip
34+
- name: run formatters on python ${{ matrix.python-version }}
35+
uses: ./.github/actions/nox-tags-action-identifier
36+
with:
37+
tag-name-input-identifier: format

.github/workflows/lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: lint-workflow-name
2+
run-name: lint workflow run name
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- opened
9+
- synchronize
10+
defaults:
11+
run:
12+
shell: bash
13+
jobs:
14+
lint-job-identifier:
15+
name: lint job name
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
runner-platform:
20+
- ubuntu-latest
21+
python-version:
22+
- "3.10"
23+
- "3.11"
24+
runs-on: ${{ matrix.runner-platform }}
25+
steps:
26+
- name: checkout commit
27+
uses: actions/checkout@v3
28+
- name: set up python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
check-latest: true
33+
architecture: x64
34+
cache: pip
35+
- name: run linters on python ${{ matrix.python-version }}
36+
uses: ./.github/actions/nox-tags-action-identifier
37+
with:
38+
tag-name-input-identifier: lint
39+
python-version-input-identifier: ${{ matrix.python-version }}

.github/workflows/pre-commit.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: pre-commit-workflow-name
2+
run-name: pre-commit workflow run name
3+
on: push
4+
defaults:
5+
run:
6+
shell: bash
7+
jobs:
8+
pre-commit-job-identifier:
9+
name: pre-commit job name
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout commit
13+
uses: actions/checkout@v3
14+
- name: set up python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
check-latest: true
19+
architecture: x64
20+
cache: pip
21+
- name: run all pre-commit hooks
22+
env:
23+
SKIP: no-commit-to-branch
24+
uses: ./.github/actions/nox-sessions-action-identifier
25+
with:
26+
session-name-input-identifier: pre_commit

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: release-workflow-name
2+
run-name: release workflow run name
3+
on: workflow_dispatch
4+
defaults:
5+
run:
6+
shell: bash
7+
jobs:
8+
release-job-identifier:
9+
name: release job name
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout commit
13+
uses: actions/checkout@v3
14+
- name: set up python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
check-latest: true
19+
architecture: x64
20+
cache: pip
21+
- name: build and release wheel
22+
env:
23+
TWINE_REPOSITORY: ${{ secrets.PYPI_REPOSITORY }}
24+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
uses: ./.github/actions/nox-sessions-action-identifier
27+
with:
28+
session-name-input-identifier: build
29+
- name: upload wheel
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: release
33+
path: ./dist

.github/workflows/test.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: test-workflow-name
2+
run-name: test workflow run name
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- opened
9+
- synchronize
10+
push:
11+
branches:
12+
- main
13+
defaults:
14+
run:
15+
shell: bash
16+
jobs:
17+
test-job-identifier:
18+
name: test job name
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
runner-platform:
23+
- macos-latest
24+
- ubuntu-latest
25+
- windows-latest
26+
python-version:
27+
- "3.10"
28+
- "3.11"
29+
max-parallel: 2
30+
runs-on: ${{ matrix.runner-platform }}
31+
steps:
32+
- name: checkout commit
33+
uses: actions/checkout@v3
34+
- name: set up python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
check-latest: true
39+
architecture: x64
40+
cache: pip
41+
- name: run unit tests on python ${{ matrix.python-version }} in runner ${{ matrix.runner-platform }}
42+
uses: ./.github/actions/nox-sessions-action-identifier
43+
with:
44+
session-name-input-identifier: pytest
45+
python-version-input-identifier: ${{ matrix.python-version }}
46+
- name: upload coverage reports
47+
uses: codecov/codecov-action@v3
48+
with:
49+
token: ${{ secrets.CODECOV_TOKEN }}
50+
files: coverage_xml_report.xml

0 commit comments

Comments
 (0)