Skip to content

Commit e405b7a

Browse files
committedJun 28, 2024
feat: initial commit
Signed-off-by: Daniel Bluhm <[email protected]>
0 parents  commit e405b7a

12 files changed

+715
-0
lines changed
 

‎.commitlint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional']
3+
};

‎.github/dependabot.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# For details on how this file works refer to:
2+
# - https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
version: 2
4+
updates:
5+
# Maintain dependencies for GitHub Actions
6+
# - Check for updates once a week
7+
# - Group all updates into a single PR
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: weekly
12+
groups:
13+
all-actions:
14+
patterns: ["*"]
15+
16+
# Maintain pip dependencies
17+
- package-ecosystem: pip
18+
directory: /
19+
schedule:
20+
interval: weekly
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Code Quality Check
2+
3+
"on":
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
format:
13+
name: Format and Lint Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: chartboost/ruff-action@v1
18+
with:
19+
version: "0.4.1"
20+
args: 'format --check'
21+
- uses: chartboost/ruff-action@v1
22+
with:
23+
version: "0.4.1"

‎.github/workflows/publish.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
id-token: write
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Setup Python
15+
uses: pdm-project/setup-pdm@v4
16+
with:
17+
python-version: 3.9
18+
cache: true
19+
- name: Install dependencies
20+
run: pdm install
21+
- name: Run pytest
22+
run: pdm run pytest
23+
- name: Publish
24+
run: pdm publish

‎.github/workflows/tests.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
test:
10+
name: Tests
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: pdm-project/setup-pdm@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
cache: true
21+
- name: Install dependencies
22+
run: pdm install -G :all
23+
- name: Run pytest
24+
run: pdm run pytest

‎.gitignore

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
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+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm-project.org/#use-with-ide
110+
.pdm.toml
111+
.pdm-python
112+
.pdm-build/
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+
157+
# PyCharm
158+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160+
# and can be added to the global gitignore or merged into this file. For a more nuclear
161+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162+
#.idea/

‎.pre-commit-config.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
repos:
3+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
4+
rev: v9.16.0
5+
hooks:
6+
- id: commitlint
7+
stages: [commit-msg]
8+
args: ["--config", ".commitlint.config.js"]
9+
additional_dependencies: ['@commitlint/config-conventional']
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.4.5
12+
hooks:
13+
- id: ruff
14+
stages: [commit]
15+
args: ["--fix", "--exit-non-zero-on-fix"]
16+
- id: ruff-format
17+
stages: [commit]

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# token-status-list

‎pdm.lock

+385
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[project]
2+
name = "token-status-list"
3+
version = "0.1.0"
4+
description = "Implementation of IETF Token Status List"
5+
authors = [
6+
{name = "Daniel Bluhm", email = "dbluhm@pm.me"},
7+
]
8+
dependencies = []
9+
requires-python = ">=3.9"
10+
readme = "README.md"
11+
license = {text = "Apache-2.0"}
12+
13+
[build-system]
14+
requires = ["pdm-backend"]
15+
build-backend = "pdm.backend"
16+
17+
18+
[tool.pdm]
19+
distribution = true
20+
21+
[tool.pdm.dev-dependencies]
22+
dev = [
23+
"pre-commit>=3.7.1",
24+
"pytest>=8.2.2",
25+
"ruff>=0.5.0",
26+
"pytest-cov>=5.0.0",
27+
]
28+
29+
[tool.ruff]
30+
line-length = 90
31+
extend-exclude = ["example*.py"]
32+
33+
[tool.ruff.lint]
34+
select = ["E", "F", "C", "D", "TID"]
35+
ignore = [
36+
# Google Python Doc Style
37+
"D203", "D204", "D213", "D215", "D400", "D401", "D404", "D406", "D407",
38+
"D408", "D409", "D413",
39+
"D202", # Allow blank line after docstring
40+
]
41+
per-file-ignores = {"**/{tests}/*" = ["F841", "D", "E501"]}
42+
43+
[tool.coverage.report]
44+
exclude_lines = ["pragma: no cover", "@abstract"]
45+
precision = 2
46+
show_missing = true
47+
48+
[tool.coverage.run]
49+
branch = true

‎src/token_status_list/__init__.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Token Status List.
2+
3+
Python implementation of Token Status List.
4+
5+
This implementation is based on draft 2, found here:
6+
https://datatracker.ietf.org/doc/html/draft-ietf-oauth-status-list-02
7+
"""

‎tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)
Please sign in to comment.