Skip to content

Commit e346d30

Browse files
nikolay-eclaude
andcommitted
chore: Update CI/CD cache keys to use pyproject.toml
- Updated cache key generation in cd.yml and ci.yml workflows - Changed from hashFiles('**/setup.cfg') to hashFiles('**/pyproject.toml') - Ensures proper cache invalidation when dependencies change - Updated all 4 cache key instances across both workflow files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent e092062 commit e346d30

File tree

5 files changed

+59
-48
lines changed

5 files changed

+59
-48
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ updates:
2222
directory: "/"
2323
multi-ecosystem-group: "all-dependencies"
2424
patterns:
25-
- "*"
25+
- "*"

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
id: cache-pip
128128
with:
129129
path: ~/.cache/pip
130-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.cfg') }}
130+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
131131
restore-keys: |
132132
${{ runner.os }}-pip-${{ matrix.python-version }}-
133133
${{ runner.os }}-pip-

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131

3232
path: ~/.cache/pip
33-
key: ${{ runner.os }}-lint-pip-${{ hashFiles('**/setup.cfg') }}
33+
key: ${{ runner.os }}-lint-pip-${{ hashFiles('**/pyproject.toml') }}
3434
restore-keys: |
3535
${{ runner.os }}-lint-pip-
3636
@@ -77,7 +77,7 @@ jobs:
7777
with:
7878
path: ~/.cache/pip
7979

80-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.cfg') }}
80+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
8181
restore-keys: |
8282
${{ runner.os }}-pip-${{ matrix.python-version }}-
8383
${{ runner.os }}-pip-
@@ -130,7 +130,7 @@ jobs:
130130
uses: actions/cache@v4
131131
with:
132132
path: ~/.cache/pip
133-
key: pypy-${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.cfg') }}
133+
key: pypy-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
134134
restore-keys: |
135135
pypy-${{ matrix.python-version }}-pip-
136136

pyproject.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,57 @@
1+
# pyproject.toml
2+
13
[build-system]
24
requires = ["setuptools>=45", "wheel"]
35
build-backend = "setuptools.build_meta"
46

57
[tool.black]
68
line-length = 130
9+
10+
[project]
11+
name = "treemapper"
12+
dynamic = ["version"] # Version is still managed in version.py
13+
authors = [
14+
{ name = "Nikolay Eremeev", email = "[email protected]" },
15+
]
16+
description = "A tool for mapping directory structures"
17+
readme = "README.md"
18+
requires-python = ">=3.9"
19+
license = { text = "Apache-2.0" }
20+
classifiers = [
21+
"Programming Language :: Python :: 3",
22+
"License :: OSI Approved :: Apache Software License",
23+
"Operating System :: OS Independent",
24+
]
25+
dependencies = [
26+
"pathspec>=0.9",
27+
"pyyaml>=5.4",
28+
]
29+
30+
[project.urls]
31+
Homepage = "https://github.com/nikolay-e/TreeMapper"
32+
33+
[project.scripts]
34+
treemapper = "treemapper.treemapper:main"
35+
36+
[project.optional-dependencies]
37+
dev = [
38+
"pytest>=7.0",
39+
"pytest-cov>=3.0",
40+
"build>=0.10",
41+
"twine>=4.0",
42+
"pyinstaller>=5.0",
43+
"flake8>=5.0",
44+
"black>=23.0.0",
45+
"mypy>=1.0",
46+
"types-PyYAML",
47+
"autoflake",
48+
]
49+
50+
[tool.setuptools.dynamic]
51+
version = { attr = "treemapper.version.__version__" }
52+
53+
[tool.setuptools]
54+
package-dir = { "" = "src" }
55+
56+
[tool.setuptools.packages.find]
57+
where = ["src"]

setup.cfg

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,4 @@
1-
[metadata]
2-
name = treemapper
3-
version = attr: treemapper.version.__version__
4-
author = Nikolay Eremeev
5-
author_email = [email protected]
6-
description = A tool for mapping directory structures
7-
long_description = file: README.md
8-
long_description_content_type = text/markdown
9-
url = https://github.com/nikolay-e/TreeMapper
10-
classifiers =
11-
Programming Language :: Python :: 3
12-
License :: OSI Approved :: Apache Software License
13-
Operating System :: OS Independent
1+
# setup.cfg
142

15-
[options]
16-
package_dir =
17-
= src
18-
packages = find:
19-
python_requires = >=3.9
20-
install_requires =
21-
pathspec>=0.9
22-
pyyaml>=5.4
23-
24-
[options.packages.find]
25-
where = src
26-
27-
[options.entry_points]
28-
console_scripts =
29-
treemapper = treemapper.treemapper:main
30-
31-
[options.extras_require]
32-
dev =
33-
pytest>=7.0
34-
pytest-cov>=3.0
35-
build>=0.10
36-
twine>=4.0
37-
pyinstaller>=5.0
38-
flake8>=5.0
39-
black>=23.0.0
40-
mypy>=1.0
41-
types-PyYAML
42-
pyyaml
43-
pathspec
44-
autoflake
3+
[flake8]
4+
max-line-length = 130

0 commit comments

Comments
 (0)