Skip to content

Commit 17d2d4b

Browse files
authored
Merge pull request #13 from RolnickLab/integrate-new-qa-tools
Integrate new qa tools
2 parents f904c8b + 37cac8a commit 17d2d4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4787
-3078
lines changed

.github/workflows/lint.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ jobs:
2323
run: |
2424
pip install poetry
2525
26-
- name: Configure Poetry
27-
run: |
28-
poetry config virtualenvs.create false
26+
- name: Cache Poetry virtualenv and dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/pypoetry
31+
~/.cache/pip
32+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33+
restore-keys: |
34+
poetry-${{ runner.os }}-
2935
3036
- name: Install dependencies
3137
run: |
32-
make install
38+
make install-dev
3339
3440
- name: Run linting checks
3541
run: |
36-
make check-pylint
42+
make check-pylint

.github/workflows/pre-commit.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,27 @@ jobs:
2323
run: |
2424
pip install poetry
2525
26-
- name: Configure Poetry
27-
run: |
28-
poetry config virtualenvs.create false
29-
26+
- name: Cache Poetry virtualenv and dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/pypoetry
31+
~/.cache/pip
32+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33+
restore-keys: |
34+
poetry-${{ runner.os }}-
35+
36+
- name: Cache pre-commit
37+
uses: actions/cache@v4
38+
with:
39+
path: |
40+
~/.cache/pre-commit
41+
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
42+
3043
- name: Install dependencies
3144
run: |
32-
make install
45+
make install-dev
3346
3447
- name: Run Pre-commit checks
3548
run: |
36-
make precommit
49+
make precommit

.github/workflows/test.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ jobs:
2323
run: |
2424
pip install poetry
2525
26-
- name: Configure Poetry
27-
run: |
28-
poetry config virtualenvs.create false
26+
- name: Cache Poetry virtualenv and dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/pypoetry
31+
~/.cache/pip
32+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33+
restore-keys: |
34+
poetry-${{ runner.os }}-
2935
3036
- name: Install dependencies
3137
run: |
32-
make install
38+
make install-dev
3339
3440
- name: Run tests
3541
run: |
36-
make test
42+
make test

.make/.bumpversion.toml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
21
[tool.bumpversion]
3-
current_version = "0.4.0"
2+
current_version = "0.7.1"
43
commit = true
54
message = "Makefile version {new_version} released."
65
tag = true
76
tag_name = "makefile-{new_version}"
87
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) (?P<releaseTime>.*)?'
98
serialize = [
10-
"{major}.{minor}.{patch}",
11-
"{utcnow:%Y-%m-%dT%H:%M:%SZ}"
9+
"{major}.{minor}.{patch}"
1210
]
1311

1412
[[tool.bumpversion.files]]
1513
filename = "CHANGES_MAKEFILE.md"
1614
search = '''
17-
[Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
18-
-------------------------------------------------------------------------------------
15+
## [Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
16+
17+
______________________________________________________________________
1918
'''
2019
replace = '''
21-
[Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
22-
-------------------------------------------------------------------------------------
20+
## [Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
21+
22+
______________________________________________________________________
23+
24+
<!-- (New changes here in list form) -->
2325
24-
[//]: # (New changes here in list form)
26+
## [{new_version}](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-{new_version}) ({utcnow:%Y-%m-%d})
2527
26-
[{new_version}](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-{new_version}) ({utcnow:%Y-%m-%d})
27-
-------------------------------------------------------------------------------------
28+
______________________________________________________________________
2829
'''
2930

3031
[[tool.bumpversion.files]]

.make/CHANGES_MAKEFILE.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,52 @@
11
# CHANGES.md
22

