Skip to content

Commit 79bf180

Browse files
committed
Renamed command fix to project:fix
1 parent c564fa0 commit 79bf180

File tree

12 files changed

+23
-21
lines changed

12 files changed

+23
-21
lines changed

doc/user_guide/getting_started.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,20 @@ You are ready to use the toolbox. With *nox -l* you can list all available tasks
184184
$ nox -l
185185
Sessions defined in <PATH_TO_YOUR_PROJECT>/noxfile.py:
186186
187-
* fix -> Runs all automated fixes on the code base
188-
- check -> Runs all available checks on the project
187+
- docs:multiversion -> Builds the project documentation
188+
- docs:build -> Builds the project documentation
189+
- docs:open -> Opens the built project documentation
190+
- docs:clean -> Removes the documentations build folder
191+
- project:fix -> Runs all automated fixes on the code base
189192
- lint:code -> Runs the static code analyzer on the project
190193
- lint:typing -> Runs the type checker on the project
191194
- lint:security -> Runs the security linter on the project
195+
- report -> Collects and generates metrics summary for the workspace
196+
- release:prepare -> Prepares the project for a new release.
192197
- unit-tests -> Runs all unit tests
193198
- integration-tests -> Runs the all integration tests
194199
- coverage -> Runs all tests (unit + integration) and reports the code coverage
195-
- docs:build -> Builds the project documentation
196-
- docs:open -> Opens the built project documentation
197-
- docs:clean -> Removes the documentations build folder
198-
- report -> Collects and generates a metrics summary for the workspace
200+
- check -> Runs all available checks on the project
199201
200202
sessions marked with * are selected, sessions marked with - are skipped.
201203

exasol/toolbox/nox/_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _pyupgrade(session: Session, files: Iterable[str]) -> None:
3333
)
3434

3535

36-
@nox.session(python=False)
36+
@nox.session(name="project:fix", python=False)
3737
def fix(session: Session) -> None:
3838
"""Runs all automated fixes on the code base"""
3939
py_files = [f"{file}" for file in python_files(PROJECT_CONFIG.root)]

exasol/toolbox/nox/_lint.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,4 @@ def type_check(session: Session) -> None:
8383
def security_lint(session: Session) -> None:
8484
"""Runs the security linter on the project"""
8585
py_files = [f"{file}" for file in python_files(PROJECT_CONFIG.root)]
86-
_security_lint(session, list(
87-
filter(lambda file: "test" not in file, py_files)))
86+
_security_lint(session, list(filter(lambda file: "test" not in file, py_files)))

exasol/toolbox/nox/_release.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
def _create_parser() -> argparse.ArgumentParser:
3030
parser = argparse.ArgumentParser(
31-
prog="nox -s release:prepare",
32-
usage="nox -s release:prepare -- [-h] version",
31+
prog="nox -s release:prepare",
32+
usage="nox -s release:prepare -- [-h] version",
3333
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
3434
)
3535
parser.add_argument(
@@ -146,4 +146,3 @@ def prepare_release(session: Session, python=False) -> None:
146146
"--body",
147147
'""',
148148
)
149-

exasol/toolbox/pre_commit_hooks/package_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
_VERSION_MODULE_TEMPLATE = cleandoc('''
2525
# ATTENTION:
2626
# This file is generated by exasol/toolbox/pre_commit_hooks/package_version.py when using:
27-
# * either "poetry run nox -s fix"
27+
# * either "poetry run nox -s project:fix"
2828
# * or "poetry run version-check <path/version.py> --fix"
2929
# Do not edit this file manually!
3030
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.

exasol/toolbox/sphinx/multiversion/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,9 @@ def _main(args, argv):
575575
os.path.join(args.outputdir, "index.html"), "w", encoding="utf-8"
576576
) as f:
577577
versions = [
578-
ref.name for ref in gitrefs if re.match(config.smv_tag_whitelist, ref.name)
578+
ref.name
579+
for ref in gitrefs
580+
if re.match(config.smv_tag_whitelist, ref.name)
579581
]
580582
versions = sorted(
581583
versions, key=lambda v: ExasolVersion.from_string(v), reverse=True

exasol/toolbox/templates/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from exasol.toolbox.nox.tasks import *
55

66
# default actions to be run if nothing is explicitly specified with the -s option
7-
nox.options.sessions = ["fix"]
7+
nox.options.sessions = ["project:fix"]

exasol/toolbox/templates/pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
types: [ python ]
99
pass_filenames: false
1010
language: system
11-
entry: poetry run nox -s fix
11+
entry: poetry run nox -s project:fix
1212

1313
- repo: local
1414
hooks:
@@ -26,7 +26,7 @@ repos:
2626
types: [ python ]
2727
pass_filenames: false
2828
language: system
29-
entry: poetry run nox -s lint
29+
entry: poetry run nox -s lint:code
3030

3131
- repo: https://github.com/pre-commit/pre-commit-hooks
3232
rev: v4.4.0

exasol/toolbox/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ATTENTION:
22
# This file is generated by exasol/toolbox/pre_commit_hooks/package_version.py when using:
3-
# * either "poetry run nox -s fix"
3+
# * either "poetry run nox -s project:fix"
44
# * or "poetry run version-check <path/version.py> --fix"
55
# Do not edit this file manually!
66
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from exasol.toolbox.nox.tasks import * # pylint: disable=wildcard-import disable=unused-wildcard-import
77

88
# default actions to be run if nothing is explicitly specified with the -s option
9-
nox.options.sessions = ["fix"]
9+
nox.options.sessions = ["project:fix"]
1010

1111

1212
# entry point for debugging

0 commit comments

Comments
 (0)