FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cookiecutter-robust-python/tests/constants.py at develop · robust-python/cookiecutter-robust-python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
robust-python
/
cookiecutter-robust-python
Public
Notifications
You must be signed in to change notification settings
Fork
5
Star
23
Code
Issues
5
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cookiecutter-robust-python
/
tests
/
constants.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
43 lines (35 loc) · 1.48 KB
Breadcrumbs
cookiecutter-robust-python
/
tests
/
constants.py
Copy path
File metadata and controls
43 lines (35 loc) · 1.48 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""Module containing constants used throughout all tests."""
import
json
from
pathlib
import
Path
from
typing
import
Any
REPO_FOLDER
:
Path
=
Path
(
__file__
).
parent
.
parent
COOKIECUTTER_FOLDER
:
Path
=
REPO_FOLDER
/
"{{cookiecutter.project_name}}"
HOOKS_FOLDER
:
Path
=
REPO_FOLDER
/
"hooks"
SCRIPTS_FOLDER
:
Path
=
REPO_FOLDER
/
"scripts"
GITHUB_ACTIONS_FOLDER
:
Path
=
COOKIECUTTER_FOLDER
/
".github"
COOKIECUTTER_JSON_PATH
:
Path
=
REPO_FOLDER
/
"cookiecutter.json"
COOKIECUTTER_JSON
:
dict
[
str
,
Any
]
=
json
.
loads
(
COOKIECUTTER_JSON_PATH
.
read_text
())
MIN_PYTHON_SLUG
:
int
=
int
(
COOKIECUTTER_JSON
[
"min_python_version"
].
lstrip
(
"3."
))
MAX_PYTHON_SLUG
:
int
=
int
(
COOKIECUTTER_JSON
[
"max_python_version"
].
lstrip
(
"3."
))
PYTHON_VERSIONS
:
list
[
str
]
=
[
f"3.
{
VERSION_SLUG
}
"
for
VERSION_SLUG
in
range
(
MIN_PYTHON_SLUG
,
MAX_PYTHON_SLUG
+
1
)]
DEFAULT_PYTHON_VERSION
:
str
=
PYTHON_VERSIONS
[
1
]
TYPE_CHECK_NOX_SESSIONS
:
list
[
str
]
=
[
f"typecheck-
{
python_version
}
"
for
python_version
in
PYTHON_VERSIONS
]
TESTS_NOX_SESSIONS
:
list
[
str
]
=
[
f"tests-python-
{
python_version
}
"
for
python_version
in
PYTHON_VERSIONS
]
IDEMPOTENT_NOX_SESSIONS
:
list
[
str
]
=
[
"pre-commit"
,
"lint-python"
,
"format-python"
,
*
TYPE_CHECK_NOX_SESSIONS
,
*
TESTS_NOX_SESSIONS
,
"build-docs"
,
"build-python"
,
"build-container"
,
"tox"
,
"coverage"
,
]
CONTEXT_DEPENDENT_NOX_SESSIONS
:
list
[
str
]
=
[
"coverage"
,
"publish-python"
,
"release"
,
]
ALL_NOX_SESSIONS
:
list
[
str
]
=
IDEMPOTENT_NOX_SESSIONS
+
CONTEXT_DEPENDENT_NOX_SESSIONS
Back
|
FazBrowse Home
|
New Git URL