Skip to content

Commit 7ce105b

Browse files
authored
Merge pull request #21 from python/housekeeping_redux
Further housekeeping
2 parents b391458 + 6757a7a commit 7ce105b

File tree

5 files changed

+49
-3
lines changed

5 files changed

+49
-3
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: "ubuntu-latest"
3232
strategy:
3333
matrix:
34-
toxenv: ["build", "pytype", "docs"]
34+
toxenv: ["build", "precommit", "pytype", "docs"]
3535
env:
3636
TOXENV: ${{ matrix.toxenv }}
3737

MANIFEST.in

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1-
recursive-include src/tzdata *
1+
# All the stuff to include
22
include VERSION
3+
include tox.ini
4+
include LICENSE *.rst *.toml *.yml *.yaml *.ini *.sh *.cfg
5+
recursive-include licenses *
6+
recursive-include src/tzdata *
7+
recursive-include templates *
8+
graft .github
9+
10+
recursive-include tests *.py
11+
12+
# Documentation
13+
recursive-include docs *.png
14+
recursive-include docs *.svg
15+
recursive-include docs *.py
16+
recursive-include docs *.rst
17+
prune docs/_build
18+
prune docs/_output
19+
20+
# Files and directories incidentally here
21+
prune build/
22+
prune dist/
23+
prune tmp/
24+
prune src/*.egg-info
25+
global-exclude *.pyc *.pyo

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ build-backend = "setuptools.build_meta"
66
atomic=true
77
force_grid_wrap=0
88
include_trailing_comma=true
9+
known_first_party=["tzdata"]
10+
known_standard_library=["zoneinfo"]
11+
known_third_party=["click", "parver", "pytest", "requests"]
912
multi_line_output=3
1013
not_skip="__init__.py"
1114
use_parentheses=true

tests/test_version.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import os
2+
3+
import tzdata
4+
5+
REPO_ROOT = os.path.split(os.path.split(__file__)[0])[0]
6+
VERSION_FILE = os.path.join(REPO_ROOT, "VERSION")
7+
8+
9+
def test_version():
10+
with open(VERSION_FILE, "rt") as f:
11+
version_from_file = f.read()
12+
13+
assert version_from_file == tzdata.__version__

tox.ini

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ deps =
1212
commands =
1313
pytest {toxinidir} {posargs}
1414

15+
[testenv:precommit]
16+
description = Run the pre-commit hooks on all files
17+
deps =
18+
pre-commit
19+
commands =
20+
pre-commit install -f --install-hooks
21+
pre-commit run --all-files
22+
1523
[testenv:update]
1624
description = Update the tzdata contents
1725
skip_install = True
@@ -30,7 +38,6 @@ deps =
3038
commands =
3139
python bump_version.py {posargs}
3240

33-
3441
[testenv:pytype]
3542
description = Run typechecking
3643
basepython = python3.7

0 commit comments

Comments
 (0)