Skip to content

Commit eff1930

Browse files
authored
Release 0.0.6. (#24)
1 parent 856f0de commit eff1930

16 files changed

+122
-105
lines changed

.conda/meta.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build:
1313
noarch: python
1414
number: 0
1515
entry_points:
16-
- pytask = _pytask.cli:pytask
16+
- pytask = _pytask.cli:cli
1717

1818
requirements:
1919
host:
@@ -42,8 +42,9 @@ test:
4242
- tests
4343
commands:
4444
- pytask --help
45-
- pytask --markers
4645
- pytask --version
46+
- pytask clean
47+
- pytask markers
4748

4849
- pytest tests
4950

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ repos:
2020
hooks:
2121
- id: reorder-python-imports
2222
- repo: https://github.com/psf/black
23-
rev: 19.10b0
23+
rev: 20.8b1
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/asottile/blacken-docs
27-
rev: v1.7.0
27+
rev: v1.8.0
2828
hooks:
2929
- id: blacken-docs
3030
additional_dependencies: [black]
@@ -48,11 +48,11 @@ repos:
4848
Pygments,
4949
]
5050
- repo: https://github.com/PyCQA/doc8
51-
rev: 0.8.1rc3
51+
rev: 0.9.0a1
5252
hooks:
5353
- id: doc8
5454
- repo: https://github.com/econchick/interrogate
55-
rev: 1.2.0
55+
rev: 1.3.1
5656
hooks:
5757
- id: interrogate
5858
args: [-v, --fail-under=40, src, tests]

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
author = "Tobias Raabe"
2222

2323
# The full version, including alpha/beta/rc tags
24-
release = "0.0.5"
24+
release = "0.0.6"
2525

2626

2727
# -- General configuration -------------------------------------------------------------

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.0.5
2+
current_version = 0.0.6
33
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))(\-?((dev)?(?P<dev>\d+))?)
44
serialize =
55
{major}.{minor}.{patch}dev{dev}

setup.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
setup(
1717
name="pytask",
18-
version="0.0.5",
18+
version="0.0.6",
1919
description=DESCRIPTION,
2020
long_description=DESCRIPTION + "\n\n" + README,
2121
long_description_content_type="text/x-rst",
@@ -37,15 +37,6 @@
3737
],
3838
platforms="any",
3939
entry_points={"console_scripts": ["pytask=_pytask.cli:cli"]},
40-
install_requires=[
41-
"attrs>=17.4.0",
42-
"click",
43-
"click-default-group",
44-
"networkx",
45-
"pluggy",
46-
"pony>=0.7.13",
47-
],
48-
tests_require=["pexpect", "pytest"],
4940
packages=find_packages(where="src"),
5041
package_dir={"": "src"},
5142
)

src/_pytask/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.5"
1+
__version__ = "0.0.6"

src/_pytask/config.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Configure pytask."""
12
import configparser
23
import itertools
34
import os
@@ -32,10 +33,12 @@
3233
"build/*",
3334
"dist/*",
3435
]
36+
"""List[str]: List of expressions to ignore folders."""
3537

3638

3739
@hookimpl
3840
def pytask_configure(pm, config_from_cli):
41+
"""Configure pytask."""
3942
config = {"pm": pm, "terminal_width": _get_terminal_width()}
4043

4144
# Either the path to the configuration is passed via the CLI or it needs to be
@@ -88,17 +91,19 @@ def pytask_configure(pm, config_from_cli):
8891

8992
@hookimpl
9093
def pytask_parse_config(config, config_from_cli, config_from_file):
94+
"""Parse the configuration."""
9195
config_from_file["ignore"] = parse_value_or_multiline_option(
9296
config_from_file.get("ignore")
9397
)
9498

9599
config["ignore"] = (
96-
get_first_non_none_value(
97-
config_from_cli,
98-
config_from_file,
99-
key="ignore",
100-
default=[],
101-
callback=to_list,
100+
to_list(
101+
get_first_non_none_value(
102+
config_from_cli,
103+
config_from_file,
104+
key="ignore",
105+
default=[],
106+
)
102107
)
103108
+ IGNORED_FOLDERS
104109
)
@@ -117,7 +122,7 @@ def pytask_parse_config(config, config_from_cli, config_from_file):
117122

118123
@hookimpl
119124
def pytask_post_parse(config):
120-
# Sort markers alphabetically.
125+
"""Sort markers alphabetically."""
121126
config["markers"] = {k: config["markers"][k] for k in sorted(config["markers"])}
122127

123128

@@ -144,9 +149,11 @@ def _find_project_root_and_ini(paths: List[Path]):
144149
path = parent.joinpath(config_name)
145150

146151
if path.exists():
147-
config = configparser.ConfigParser()
148-
config.read(path)
149-
if "pytask" in config.sections():
152+
try:
153+
_read_config(path)
154+
except Exception:
155+
pass
156+
else:
150157
config_path = path
151158
break
152159

@@ -159,6 +166,7 @@ def _find_project_root_and_ini(paths: List[Path]):
159166

160167

161168
def _read_config(path):
169+
"""Read the configuration from a file with a [pytask] section."""
162170
config = configparser.ConfigParser()
163171
config.read(path)
164172
return dict(config["pytask"])

src/_pytask/mark/expression.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def lex(self, input_: str) -> Iterator[Token]:
101101
pos += len(value)
102102
else:
103103
raise ParseError(
104-
pos + 1, 'unexpected character "{}"'.format(input_[pos]),
104+
pos + 1,
105+
'unexpected character "{}"'.format(input_[pos]),
105106
)
106107
yield Token(TokenType.EOF, "", pos)
107108

@@ -205,7 +206,9 @@ def compile_(cls, input_: str) -> "Expression":
205206
"""
206207
astexpr = expression(Scanner(input_))
207208
code = compile(
208-
astexpr, filename="<pytest match expression>", mode="eval",
209+
astexpr,
210+
filename="<pytest match expression>",
211+
mode="eval",
209212
) # type: types.CodeType
210213
return cls(code)
211214

src/_pytask/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import attr
66
import click
77
from _pytask.enums import ColorCode
8-
from _pytask.shared import remove_internal_traceback_frames_from_exc_info
8+
from _pytask.traceback import remove_internal_traceback_frames_from_exc_info
99

1010

1111
@attr.s

src/_pytask/resolve_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from _pytask.exceptions import ResolvingDependenciesError
1414
from _pytask.mark import Mark
1515
from _pytask.report import ResolvingDependenciesReport
16-
from _pytask.shared import remove_traceback_from_exc_info
16+
from _pytask.traceback import remove_traceback_from_exc_info
1717
from pony import orm
1818

1919

0 commit comments

Comments
 (0)