Skip to content

Commit 8acc642

Browse files
committed
Release v1.0.0
0 parents  commit 8acc642

30 files changed

+2177
-0
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = *apps.py, *exceptions.py

.github/workflows/build.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.8", "3.9", "3.10"]
15+
16+
steps:
17+
- name: Checkout sources
18+
uses: actions/checkout@v2
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install tox tox-gh-actions
29+
30+
- name: Run tox
31+
run: tox

.github/workflows/publish.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
branches: [ master ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-publish:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout sources
15+
uses: actions/checkout@v2
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Install poetry and dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
python -m pip install poetry
26+
27+
- name: Configure poetry
28+
env:
29+
pypi_token: ${{ secrets.PYPI_TOKEN }}
30+
run: poetry config pypi-token.pypi $pypi_token
31+
32+
- name: Build and publish
33+
run: poetry publish --build

.gitignore

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
### Misc ###
2+
.DS_Store
3+
4+
### IDEs ###
5+
.idea/
6+
.vscode/
7+
8+
### Django ###
9+
*.log
10+
*.pot
11+
*.pyc
12+
__pycache__/
13+
local_settings.py
14+
db.sqlite3
15+
media
16+
17+
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
18+
# in your Git repository. Update and uncomment the following line accordingly.
19+
# <django-project-name>/staticfiles/
20+
staticfiles/
21+
22+
### Django.Python Stack ###
23+
# Byte-compiled / optimized / DLL files
24+
*.py[cod]
25+
*$py.class
26+
27+
# Distribution / packaging
28+
.Python
29+
build/
30+
develop-eggs/
31+
dist/
32+
downloads/
33+
eggs/
34+
.eggs/
35+
lib/
36+
lib64/
37+
parts/
38+
sdist/
39+
var/
40+
wheels/
41+
share/python-wheels/
42+
*.egg-info/
43+
.installed.cfg
44+
*.egg
45+
MANIFEST
46+
47+
# PyInstaller
48+
# Usually these files are written by a python script from a template
49+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
50+
*.manifest
51+
*.spec
52+
53+
# Installer logs
54+
pip-log.txt
55+
pip-delete-this-directory.txt
56+
57+
# Unit test / coverage reports
58+
htmlcov/
59+
.tox/
60+
.nox/
61+
.coverage
62+
.coverage.*
63+
.cache
64+
nosetests.xml
65+
coverage.xml
66+
*.cover
67+
.hypothesis/
68+
.pytest_cache/
69+
70+
# Translations
71+
*.mo
72+
73+
# Django stuff:
74+
75+
76+
# Sphinx documentation
77+
docs/_build/
78+
79+
# PyBuilder
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# celery beat schedule file
90+
celerybeat-schedule
91+
92+
# SageMath parsed files
93+
*.sage.py
94+
95+
# Environments
96+
.env
97+
.venv
98+
env/
99+
venv/
100+
ENV/
101+
env.bak/
102+
venv.bak/
103+
104+
# Spyder project settings
105+
.spyderproject
106+
.spyproject
107+
108+
# Rope project settings
109+
.ropeproject
110+
111+
# mkdocs documentation
112+
/site
113+
114+
# mypy
115+
.mypy_cache/
116+
.dmypy.json
117+
dmypy.json
118+
119+
# Pyre type checker
120+
.pyre/

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
3+
## [1.0.0] - 2024-04-26
4+
5+
- First release on PyPI

LICENSE.md

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) 2023 https://github.com/gripep
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.

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.PHONY : help test install
2+
3+
format: ## Run formatters (black, isort) with poetry
4+
poetry run isort drf_simple_api_errors test_project
5+
poetry run black drf_simple_api_errors test_project
6+
7+
install: ## Install dependencies with poetry
8+
poetry install --with dev -v
9+
10+
lint: ## Check format (black, isort) and linting (flake8)
11+
poetry run isort --check drf_simple_api_errors test_project
12+
poetry run black --check drf_simple_api_errors test_project --exclude migrations
13+
poetry run flake8 drf_simple_api_errors test_project --max-line-length 88
14+
15+
shell: ## Run poetry shell
16+
poetry shell
17+
18+
test: ## Run unittests with poetry
19+
poetry run pytest test_project
20+
21+
test/cov: ## Run code coverage tests coverage with poetry
22+
poetry run pytest test_project --cov=drf_simple_api_errors

0 commit comments

Comments
 (0)