Skip to content

Commit 242f832

Browse files
authored
Update repo (#20)
* update project * update installer config * update test and pre-commit cfg
1 parent f263c6a commit 242f832

8 files changed

Lines changed: 120 additions & 121 deletions

File tree

.github/workflows/pytest-cookies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os: [ubuntu-18.04]
11-
py: ['3.8']
10+
os: [ubuntu-latest]
11+
py: ['3.11']
1212
steps:
1313
- uses: actions/checkout@v2
1414
- uses: actions/setup-python@v1

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ repos:
99
rev: 5.12.0
1010
hooks:
1111
- id: isort
12+
# ----- repo maintenance -----
13+
- repo: https://github.com/tox-dev/pyproject-fmt
14+
rev: "1.5.1"
15+
hooks:
16+
- id: pyproject-fmt
17+
exclude: "^{{ cookiecutter.project_slug }}/pyproject.toml"
18+
- repo: https://github.com/abravalheri/validate-pyproject
19+
rev: "v0.15"
20+
hooks:
21+
- id: validate-pyproject

hooks/post_gen_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77

88
subprocess.call(["git", "tag", "1.0.0"])
99

10-
subprocess.call(["python", "setup.py", "--version"])
10+
subprocess.call(["python", "-m", "setuptools_scm"])
1111
{% endif %}

pyproject.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools",
5+
"setuptools_scm",
6+
]
7+
8+
[project]
9+
name = "weldx-quality-standard-cookiecutter-template"
10+
version = "0.2.0"
11+
description = "A cookiecutter template to generate WelDX quality standards"
12+
[project.readme]
13+
file = "README.md"
14+
content-type = "text/markdown"
15+
16+
license = {text = "BSD 3-Clause"}
17+
authors = [{name = "Cagtay Fabry", email = "Cagtay.Fabry@bam.de"}]
18+
requires-python = ">=3.9"
19+
classifiers = [
20+
"Programming Language :: Python :: 3 :: Only",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
]
26+
dependencies = [
27+
"cookiecutter",
28+
]
29+
[project.optional-dependencies]
30+
test = [
31+
"pytest",
32+
"pytest-cookies",
33+
]
34+
[project.urls]
35+
Homepage = '"https://github.com/BAMWeldx/quality-standard-template",'
36+
37+
[tool.setuptools]
38+
license-files = ["LICENSE"]
39+
include-package-data = false
40+
41+
[tool.isort]
42+
profile = "black"
43+
default_section = "THIRDPARTY"
44+
known_first_party = ["weldx"]
45+
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
46+
47+
[tool.pytest.ini_options]
48+
addopts = "--color=yes"
49+
testpaths = ["tests"]

setup.cfg

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,60 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools_scm"]
32
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools>=64",
5+
"setuptools_scm>=8",
6+
"wheel",
7+
]
8+
9+
[project]
10+
name = "{{ cookiecutter.project_slug }}"
11+
description = "{{ cookiecutter.description }}"
12+
readme = "README.md"
13+
urls = {Homepage = "{{ cookiecutter.url }}"}
14+
license = {file = "LICENSE", name="BSD License"}
15+
authors = [
16+
{name="{{ cookiecutter.author }}", email="{{ cookiecutter.author_email }}"},
17+
]
18+
requires-python = ">=3.9"
19+
classifiers = [
20+
"Programming Language :: Python :: 3 :: Only",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
]
26+
dynamic = [
27+
# see: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata
28+
"version", # version gets derived from git by setuptools_scm.
29+
]
30+
dependencies = [
31+
"asdf",
32+
'importlib_resources>=3; python_version < "3.9"',
33+
"weldx",
34+
]
35+
[project.optional-dependencies]
36+
test = [
37+
"pytest",
38+
]
39+
[project.entry-points."weldx.standard"]
40+
"{{ cookiecutter.project_slug}}" = "{{ cookiecutter.project_slug }}.integration:get_quality_standard"
41+
42+
[tool.setuptools]
43+
zip-safe = true
44+
license-files = ["LICENSE"]
45+
include-package-data = true
46+
[tool.setuptools.package-data]
47+
quality_standard_demo = ["*.yaml", "**/*.yaml", "**/**/*.yaml"]
48+
49+
[tool.setuptools_scm]
50+
write_to = "src/{{ cookiecutter.project_slug }}/_version.py"
51+
write_to_template = '__version__ = "{version}"'
52+
53+
[tool.pytest.ini_options]
54+
asdf_schema_root = "resources/{{ cookiecutter.organization_name }}/schemas"
55+
asdf_schema_tests_enabled = true
56+
asdf_schema_ignore_unrecognized_tag = true
57+
testpaths = [
58+
# tests
59+
"resources",
60+
]

{{ cookiecutter.project_slug }}/setup.cfg

Lines changed: 0 additions & 41 deletions
This file was deleted.

{{ cookiecutter.project_slug }}/setup.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)