Skip to content

Commit 4340d0f

Browse files
committed
chore: Initial commit
Signed-off-by: Dmitry Dygalo <[email protected]>
0 parents  commit 4340d0f

20 files changed

+1315
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: Stranger6667

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**.py'
7+
- '.github/workflows/*.yml'
8+
- '.pre-commit-config.yaml'
9+
- 'pyproject.toml'
10+
- 'tox.ini'
11+
- 'mypy.ini'
12+
push:
13+
branches:
14+
- main
15+
16+
jobs:
17+
pre-commit:
18+
name: Generic pre-commit checks
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- uses: actions/[email protected]
22+
with:
23+
fetch-depth: 1
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.8"
28+
29+
- run: pip install pre-commit
30+
- run: SKIP=mypy pre-commit run --all-files
31+
32+
mypy:
33+
name: Mypy
34+
runs-on: ubuntu-22.04
35+
steps:
36+
- uses: actions/[email protected]
37+
with:
38+
fetch-depth: 1
39+
40+
- uses: actions/setup-python@v5
41+
with:
42+
python-version: "3.8"
43+
44+
- run: pip install pre-commit
45+
- run: pre-commit run mypy --all-files
46+
47+
tests:
48+
strategy:
49+
matrix:
50+
os: [ubuntu-22.04]
51+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
52+
53+
name: Tests on ${{ matrix.python }}
54+
runs-on: ${{ matrix.os }}
55+
steps:
56+
- uses: actions/[email protected]
57+
with:
58+
fetch-depth: 1
59+
60+
- uses: actions/setup-python@v5
61+
with:
62+
python-version: ${{ matrix.python }}
63+
64+
- run: pip install tox tox-gh-actions
65+
66+
- run: python -m tox
67+
68+
- name: Upload coverage to Codecov
69+
uses: codecov/[email protected]
70+
with:
71+
name: codecov-${{ matrix.python }}
72+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/codspeed.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Benchmarks
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
benchmarks:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- uses: actions/[email protected]
15+
- uses: actions/setup-python@v5
16+
with:
17+
# Python 3.12 for flamegraph support
18+
python-version: "3.12"
19+
20+
- name: Install dependencies
21+
run: pip install ".[bench]"
22+
23+
- name: Run benchmarks
24+
uses: CodSpeedHQ/action@v2
25+
with:
26+
token: ${{ secrets.CODSPEED_TOKEN }}
27+
run: pytest benches/* --codspeed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
9+
pypi-publish:
10+
name: Upload release to PyPI
11+
runs-on: ubuntu-22.04
12+
environment: release
13+
permissions:
14+
id-token: write
15+
steps:
16+
- uses: actions/[email protected]
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.10"
21+
22+
- run: pip install hatch
23+
24+
- name: Build package
25+
run: hatch build
26+
27+
- name: Publish package distributions to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Update pre-commit
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 * * 0
6+
workflow_dispatch:
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
release:
14+
name: Update pre-commit
15+
runs-on: ubuntu-22.04
16+
steps:
17+
- uses: actions/[email protected]
18+
with:
19+
fetch-depth: 1
20+
submodules: true
21+
22+
- run: pip install pre-commit
23+
- run: pre-commit autoupdate
24+
25+
- name: Open pull request
26+
uses: peter-evans/create-pull-request@v6
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
delete-branch: true
30+
title: Update pre-commit
31+
body: Automatically update pre-commit
32+
commit-message: 'chore: Update pre-commit'
33+
committer: 'Stranger6667 <[email protected]>'
34+
author: 'Stranger6667 <[email protected]>'
35+
branch: "create-pull-request/update-pre-commit"

.gitignore

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
.ruff_cache
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
.pybuilder/
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
#Pipfile.lock
98+
99+
# poetry
100+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101+
# This is especially recommended for binary packages to ensure reproducibility, and is more
102+
# commonly ignored for libraries.
103+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104+
#poetry.lock
105+
106+
# pdm
107+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108+
#pdm.lock
109+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110+
# in version control.
111+
# https://pdm.fming.dev/#use-with-ide
112+
.pdm.toml
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
128+
venv/
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
# pytype static type analyzer
152+
.pytype/
153+
154+
# Cython debug symbols
155+
cython_debug/
156+

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
default_language_version:
2+
python: python3.8
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.6.0
7+
hooks:
8+
- id: check-yaml
9+
- id: end-of-file-fixer
10+
- id: trailing-whitespace
11+
exclude: ^.*\.md$
12+
- id: debug-statements
13+
- id: mixed-line-ending
14+
args: [--fix=lf]
15+
- id: check-merge-conflict
16+
17+
- repo: https://github.com/jorisroovers/gitlint
18+
rev: v0.19.1
19+
hooks:
20+
- id: gitlint
21+
22+
- repo: https://github.com/pre-commit/mirrors-mypy
23+
rev: v1.10.1
24+
hooks:
25+
- id: mypy
26+
exclude: ^(tests|benches)/.*$
27+
args: ["--ignore-missing-imports"]
28+
29+
- repo: https://github.com/astral-sh/ruff-pre-commit
30+
rev: v0.5.0
31+
hooks:
32+
- id: ruff-format
33+
34+
- repo: https://github.com/astral-sh/ruff-pre-commit
35+
rev: v0.5.0
36+
hooks:
37+
- id: ruff

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
## [Unreleased] - TBD

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Schemathesis.io
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)