Skip to content

Commit 091e3f1

Browse files
authored
Merge pull request #13 from MAK-Relic-Tool/argparser
Migrations for SGA 2.0.0
2 parents 7b28a78 + f0fdf10 commit 091e3f1

16 files changed

Lines changed: 481 additions & 168 deletions

.github/workflows/black.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
workflow_dispatch:
55

66
push:
7-
branches: [ main, staging ]
7+
branches: [main, staging]
88
paths:
9-
- 'src/relic/**'
10-
- '.github/workflows/black.yml'
9+
- src/relic/**
10+
- .github/workflows/black.yml
1111
pull_request:
12-
branches: [ main, staging ]
12+
branches: [main, staging]
1313
paths:
14-
- 'src/relic/**'
15-
- '.github/workflows/black.yml'
14+
- src/relic/**
15+
- .github/workflows/black.yml
1616

1717
jobs:
1818
black:

.github/workflows/mypy.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ on:
44
workflow_dispatch:
55

66
push:
7-
branches: [ main, staging ]
7+
branches: [main, staging]
88
paths:
9-
- 'src/relic/**'
10-
- '.github/workflows/mypy.yml'
11-
- 'mypy.ini'
9+
- src/relic/**
10+
- .github/workflows/mypy.yml
11+
- pyproject.toml
1212
pull_request:
13-
branches: [ main, staging ]
13+
branches: [main, staging]
1414
paths:
15-
- 'src/relic/**'
16-
- '.github/workflows/mypy.yml'
17-
- 'mypy.ini'
15+
- src/relic/**
16+
- .github/workflows/mypy.yml
17+
- pyproject.toml
1818

1919
jobs:
2020
mypy:
2121
uses: MAK-Relic-Tool/Workflows/.github/workflows/mypy.yml@main
2222
with:
23-
package: "relic.core"
24-
mypy-config: "pyproject.toml"
23+
package: relic.core
24+
mypy-config: pyproject.toml

.github/workflows/pylint.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ on:
44
workflow_dispatch:
55

66
push:
7-
branches: [ main, staging ]
7+
branches: [main, staging]
88
paths:
9-
- 'src/**'
10-
- '.github/workflows/pylint.yml'
11-
- '.pylintrc'
12-
- 'requirements.txt'
9+
- src/**
10+
- .github/workflows/pylint.yml
11+
- .pylintrc
12+
- requirements.txt
1313
pull_request:
14-
branches: [ main, staging ]
14+
branches: [main, staging]
1515
paths:
16-
- 'src/**'
17-
- '.github/workflows/pylint.yml'
18-
- '.pylintrc'
19-
- 'requirements.txt'
16+
- src/**
17+
- .github/workflows/pylint.yml
18+
- .pylintrc
19+
- requirements.txt
2020

2121
jobs:
2222
pylint:
2323
uses: MAK-Relic-Tool/Workflows/.github/workflows/pylint.yml@main
2424
with:
25-
path: "src"
25+
path: src

.github/workflows/pytest.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,24 @@ on:
44
workflow_dispatch:
55

66
push:
7-
branches: [ main, staging ]
7+
branches: [main, staging]
88
paths:
9-
- 'src/**'
10-
- 'tests/**'
11-
- '.github/workflows/pytest.yml'
12-
- 'setup.cfg'
13-
- 'setup.py'
14-
- 'MANIFEST.in'
15-
- 'test-requirements.txt'
9+
- src/**
10+
- tests/**
11+
- .github/workflows/pytest.yml
12+
- pyproject.toml
13+
- MANIFEST.in
14+
- test-requirements.txt
1615

1716
pull_request:
18-
branches: [ main, staging ]
17+
branches: [main, staging]
1918
paths:
20-
- 'src/**'
21-
- 'tests/**'
22-
- '.github/workflows/pytest.yml'
23-
- 'setup.cfg'
24-
- 'setup.py'
25-
- 'MANIFEST.in'
26-
- 'test-requirements.txt'
19+
- src/**
20+
- tests/**
21+
- .github/workflows/pytest.yml
22+
- pyproject.toml
23+
- MANIFEST.in
24+
- test-requirements.txt
2725

2826
jobs:
2927
pytest:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ __pycache__/
1212
src/**/*.egg-info/*
1313
dist/*
1414

15+
# Ignore MyPy
16+
.mypy_cache/
17+
1518
# Ignore docs
1619
## Ignore compiled docs
1720
docs/build/**

.pre-commit-config.yaml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.3.0
4-
hooks:
5-
- id: check-yaml
6-
- id: end-of-file-fixer
7-
- id: trailing-whitespace
8-
- id: check-case-conflict
9-
- id: check-docstring-first
10-
- id: check-json
11-
- id: pretty-format-json
12-
- id: check-merge-conflict
13-
- id: check-toml
14-
- id: check-yaml
15-
- id: mixed-line-ending
16-
- id: requirements-txt-fixer
17-
- repo: https://github.com/psf/black
18-
rev: 24.1.1
19-
hooks:
20-
- id: black
21-
- repo: https://github.com/pre-commit/mirrors-mypy
22-
rev: v1.8.0
23-
hooks:
24-
- id: mypy
25-
args: [--explicit-package-bases, --namespace-packages]
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
# - id: check-case-conflict
9+
- id: check-docstring-first
10+
- id: check-json
11+
- id: pretty-format-json
12+
- id: check-merge-conflict
13+
- id: check-toml
14+
- id: check-yaml
15+
- id: mixed-line-ending
16+
- id: requirements-txt-fixer
17+
- repo: https://github.com/psf/black
18+
rev: 24.1.1
19+
hooks:
20+
- id: black
21+
- repo: https://github.com/pre-commit/mirrors-mypy
22+
rev: v1.8.0
23+
hooks:
24+
- id: mypy
25+
args: [--explicit-package-bases, --namespace-packages]
26+
27+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
28+
rev: v2.12.0
29+
hooks:
30+
- id: pretty-format-yaml
31+
args: [--autofix]
32+
- id: pretty-format-toml
33+
args: [--autofix]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Relic Tool - Core
22
[![PyPI](https://img.shields.io/pypi/v/relic-tool-core)](https://pypi.org/project/relic-tool-core/)
3-
[![PyPI - Python Version](https://img.shields.io/pypi/v/relic-tool-core)](https://www.python.org/downloads/)
3+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/relic-tool-core)](https://www.python.org/downloads/)
44
[![PyPI - License](https://img.shields.io/pypi/l/relic-tool-core)](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/blob/main/LICENSE.txt)
55
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
66
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)

pyproject.toml

Lines changed: 66 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
[build-system]
2-
requires = ["setuptools>=61.2"]
32
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools>=61.2"]
44

55
[project]
6-
name = "relic-tool-core"
76
authors = [{name = "Marcus Kertesz"}]
8-
description = "The core library used by other Relic-Tool packages."
97
classifiers = [
10-
"Programming Language :: Python :: 3 :: Only",
11-
"Programming Language :: Python :: 3.9",
12-
"Programming Language :: Python :: 3.10",
13-
"Programming Language :: Python :: 3.11",
14-
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
8+
"Programming Language :: Python :: 3 :: Only",
9+
"Programming Language :: Python :: 3.9",
10+
"Programming Language :: Python :: 3.10",
11+
"Programming Language :: Python :: 3.11",
12+
"Programming Language :: Python :: 3.12",
13+
"Programming Language :: Python :: 3.13",
14+
"Typing :: Typed",
15+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
1516
]
16-
requires-python = ">=3.9"
17-
dependencies = ["typing-extensions; python_version < '3.12'"]
17+
dependencies = [
18+
"typing-extensions; python_version < '3.12'",
19+
"importlib_metadata >= 6.5; python_version < '3.12'"
20+
]
21+
description = "The core library used by other Relic-Tool packages."
1822
dynamic = ["version"]
23+
name = "relic-tool-core"
24+
requires-python = ">=3.9"
1925

2026
[project.readme]
21-
file = "README.md"
2227
content-type = "text/markdown"
23-
24-
[project.urls]
25-
Homepage = "https://github.com/MAK-Relic-Tool/Relic-Tool-Core"
26-
"Bug Tracker" = "https://github.com/MAK-Relic-Tool/Issues-Tracker/issues"
28+
file = "README.md"
2729

2830
[project.scripts]
2931
relic = "relic.core.cli:CLI.run"
3032

31-
[tool.setuptools]
32-
include-package-data = true
33-
package-dir = {"" = "src"}
34-
35-
[tool.setuptools.packages.find]
36-
where = ["src"]
37-
namespaces = true
38-
39-
[tool.setuptools.dynamic]
40-
version = {attr = "relic.core.__version__"}
33+
[project.urls]
34+
"Bug Tracker" = "https://github.com/MAK-Relic-Tool/Issues-Tracker/issues"
35+
Homepage = "https://github.com/MAK-Relic-Tool/Relic-Tool-Core"
4136

4237
[tool.mypy]
43-
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
44-
warn_unused_configs = true
38+
check_untyped_defs = true
4539
disallow_any_generics = true
40+
disallow_incomplete_defs = true
4641
disallow_subclassing_any = true
4742
disallow_untyped_calls = true
48-
disallow_untyped_defs = true
49-
disallow_incomplete_defs = true
50-
check_untyped_defs = true
5143
disallow_untyped_decorators = true
44+
disallow_untyped_defs = true
45+
extra_checks = true
46+
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
5247
no_implicit_optional = true
53-
warn_redundant_casts = true
54-
warn_unused_ignores = true
55-
warn_return_any = true
5648
no_implicit_reexport = true
5749
strict_equality = true
58-
extra_checks = true
50+
warn_redundant_casts = true
51+
warn_return_any = true
52+
warn_unused_configs = true
53+
warn_unused_ignores = true
5954

6055
[[tool.mypy.overrides]]
61-
module = ["serialization_tools.*"]
6256
ignore_missing_imports = true
57+
module = ["serialization_tools.*"]
6358

6459
[[tool.mypy.overrides]]
65-
module = ["tests.*"]
66-
ignore_missing_imports = true
6760
ignore_errors = true
61+
ignore_missing_imports = true
62+
module = ["tests.*"]
6863

6964
[[tool.mypy.overrides]]
70-
module = ["docs.*"]
65+
ignore_errors = true
7166
ignore_missing_imports = true
67+
module = ["docs.*"]
68+
69+
[[tool.mypy.overrides]]
7270
ignore_errors = true
71+
ignore_missing_imports = true
72+
module = ["importlib_metadata.*"]
7373

7474
[tool.semantic_release]
7575
assets = []
@@ -81,47 +81,58 @@ tag_format = "v{version}"
8181
version_variables = ["src/relic/core/__init__.py:__version__"]
8282

8383
[tool.semantic_release.branches.main]
84-
match = "(main|master)"
85-
prerelease_token = "rc"
84+
match = "(main|master|staging)"
8685
prerelease = false
86+
prerelease_token = "rc"
8787

8888
[tool.semantic_release.changelog]
89-
template_dir = "templates"
9089
changelog_file = "CHANGELOG.md"
9190
exclude_commit_patterns = []
91+
template_dir = "templates"
9292

9393
[tool.semantic_release.changelog.environment]
94-
block_start_string = "{%"
94+
autoescape = true
9595
block_end_string = "%}"
96-
variable_start_string = "{{"
97-
variable_end_string = "}}"
98-
comment_start_string = "{#"
96+
block_start_string = "{%"
9997
comment_end_string = "#}"
100-
trim_blocks = false
98+
comment_start_string = "{#"
99+
extensions = []
100+
keep_trailing_newline = false
101101
lstrip_blocks = false
102102
newline_sequence = "\n"
103-
keep_trailing_newline = false
104-
extensions = []
105-
autoescape = true
103+
trim_blocks = false
104+
variable_end_string = "}}"
105+
variable_start_string = "{{"
106106

107107
[tool.semantic_release.commit_author]
108-
env = "GIT_COMMIT_AUTHOR"
109108
default = "semantic-release <semantic-release>"
109+
env = "GIT_COMMIT_AUTHOR"
110110

111111
[tool.semantic_release.commit_parser_options]
112112
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"]
113+
default_bump_level = 0
113114
minor_tags = ["feat"]
114115
patch_tags = ["fix", "perf"]
115-
default_bump_level = 0
116+
117+
[tool.semantic_release.publish]
118+
dist_glob_patterns = ["dist/*"]
119+
upload_to_vcs_release = true
116120

117121
[tool.semantic_release.remote]
122+
ignore_token_for_push = false
118123
name = "origin"
119124
type = "github"
120-
ignore_token_for_push = false
121125

122126
[tool.semantic_release.remote.token]
123127
env = "GH_TOKEN"
124128

125-
[tool.semantic_release.publish]
126-
dist_glob_patterns = ["dist/*"]
127-
upload_to_vcs_release = true
129+
[tool.setuptools]
130+
include-package-data = true
131+
package-dir = {"" = "src"}
132+
133+
[tool.setuptools.dynamic]
134+
version = {attr = "relic.core.__version__"}
135+
136+
[tool.setuptools.packages.find]
137+
namespaces = true
138+
where = ["src"]

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
importlib-metadata>=6.5; python_version < '3.12'
12
typing-extensions; python_version < '3.12'

0 commit comments

Comments
 (0)