throttle-controller 0.0.6__tar.gz → 0.0.8__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.
- throttle_controller-0.0.8/.coveragerc +4 -0
- throttle_controller-0.0.8/.editorconfig +10 -0
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/.github/renovate.json5 +1 -1
- throttle_controller-0.0.8/.github/workflows/gitignore-in.yml +16 -0
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/.github/workflows/happy.yml +1 -1
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/.github/workflows/pypi-publish.yml +11 -20
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/.github/workflows/python-test.yml +22 -24
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/.github/workflows/spellcheck.yml +3 -2
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/.gitignore +17 -12
- throttle_controller-0.0.8/.gitignore.in +5 -0
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/LICENSE +1 -1
- throttle_controller-0.0.8/PKG-INFO +81 -0
- throttle_controller-0.0.8/README.md +50 -0
- throttle_controller-0.0.8/pyproject.toml +66 -0
- throttle_controller-0.0.8/setup.cfg +4 -0
- throttle_controller-0.0.8/template_analysis/__init__.py +18 -0
- throttle_controller-0.0.8/template_analysis/_version.py +16 -0
- throttle_controller-0.0.8/template_analysis/analyzer.py +162 -0
- throttle_controller-0.0.8/template_analysis/symbol.py +84 -0
- throttle_controller-0.0.8/template_analysis/template.py +56 -0
- throttle_controller-0.0.8/tests/test_analyzer.py +54 -0
- throttle_controller-0.0.8/tests/test_symbol.py +60 -0
- throttle_controller-0.0.8/tests/test_template.py +16 -0
- throttle_controller-0.0.8/throttle_controller.egg-info/PKG-INFO +81 -0
- throttle_controller-0.0.8/throttle_controller.egg-info/SOURCES.txt +27 -0
- throttle_controller-0.0.8/throttle_controller.egg-info/top_level.txt +1 -0
- throttle_controller-0.0.8/uv.lock +403 -0
- throttle-controller-0.0.6/.coveragerc +0 -7
- throttle-controller-0.0.6/.gitignore.in +0 -10
- throttle-controller-0.0.6/PKG-INFO +0 -60
- throttle-controller-0.0.6/README.md +0 -39
- throttle-controller-0.0.6/poetry.lock +0 -625
- throttle-controller-0.0.6/pyproject.toml +0 -68
- throttle-controller-0.0.6/setup.cfg +0 -46
- throttle-controller-0.0.6/tests/test_simple.py +0 -82
- throttle-controller-0.0.6/tests/test_utils_interval.py +0 -12
- throttle-controller-0.0.6/throttle_controller/__init__.py +0 -2
- throttle-controller-0.0.6/throttle_controller/_version.py +0 -4
- throttle-controller-0.0.6/throttle_controller/protocol.py +0 -38
- throttle-controller-0.0.6/throttle_controller/py.typed +0 -0
- throttle-controller-0.0.6/throttle_controller/simple.py +0 -55
- throttle-controller-0.0.6/throttle_controller/utils/__init__.py +0 -0
- throttle-controller-0.0.6/throttle_controller/utils/interval.py +0 -14
- throttle-controller-0.0.6/throttle_controller.egg-info/PKG-INFO +0 -60
- throttle-controller-0.0.6/throttle_controller.egg-info/SOURCES.txt +0 -28
- throttle-controller-0.0.6/throttle_controller.egg-info/requires.txt +0 -7
- throttle-controller-0.0.6/throttle_controller.egg-info/top_level.txt +0 -2
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/tests/__init__.py +0 -0
- {throttle-controller-0.0.6 → throttle_controller-0.0.8}/throttle_controller.egg-info/dependency_links.txt +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Update gitignore file
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# daily at 00:00
|
|
6
|
+
- cron: '0 0 * * *'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
update-gitignore:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: gitignore-in/gh-action@v0.2.2
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
name: Packaging
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
5
6
|
release:
|
|
6
7
|
# "released" events are emitted either when directly be released or be edited from pre-released.
|
|
7
8
|
types: [prereleased, released]
|
|
@@ -10,32 +11,22 @@ jobs:
|
|
|
10
11
|
deploy:
|
|
11
12
|
runs-on: ubuntu-latest
|
|
12
13
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v4
|
|
14
15
|
|
|
15
16
|
- name: Set up Python
|
|
16
17
|
id: setup-python
|
|
17
|
-
uses: actions/setup-python@
|
|
18
|
+
uses: actions/setup-python@v5
|
|
18
19
|
with:
|
|
19
|
-
python-version: "3.
|
|
20
|
+
python-version: "3.13"
|
|
20
21
|
|
|
21
|
-
- name: Set up
|
|
22
|
-
uses:
|
|
22
|
+
- name: Set up uv
|
|
23
|
+
uses: astral-sh/setup-uv@v5
|
|
23
24
|
|
|
24
|
-
- name:
|
|
25
|
-
|
|
26
|
-
with:
|
|
27
|
-
path: ~/.cache/pypoetry/virtualenvs
|
|
28
|
-
key: ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
|
|
29
|
-
restore-keys: |
|
|
30
|
-
${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
|
|
31
|
-
${{ runner.os }}-build-${{ matrix.python }}-
|
|
32
|
-
${{ runner.os }}-
|
|
33
|
-
|
|
34
|
-
- run: poetry install
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: uv sync
|
|
35
27
|
|
|
36
28
|
- name: Build
|
|
37
|
-
|
|
38
|
-
run: poetry run poe build
|
|
29
|
+
run: uv build
|
|
39
30
|
|
|
40
31
|
- name: Publish distribution to Test PyPI
|
|
41
32
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -43,7 +34,7 @@ jobs:
|
|
|
43
34
|
with:
|
|
44
35
|
user: __token__
|
|
45
36
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
46
|
-
|
|
37
|
+
repository-url: https://test.pypi.org/legacy/
|
|
47
38
|
|
|
48
39
|
- name: Publish distribution to PyPI
|
|
49
40
|
if: github.event_name == 'release' && !github.event.release.prerelease
|
|
@@ -1,46 +1,44 @@
|
|
|
1
1
|
name: Test
|
|
2
|
-
on:
|
|
3
|
-
|
|
2
|
+
on:
|
|
3
|
+
# pull-request events are not triggered when a PR is merged
|
|
4
|
+
# push events are not triggered when a PR created from a fork repository
|
|
5
|
+
# So we need both to run tests on every PR and after merging
|
|
6
|
+
pull_request:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
4
10
|
jobs:
|
|
5
11
|
test:
|
|
6
12
|
runs-on: ubuntu-latest
|
|
7
13
|
strategy:
|
|
8
14
|
fail-fast: false
|
|
9
15
|
matrix:
|
|
10
|
-
python: ["3.
|
|
16
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
11
17
|
|
|
12
18
|
steps:
|
|
13
19
|
- name: Checkout
|
|
14
|
-
uses: actions/checkout@
|
|
20
|
+
uses: actions/checkout@v4
|
|
15
21
|
|
|
16
22
|
- name: Set up Python
|
|
17
23
|
id: setup-python
|
|
18
|
-
uses: actions/setup-python@
|
|
24
|
+
uses: actions/setup-python@v5
|
|
19
25
|
with:
|
|
20
26
|
python-version: "${{ matrix.python }}"
|
|
21
27
|
|
|
22
|
-
- name: Set up
|
|
23
|
-
uses:
|
|
24
|
-
|
|
25
|
-
- name: Cache
|
|
26
|
-
uses: actions/cache@v3
|
|
27
|
-
with:
|
|
28
|
-
path: ~/.cache/pypoetry/virtualenvs
|
|
29
|
-
key: ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
|
|
30
|
-
restore-keys: |
|
|
31
|
-
${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
|
|
32
|
-
${{ runner.os }}-build-${{ matrix.python }}-
|
|
33
|
-
${{ runner.os }}-
|
|
28
|
+
- name: Set up uv
|
|
29
|
+
uses: astral-sh/setup-uv@v5
|
|
34
30
|
|
|
35
31
|
- name: Install dependencies
|
|
36
|
-
run:
|
|
32
|
+
run: |
|
|
33
|
+
uv python pin ${{ matrix.python }}
|
|
34
|
+
uv sync
|
|
37
35
|
|
|
38
36
|
- name: Lint
|
|
39
|
-
run:
|
|
37
|
+
run: uv run poe check
|
|
40
38
|
|
|
41
39
|
- name: Check Python version
|
|
42
40
|
run: |
|
|
43
|
-
actual_version=$(
|
|
41
|
+
actual_version=$(uv run python --version)
|
|
44
42
|
expected_version="Python ${{ matrix.python }}"
|
|
45
43
|
if [ "$actual_version" == *"$expected_version"* ]; then
|
|
46
44
|
echo "Expected $expected_version, but got $actual_version"
|
|
@@ -48,14 +46,14 @@ jobs:
|
|
|
48
46
|
fi
|
|
49
47
|
|
|
50
48
|
- name: Test
|
|
51
|
-
run:
|
|
49
|
+
run: uv run poe test
|
|
52
50
|
|
|
53
51
|
- name: Coverage
|
|
54
|
-
run:
|
|
52
|
+
run: uv run poe coverage-xml
|
|
55
53
|
|
|
56
54
|
- name: Upload coverage report to Codecov
|
|
57
|
-
if: matrix.python == '3.
|
|
58
|
-
uses: codecov/codecov-action@
|
|
55
|
+
if: matrix.python == '3.13'
|
|
56
|
+
uses: codecov/codecov-action@v5
|
|
59
57
|
with:
|
|
60
58
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
61
59
|
files: ./coverage.xml
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
name: Spellcheck
|
|
2
|
-
on:
|
|
2
|
+
on:
|
|
3
|
+
- pull_request
|
|
3
4
|
permissions:
|
|
4
5
|
contents: read
|
|
5
6
|
jobs:
|
|
@@ -7,7 +8,7 @@ jobs:
|
|
|
7
8
|
runs-on: ubuntu-latest
|
|
8
9
|
steps:
|
|
9
10
|
- name: Checkout
|
|
10
|
-
uses: actions/checkout@
|
|
11
|
+
uses: actions/checkout@v4
|
|
11
12
|
|
|
12
13
|
- name: Check spelling
|
|
13
14
|
uses: crate-ci/typos@master
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
# DO NOT EDIT THIS FILE
|
|
2
|
+
# Generated by gitignore.in
|
|
3
|
+
# Edit .gitignore.in instead of this file
|
|
4
|
+
# Run `gitignore.in` to build .gitignore
|
|
5
|
+
# -----------------------------------------------------------------------------
|
|
6
|
+
# gibo dump Linux
|
|
1
7
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
2
|
-
### https://raw.github.com/github/gitignore/
|
|
8
|
+
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/Linux.gitignore
|
|
3
9
|
|
|
4
10
|
*~
|
|
5
11
|
|
|
@@ -14,10 +20,10 @@
|
|
|
14
20
|
|
|
15
21
|
# .nfs files are created when an open file is removed but is still being accessed
|
|
16
22
|
.nfs*
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
# -----------------------------------------------------------------------------
|
|
24
|
+
# gibo dump Windows
|
|
19
25
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
20
|
-
### https://raw.github.com/github/gitignore/
|
|
26
|
+
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/Windows.gitignore
|
|
21
27
|
|
|
22
28
|
# Windows thumbnail cache files
|
|
23
29
|
Thumbs.db
|
|
@@ -43,10 +49,10 @@ $RECYCLE.BIN/
|
|
|
43
49
|
|
|
44
50
|
# Windows shortcuts
|
|
45
51
|
*.lnk
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
# -----------------------------------------------------------------------------
|
|
53
|
+
# gibo dump macOS
|
|
48
54
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
49
|
-
### https://raw.github.com/github/gitignore/
|
|
55
|
+
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/macOS.gitignore
|
|
50
56
|
|
|
51
57
|
# General
|
|
52
58
|
.DS_Store
|
|
@@ -74,10 +80,10 @@ Icon
|
|
|
74
80
|
Network Trash Folder
|
|
75
81
|
Temporary Items
|
|
76
82
|
.apdisk
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
# -----------------------------------------------------------------------------
|
|
84
|
+
# gibo dump Python
|
|
79
85
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
80
|
-
### https://raw.github.com/github/gitignore/
|
|
86
|
+
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Python.gitignore
|
|
81
87
|
|
|
82
88
|
# Byte-compiled / optimized / DLL files
|
|
83
89
|
__pycache__/
|
|
@@ -239,6 +245,5 @@ cython_debug/
|
|
|
239
245
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
240
246
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
241
247
|
#.idea/
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
# -----------------------------------------------------------------------------
|
|
244
249
|
_version.py
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: throttle-controller
|
|
3
|
+
Version: 0.0.8
|
|
4
|
+
Summary: Create template from strings (reverse template engine)
|
|
5
|
+
Author-email: Yui KITSU <kitsuyui+github@kitsuyui.com>
|
|
6
|
+
License: Copyright 2022-2025 Kitsu Yui
|
|
7
|
+
|
|
8
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
9
|
+
|
|
10
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
17
|
+
|
|
18
|
+
Project-URL: Homepage, https://github.com/kitsuyui/python-template-analysis
|
|
19
|
+
Classifier: Development Status :: 3 - Alpha
|
|
20
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Intended Audience :: Developers
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
28
|
+
Requires-Python: >=3.9
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
|
|
32
|
+
# template-analysis
|
|
33
|
+
|
|
34
|
+
[](https://badge.fury.io/py/template-analysis)
|
|
35
|
+
[](https://pypi.python.org/pypi/template-analysis/)
|
|
36
|
+
[](https://codecov.io/gh/kitsuyui/python-template-analysis)
|
|
37
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
38
|
+
|
|
39
|
+
Generate template and extract variables from texts.
|
|
40
|
+
In other words, template-analysis makes reverse template (untemplate).
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
Currently, this supports to analyze only two texts.
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from template_analysis import analyze
|
|
48
|
+
result = analyze([
|
|
49
|
+
"A dog is a good pet",
|
|
50
|
+
"A cat is a good pet",
|
|
51
|
+
"A cat is a pretty pet",
|
|
52
|
+
"A bird is a great pet",
|
|
53
|
+
])
|
|
54
|
+
result.to_format_string() # => "A {} is a {} pet"
|
|
55
|
+
result.args[0] # => ["dog", "good"]
|
|
56
|
+
result.args[1] # => ["cat", "good"]
|
|
57
|
+
result.args[2] # => ["cat", "pretty"]
|
|
58
|
+
result.args[3] # => ["bird", "great"]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Concepts / Future plans
|
|
62
|
+
|
|
63
|
+
### Development plans
|
|
64
|
+
|
|
65
|
+
- [x] 1. Untemplate two texts.
|
|
66
|
+
- [x] 2. Untemplate multiple / complex texts.
|
|
67
|
+
- [ ] 3. Untemplate nested / tree-structured texts.
|
|
68
|
+
- [ ] 4. Support several features for scraping.
|
|
69
|
+
- [ ] 5. Implement a more efficient algorithm.
|
|
70
|
+
|
|
71
|
+
### Image boards
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+

|
|
75
|
+

|
|
76
|
+

|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
The 3-Clause BSD License. See also LICENSE file.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# template-analysis
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/template-analysis)
|
|
4
|
+
[](https://pypi.python.org/pypi/template-analysis/)
|
|
5
|
+
[](https://codecov.io/gh/kitsuyui/python-template-analysis)
|
|
6
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
7
|
+
|
|
8
|
+
Generate template and extract variables from texts.
|
|
9
|
+
In other words, template-analysis makes reverse template (untemplate).
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Currently, this supports to analyze only two texts.
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from template_analysis import analyze
|
|
17
|
+
result = analyze([
|
|
18
|
+
"A dog is a good pet",
|
|
19
|
+
"A cat is a good pet",
|
|
20
|
+
"A cat is a pretty pet",
|
|
21
|
+
"A bird is a great pet",
|
|
22
|
+
])
|
|
23
|
+
result.to_format_string() # => "A {} is a {} pet"
|
|
24
|
+
result.args[0] # => ["dog", "good"]
|
|
25
|
+
result.args[1] # => ["cat", "good"]
|
|
26
|
+
result.args[2] # => ["cat", "pretty"]
|
|
27
|
+
result.args[3] # => ["bird", "great"]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Concepts / Future plans
|
|
31
|
+
|
|
32
|
+
### Development plans
|
|
33
|
+
|
|
34
|
+
- [x] 1. Untemplate two texts.
|
|
35
|
+
- [x] 2. Untemplate multiple / complex texts.
|
|
36
|
+
- [ ] 3. Untemplate nested / tree-structured texts.
|
|
37
|
+
- [ ] 4. Support several features for scraping.
|
|
38
|
+
- [ ] 5. Implement a more efficient algorithm.
|
|
39
|
+
|
|
40
|
+
### Image boards
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+

|
|
44
|
+

|
|
45
|
+

|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
The 3-Clause BSD License. See also LICENSE file.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "throttle-controller"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
requires-python = ">=3.9"
|
|
5
|
+
dependencies = []
|
|
6
|
+
description = "Create template from strings (reverse template engine)"
|
|
7
|
+
readme = {file = "README.md", content-type = "text/markdown"}
|
|
8
|
+
license = { file = "LICENSE" }
|
|
9
|
+
authors = [
|
|
10
|
+
{name = "Yui KITSU", email = "kitsuyui+github@kitsuyui.com"}
|
|
11
|
+
]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"License :: OSI Approved :: BSD License",
|
|
15
|
+
"Programming Language :: Python :: 3.9",
|
|
16
|
+
"Programming Language :: Python :: 3.10",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"Topic :: Software Development :: Libraries",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://github.com/kitsuyui/python-template-analysis"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools]
|
|
28
|
+
package-data = { "template_analysis" = ["py.typed"], "*" = ["README.md, LICENSE"] }
|
|
29
|
+
package-dir = { "template_analysis" = "template_analysis" }
|
|
30
|
+
|
|
31
|
+
[tool.uv]
|
|
32
|
+
dev-dependencies = [
|
|
33
|
+
"pytest",
|
|
34
|
+
"pytest-cov",
|
|
35
|
+
"poethepoet",
|
|
36
|
+
"setuptools-scm",
|
|
37
|
+
"ruff",
|
|
38
|
+
"mypy",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[build-system]
|
|
42
|
+
requires = ["setuptools", "setuptools_scm"]
|
|
43
|
+
build-backend = "setuptools.build_meta"
|
|
44
|
+
|
|
45
|
+
[tool.setuptools_scm]
|
|
46
|
+
write_to = "template_analysis/_version.py"
|
|
47
|
+
version_scheme = "only-version"
|
|
48
|
+
local_scheme = "no-local-version"
|
|
49
|
+
|
|
50
|
+
[tool.poe.tasks]
|
|
51
|
+
test = "pytest"
|
|
52
|
+
coverage-xml = "pytest --cov=template_analysis --doctest-modules --cov-report=xml"
|
|
53
|
+
format = "ruff format template_analysis"
|
|
54
|
+
check = [
|
|
55
|
+
{ cmd = "ruff check template_analysis" },
|
|
56
|
+
{ cmd = "mypy template_analysis" },
|
|
57
|
+
]
|
|
58
|
+
build = [{ cmd = "python -m build" }]
|
|
59
|
+
|
|
60
|
+
[tool.mypy]
|
|
61
|
+
# https://mypy.readthedocs.io/en/latest/config_file.html
|
|
62
|
+
strict = true
|
|
63
|
+
ignore_missing_imports = false
|
|
64
|
+
|
|
65
|
+
[tool.ruff]
|
|
66
|
+
line-length = 79
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Template analysis.
|
|
2
|
+
|
|
3
|
+
This library does the opposite of template engines.
|
|
4
|
+
Template engines take a template and data, and return a formatted string.
|
|
5
|
+
This library takes a formatted string and returns a template and data."""
|
|
6
|
+
|
|
7
|
+
from .analyzer import Analyzer, AnalyzerResult, analyze # noqa: F401
|
|
8
|
+
|
|
9
|
+
# https://packaging-guide.openastronomy.org/en/latest/advanced/versioning.html
|
|
10
|
+
from ._version import __version__
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"Analyzer",
|
|
15
|
+
"AnalyzerResult",
|
|
16
|
+
"analyze",
|
|
17
|
+
"__version__",
|
|
18
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# file generated by setuptools_scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
TYPE_CHECKING = False
|
|
4
|
+
if TYPE_CHECKING:
|
|
5
|
+
from typing import Tuple, Union
|
|
6
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
+
else:
|
|
8
|
+
VERSION_TUPLE = object
|
|
9
|
+
|
|
10
|
+
version: str
|
|
11
|
+
__version__: str
|
|
12
|
+
__version_tuple__: VERSION_TUPLE
|
|
13
|
+
version_tuple: VERSION_TUPLE
|
|
14
|
+
|
|
15
|
+
__version__ = version = '0.0.8'
|
|
16
|
+
__version_tuple__ = version_tuple = (0, 0, 8)
|