Skip to content

Commit d9d1713

Browse files
committed
Add support for custom path filters
1 parent 12eb32d commit d9d1713

File tree

6 files changed

+18
-4
lines changed

6 files changed

+18
-4
lines changed

doc/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
Unreleased
1010
==========
1111

12+
13+
0.3.0 - 2022-12-21
14+
==================
15+
16+
✨ Added
17+
--------
18+
* Added support for custom path filters to config object
19+
1220
.. _changelog-0.2.0:
1321

1422
0.2.0 — 2022-12-20

exasol/toolbox/nox/tasks.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
Enum,
2424
auto,
2525
)
26+
from functools import partial
2627
from pathlib import Path
2728
from typing import (
2829
Any,
@@ -33,13 +34,16 @@
3334
import nox
3435
from nox import Session
3536

36-
from exasol.toolbox.project import python_files
37+
from exasol.toolbox.project import python_files as _python_files
3738
from noxconfig import (
3839
PROJECT_CONFIG,
3940
Config,
4041
)
4142

4243
_DOCS_OUTPUT_DIR = ".html-documentation"
44+
_PATH_FILTER = tuple(["dist", ".eggs", "venv"] + list(Config.path_filters))
45+
46+
python_files = partial(_python_files, path_filters=_PATH_FILTER)
4347

4448

4549
class Mode(Enum):

exasol/toolbox/project.py

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

44

55
def python_files(
6-
project_root: Path, path_filters: Iterable[str] = ["dist", ".eggs", "venv"]
6+
project_root: Path, path_filters: Iterable[str] = ("dist", ".eggs", "venv")
77
) -> Iterable[Path]:
88
"""Returns all relevant"""
99
return _deny_filter(project_root.glob("**/*.py"), deny_list=path_filters)

exasol/toolbox/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# This file is generated, do not edit it manually!
33
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.
44
MAJOR = 0
5-
MINOR = 2
5+
MINOR = 3
66
PATCH = 0
77
VERSION = f"{MAJOR}.{MINOR}.{PATCH}"

noxconfig.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pathlib import Path
55
from typing import (
66
Any,
7+
Iterable,
78
MutableMapping,
89
)
910

@@ -15,6 +16,7 @@ class Config:
1516
root: Path = Path(__file__).parent
1617
doc: Path = Path(__file__).parent / "doc"
1718
version_file: Path = Path(__file__).parent / "exasol" / "toolbox" / "version.py"
19+
path_filters: Iterable[str] = ("dist", ".eggs", "venv")
1820

1921
@staticmethod
2022
def pre_integration_tests_hook(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "exasol-toolbox"
33
packages = [
44
{ include = "exasol" },
55
]
6-
version = "0.2.0"
6+
version = "0.3.0"
77
description = ""
88
authors = [
99
"Nicola Coretti <nicola.coretti@exasol.com>"

0 commit comments

Comments
 (0)