okflint 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- okflint-0.1.0/.github/workflows/ci.yml +67 -0
- okflint-0.1.0/.github/workflows/docs.yml +41 -0
- okflint-0.1.0/.github/workflows/lint.yml +37 -0
- okflint-0.1.0/.github/workflows/release.yml +89 -0
- okflint-0.1.0/.github/workflows/test.yml +47 -0
- okflint-0.1.0/.gitignore +141 -0
- okflint-0.1.0/.python-version +1 -0
- okflint-0.1.0/.repomix/2026-06-21_repomix_v1.xml +1139 -0
- okflint-0.1.0/.repomix/2026-06-27_repomix_v1.xml +5842 -0
- okflint-0.1.0/.repomix/2026-06-27_repomix_v2.xml +13156 -0
- okflint-0.1.0/.repomixignore +26 -0
- okflint-0.1.0/CHANGELOG.md +24 -0
- okflint-0.1.0/CLAUDE.md +63 -0
- okflint-0.1.0/CONTRIBUTING.md +224 -0
- okflint-0.1.0/LICENSE +21 -0
- okflint-0.1.0/PKG-INFO +261 -0
- okflint-0.1.0/README.md +230 -0
- okflint-0.1.0/ROADMAP.md +84 -0
- okflint-0.1.0/config/RULES.md +359 -0
- okflint-0.1.0/docs/Makefile +20 -0
- okflint-0.1.0/docs/source/conf.py +53 -0
- okflint-0.1.0/docs/source/index.rst +17 -0
- okflint-0.1.0/docs/sphinx/api/audit.rst +8 -0
- okflint-0.1.0/docs/sphinx/api/cli.rst +8 -0
- okflint-0.1.0/docs/sphinx/api/manifest.rst +8 -0
- okflint-0.1.0/docs/sphinx/api/scanner.rst +8 -0
- okflint-0.1.0/docs/sphinx/api/validate.rst +8 -0
- okflint-0.1.0/docs/sphinx/conf.py +39 -0
- okflint-0.1.0/docs/sphinx/guides/manifest.rst +53 -0
- okflint-0.1.0/docs/sphinx/guides/quickstart.rst +31 -0
- okflint-0.1.0/docs/sphinx/guides/rules.rst +20 -0
- okflint-0.1.0/docs/sphinx/index.rst +30 -0
- okflint-0.1.0/okf-base.example.yaml +83 -0
- okflint-0.1.0/pyproject.toml +130 -0
- okflint-0.1.0/repomix.config.json +18 -0
- okflint-0.1.0/src/okflint/__init__.py +10 -0
- okflint-0.1.0/src/okflint/__main__.py +6 -0
- okflint-0.1.0/src/okflint/audit.py +409 -0
- okflint-0.1.0/src/okflint/cli.py +165 -0
- okflint-0.1.0/src/okflint/manifest.py +369 -0
- okflint-0.1.0/src/okflint/py.typed +0 -0
- okflint-0.1.0/src/okflint/scanner.py +426 -0
- okflint-0.1.0/src/okflint/validate.py +714 -0
- okflint-0.1.0/tasks.py +267 -0
- okflint-0.1.0/tests/__init__.py +1 -0
- okflint-0.1.0/tests/conftest.py +106 -0
- okflint-0.1.0/tests/test_audit.py +325 -0
- okflint-0.1.0/tests/test_cli.py +163 -0
- okflint-0.1.0/tests/test_manifest.py +208 -0
- okflint-0.1.0/tests/test_scanner.py +249 -0
- okflint-0.1.0/tests/test_validate.py +691 -0
- okflint-0.1.0/tests/unit/__init__.py +1 -0
- okflint-0.1.0/uv.lock +1000 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ci-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
name: Lint
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
- run: uv sync
|
|
24
|
+
- run: uv run ruff check src/
|
|
25
|
+
- run: uv run ruff format --check src/
|
|
26
|
+
- run: uv run python -m mypy src/
|
|
27
|
+
|
|
28
|
+
test:
|
|
29
|
+
name: Tests (Python ${{ matrix.python-version }})
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
needs: lint
|
|
32
|
+
|
|
33
|
+
strategy:
|
|
34
|
+
matrix:
|
|
35
|
+
python-version: ["3.12", "3.13"]
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
- uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: ${{ matrix.python-version }}
|
|
42
|
+
- uses: astral-sh/setup-uv@v5
|
|
43
|
+
with:
|
|
44
|
+
enable-cache: true
|
|
45
|
+
- run: uv sync
|
|
46
|
+
- run: |
|
|
47
|
+
uv run python -m pytest \
|
|
48
|
+
--cov=src/okflint \
|
|
49
|
+
--cov-report=term-missing \
|
|
50
|
+
--cov-fail-under=85
|
|
51
|
+
|
|
52
|
+
commitizen:
|
|
53
|
+
name: Commitizen (format des commits)
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
with:
|
|
58
|
+
fetch-depth: 0
|
|
59
|
+
- uses: actions/setup-python@v5
|
|
60
|
+
with:
|
|
61
|
+
python-version: "3.12"
|
|
62
|
+
- uses: astral-sh/setup-uv@v5
|
|
63
|
+
with:
|
|
64
|
+
enable-cache: true
|
|
65
|
+
- run: uv sync
|
|
66
|
+
- name: Validate commit messages
|
|
67
|
+
run: uv run cz check --rev-range origin/main..HEAD
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build-and-deploy:
|
|
9
|
+
name: Build Sphinx + Deploy GitHub Pages
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
|
|
20
|
+
- name: Set up Python 3.12
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v5
|
|
27
|
+
with:
|
|
28
|
+
enable-cache: true
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies (with docs extras)
|
|
31
|
+
run: uv sync --extra docs
|
|
32
|
+
|
|
33
|
+
- name: Build Sphinx documentation
|
|
34
|
+
run: |
|
|
35
|
+
uv run sphinx-build -b html docs/sphinx docs/sphinx/_build/html
|
|
36
|
+
|
|
37
|
+
- name: Deploy to GitHub Pages
|
|
38
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
|
39
|
+
with:
|
|
40
|
+
branch: gh-pages
|
|
41
|
+
folder: docs/sphinx/_build/html/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main", "feat/**", "fix/**", "chore/**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
name: Ruff + mypy
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python 3.12
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install uv
|
|
23
|
+
uses: astral-sh/setup-uv@v5
|
|
24
|
+
with:
|
|
25
|
+
enable-cache: true
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: uv sync
|
|
29
|
+
|
|
30
|
+
- name: Ruff check
|
|
31
|
+
run: uv run ruff check src/
|
|
32
|
+
|
|
33
|
+
- name: Ruff format
|
|
34
|
+
run: uv run ruff format --check src/
|
|
35
|
+
|
|
36
|
+
- name: mypy
|
|
37
|
+
run: uv run python -m mypy src/
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
validate:
|
|
10
|
+
name: Lint + Tests
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Python 3.12
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
with:
|
|
24
|
+
enable-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: uv sync
|
|
28
|
+
|
|
29
|
+
- name: Lint
|
|
30
|
+
run: |
|
|
31
|
+
uv run ruff check src/
|
|
32
|
+
uv run ruff format --check src/
|
|
33
|
+
uv run python -m mypy src/
|
|
34
|
+
|
|
35
|
+
- name: Tests
|
|
36
|
+
run: uv run python -m pytest --cov=src/okflint --cov-fail-under=85
|
|
37
|
+
|
|
38
|
+
publish:
|
|
39
|
+
name: Build + Publish PyPI
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
needs: validate
|
|
42
|
+
|
|
43
|
+
environment:
|
|
44
|
+
name: pypi
|
|
45
|
+
url: https://pypi.org/project/okflint/
|
|
46
|
+
|
|
47
|
+
permissions:
|
|
48
|
+
id-token: write
|
|
49
|
+
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
|
|
53
|
+
- name: Set up Python 3.12
|
|
54
|
+
uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.12"
|
|
57
|
+
|
|
58
|
+
- name: Install uv
|
|
59
|
+
uses: astral-sh/setup-uv@v5
|
|
60
|
+
with:
|
|
61
|
+
enable-cache: true
|
|
62
|
+
|
|
63
|
+
- name: Install dependencies
|
|
64
|
+
run: uv sync
|
|
65
|
+
|
|
66
|
+
- name: Build sdist + wheel
|
|
67
|
+
run: uv build
|
|
68
|
+
|
|
69
|
+
- name: Publish to PyPI
|
|
70
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
71
|
+
|
|
72
|
+
github-release:
|
|
73
|
+
name: GitHub Release
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
needs: publish
|
|
76
|
+
|
|
77
|
+
permissions:
|
|
78
|
+
contents: write
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v4
|
|
82
|
+
with:
|
|
83
|
+
fetch-depth: 0
|
|
84
|
+
|
|
85
|
+
- name: Create GitHub Release
|
|
86
|
+
uses: softprops/action-gh-release@v2
|
|
87
|
+
with:
|
|
88
|
+
generate_release_notes: true
|
|
89
|
+
files: dist/*
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main", "feat/**", "fix/**", "chore/**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: pytest (Python ${{ matrix.python-version }})
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.12", "3.13"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v5
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: uv sync
|
|
33
|
+
|
|
34
|
+
- name: Run tests with coverage
|
|
35
|
+
run: |
|
|
36
|
+
uv run python -m pytest \
|
|
37
|
+
--cov=src/okflint \
|
|
38
|
+
--cov-report=term-missing \
|
|
39
|
+
--cov-report=xml \
|
|
40
|
+
--cov-fail-under=85
|
|
41
|
+
|
|
42
|
+
- name: Upload coverage report
|
|
43
|
+
uses: actions/upload-artifact@v4
|
|
44
|
+
if: matrix.python-version == '3.12'
|
|
45
|
+
with:
|
|
46
|
+
name: coverage-report
|
|
47
|
+
path: coverage.xml
|
okflint-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
|
|
2
|
+
# Created by https://www.toptal.com/developers/gitignore/api/python
|
|
3
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
|
|
4
|
+
|
|
5
|
+
### Python ###
|
|
6
|
+
# Byte-compiled / optimized / DLL files
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*$py.class
|
|
10
|
+
|
|
11
|
+
# C extensions
|
|
12
|
+
*.so
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
.Python
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
downloads/
|
|
20
|
+
eggs/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
sdist/
|
|
26
|
+
var/
|
|
27
|
+
wheels/
|
|
28
|
+
share/python-wheels/
|
|
29
|
+
*.egg-info/
|
|
30
|
+
.installed.cfg
|
|
31
|
+
*.egg
|
|
32
|
+
*.bat
|
|
33
|
+
MANIFEST
|
|
34
|
+
|
|
35
|
+
# PyInstaller
|
|
36
|
+
# Usually these files are written by a python script from a template
|
|
37
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
38
|
+
*.manifest
|
|
39
|
+
*.spec
|
|
40
|
+
|
|
41
|
+
# Installer logs
|
|
42
|
+
pip-log.txt
|
|
43
|
+
pip-delete-this-directory.txt
|
|
44
|
+
|
|
45
|
+
# Unit test / coverage reports
|
|
46
|
+
htmlcov/
|
|
47
|
+
.tox/
|
|
48
|
+
.nox/
|
|
49
|
+
.coverage
|
|
50
|
+
.coverage.*
|
|
51
|
+
.cache
|
|
52
|
+
nosetests.xml
|
|
53
|
+
coverage.xml
|
|
54
|
+
*.cover
|
|
55
|
+
*.py,cover
|
|
56
|
+
.hypothesis/
|
|
57
|
+
.pytest_cache/
|
|
58
|
+
cover/
|
|
59
|
+
|
|
60
|
+
# Translations
|
|
61
|
+
*.mo
|
|
62
|
+
*.pot
|
|
63
|
+
|
|
64
|
+
# Django stuff:
|
|
65
|
+
*.log
|
|
66
|
+
local_settings.py
|
|
67
|
+
db.sqlite3
|
|
68
|
+
db.sqlite3-journal
|
|
69
|
+
|
|
70
|
+
# Flask stuff:
|
|
71
|
+
instance/
|
|
72
|
+
.webassets-cache
|
|
73
|
+
|
|
74
|
+
# Scrapy stuff:
|
|
75
|
+
.scrapy
|
|
76
|
+
|
|
77
|
+
# Sphinx documentation
|
|
78
|
+
docs/_build/
|
|
79
|
+
docs/sphinx/_build/
|
|
80
|
+
|
|
81
|
+
# PyBuilder
|
|
82
|
+
.pybuilder/
|
|
83
|
+
target/
|
|
84
|
+
|
|
85
|
+
# Jupyter Notebook
|
|
86
|
+
.ipynb_checkpoints
|
|
87
|
+
|
|
88
|
+
# IPython
|
|
89
|
+
profile_default/
|
|
90
|
+
ipython_config.py
|
|
91
|
+
|
|
92
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
93
|
+
__pypackages__/
|
|
94
|
+
|
|
95
|
+
# Celery stuff
|
|
96
|
+
celerybeat-schedule
|
|
97
|
+
celerybeat.pid
|
|
98
|
+
|
|
99
|
+
# SageMath parsed files
|
|
100
|
+
*.sage.py
|
|
101
|
+
|
|
102
|
+
# Environments
|
|
103
|
+
.env
|
|
104
|
+
.venv
|
|
105
|
+
env/
|
|
106
|
+
venv/
|
|
107
|
+
ENV/
|
|
108
|
+
env.bak/
|
|
109
|
+
venv.bak/
|
|
110
|
+
|
|
111
|
+
# Spyder project settings
|
|
112
|
+
.spyderproject
|
|
113
|
+
.spyproject
|
|
114
|
+
|
|
115
|
+
# Rope project settings
|
|
116
|
+
.ropeproject
|
|
117
|
+
|
|
118
|
+
# mkdocs documentation
|
|
119
|
+
/site
|
|
120
|
+
|
|
121
|
+
# mypy
|
|
122
|
+
.mypy_cache/
|
|
123
|
+
.dmypy.json
|
|
124
|
+
dmypy.json
|
|
125
|
+
|
|
126
|
+
# Pyre type checker
|
|
127
|
+
.pyre/
|
|
128
|
+
|
|
129
|
+
# pytype static type analyzer
|
|
130
|
+
.pytype/
|
|
131
|
+
|
|
132
|
+
# Cython debug symbols
|
|
133
|
+
cython_debug/
|
|
134
|
+
|
|
135
|
+
# End of https://www.toptal.com/developers/gitignore/api/python
|
|
136
|
+
|
|
137
|
+
# Utility files
|
|
138
|
+
.claude/
|
|
139
|
+
|
|
140
|
+
# Outputs okflint (rapports d'audit — toujours régénérables)
|
|
141
|
+
.okflint/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|