3-
[Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
4-
-------------------------------------------------------------------------------------
3+
## [Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
54

6-
[//]: # (New changes here in list form)
5+
______________________________________________________________________
76

8-
[0.4.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.4.0) (2024-10-30)
9-
-------------------------------------------------------------------------------------
7+
<!-- (New changes here in list form) -->
108

11-
* Add cyclomatic complexity check target
9+
## [0.7.1](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.7.1) (2025-09-17)
1210

13-
[0.3.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.3.0) (2024-10-30)
14-
-------------------------------------------------------------------------------------
11+
______________________________________________________________________
1512

16-
* Add utilities to track makefile versions
17-
* Fix many of the targets relating to standalone `poetry` installation
13+
<!-- (New changes here in list form) -->
1814

15+
## [0.7.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.7.0) (2025-09-10)
16+
17+
______________________________________________________________________
18+
19+
- Add `mdformat` tool for markdown linting
20+
- Modularize the Makefile structure, allowing to choose which tools are available
21+
- Add tests for the Makefile
22+
23+
## [0.6.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.6.0) (2025-05-29)
24+
25+
______________________________________________________________________
26+
27+
- Improve venv support
28+
- Add venv remove target
29+
- Refactor `poetry-install-auto` to really be automatic
30+
- Add `mamba-install` target as an alternative/complement to conda for local dev
31+
- Add `autoflake`, `autopep8` and `ruff` targets
32+
- Fix some typos that caused targets to fail
33+
34+
## [0.5.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.5.0) (2025-03-11)
35+
36+
______________________________________________________________________
37+
38+
- Add venv support
39+
- Update and fix `poetry-install-auto` target
40+
41+
## [0.4.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.4.0) (2024-10-30)
42+
43+
______________________________________________________________________
44+
45+
- Add cyclomatic complexity check target
46+
47+
## [0.3.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.3.0) (2024-10-30)
48+
49+
______________________________________________________________________
50+
51+
- Add utilities to track makefile versions
52+
- Fix many of the targets relating to standalone `poetry` installation

.make/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# files to include.
1111
########################################################################################
1212
PROJECT_PATH := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
13-
MAKEFILE_VERSION := 0.4.0
13+
MAKEFILE_VERSION := 0.7.1
1414
BUMP_TOOL := bump-my-version
1515
BUMP_CONFIG_FILE := $(PROJECT_PATH).bumpversion.toml
1616

@@ -73,12 +73,12 @@ dry: ## Add the dry target for a preview of changes; ex. `make bump-major dry`
7373

7474
.PHONY: bump-major
7575
bump-major: ## Bump makefile major version <X.0.0>
76-
$(BUMP_TOOL) $(BUMP_ARGS) bump major --config-file $(BUMP_CONFIG_FILE)
76+
$(BUMP_TOOL) bump $(BUMP_ARGS) major --config-file $(BUMP_CONFIG_FILE)
7777

7878
.PHONY: bump-minor
7979
bump-minor: ## Bump makefile minor version <0.X.0>
80-
$(BUMP_TOOL) $(BUMP_ARGS) bump minor --config-file $(BUMP_CONFIG_FILE)
80+
$(BUMP_TOOL) bump $(BUMP_ARGS) minor --config-file $(BUMP_CONFIG_FILE)
8181

8282
.PHONY: bump-patch
8383
bump-patch: ## Bump makefile patch version <0.0.X>
84-
$(BUMP_TOOL) $(BUMP_ARGS) bump patch --config-file $(BUMP_CONFIG_FILE)
84+
$(BUMP_TOOL) bump $(BUMP_ARGS) patch --config-file $(BUMP_CONFIG_FILE)

.make/README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,28 @@
22

33
This folder contains the base makefile targets.
44

5-
It should not be modified outside of the [Template's repository](https://github.com/RolnickLab/lab-advanced-template).
5+
It should not be modified outside the [Template's repository](https://github.com/RolnickLab/lab-advanced-template).
66

7-
If there is a problem with the contents of these targets, please open an issue [here](https://github.com/RolnickLab/lab-advanced-template/issues).
7+
If there is a problem with the contents of these targets, please open an
8+
issue [here](https://github.com/RolnickLab/lab-advanced-template/issues).
89

9-
If you know how to fix the problem, please also consider opening a pull request with
10+
If you know how to fix the problem, please also consider opening a pull request with
1011
your proposed solution.
1112

1213
You can always override the faulty targets located here by creating new targets
1314
with the same names inside [Makefile.targets](../Makefile.targets).
1415

1516
The Makefile and `bump-my-version` related files in this directory are to help with
16-
change tracking for the makefile itself. If you are using this makefile as part of a
17-
template in another repository
17+
change tracking for the makefile itself. If you are using this makefile as part of a
18+
template in another repository, you won't have to interact with them.
19+
20+
## Tests
21+
22+
Makefile tests can be found in the [.make/tests/](tests) folder. Current tests are
23+
essentially bash scripts to test the different makefile targets.
24+
25+
These should only be run when modifying the makefiles inside the
26+
[Template's repository](https://github.com/RolnickLab/lab-advanced-template).
27+
28+
They should never be run in a project implemented from the template, as they could cause
29+
side effects to your project.

0 commit comments

Comments
 (0)