Skip to content

Commit 37cac8a

Browse files
committed
Update from makefile project
1 parent c8ec119 commit 37cac8a

File tree

10 files changed

+42
-30
lines changed

10 files changed

+42
-30
lines changed

.make/.bumpversion.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "0.7.0"
2+
current_version = "0.7.1"
33
commit = true
44
message = "Makefile version {new_version} released."
55
tag = true
@@ -12,18 +12,18 @@ serialize = [
1212
[[tool.bumpversion.files]]
1313
filename = "CHANGES_MAKEFILE.md"
1414
search = '''
15-
[Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
15+
## [Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
1616
1717
______________________________________________________________________
1818
'''
1919
replace = '''
20-
[Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
20+
## [Unreleased](https://github.com/RolnickLab/lab-advanced-template/tree/main) (latest)
2121
2222
______________________________________________________________________
2323
2424
<!-- (New changes here in list form) -->
2525
26-
[{new_version}](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-{new_version}) ({utcnow:%Y-%m-%d})
26+
## [{new_version}](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-{new_version}) ({utcnow:%Y-%m-%d})
2727
2828
______________________________________________________________________
2929
'''

.make/CHANGES_MAKEFILE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ ______________________________________________________________________
66

77
<!-- (New changes here in list form) -->
88

9+
## [0.7.1](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.7.1) (2025-09-17)
10+
11+
______________________________________________________________________
12+
13+
<!-- (New changes here in list form) -->
14+
915
## [0.7.0](https://github.com/RolnickLab/lab-advanced-template/tree/makefile-0.7.0) (2025-09-10)
1016

1117
______________________________________________________________________

.make/Makefile

Lines changed: 1 addition & 1 deletion
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.7.0
13+
MAKEFILE_VERSION := 0.7.1
1414
BUMP_TOOL := bump-my-version
1515
BUMP_CONFIG_FILE := $(PROJECT_PATH).bumpversion.toml
1616

.make/base.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ PROJECT_PATH := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
1616
MAKEFILE_NAME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
1717
SHELL := /usr/bin/env bash
1818
BUMP_TOOL := bump-my-version
19-
MAKEFILE_VERSION := 0.7.0
19+
MAKEFILE_VERSION := 0.7.1
2020
DOCKER_COMPOSE ?= docker compose
2121
AUTO_INSTALL ?=
2222

.make/lint.make

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22

33
.PHONY: check-lint
44
check-lint: ## Check code linting (black, isort, flake8, docformatter and pylint)
5-
$(ENV_COMMAND_TOOL) run nox -s check
5+
$(ENV_COMMAND_TOOL) nox -s check
66

77
.PHONY: check-pylint
88
check-pylint: ## Check code with pylint
9-
$(ENV_COMMAND_TOOL) run nox -s pylint
9+
$(ENV_COMMAND_TOOL) nox -s pylint
1010

1111
.PHONY: check-complexity
1212
check-complexity: ## Check code cyclomatic complexity with Flake8-McCabe
13-
$(ENV_COMMAND_TOOL) run nox -s complexity
13+
$(ENV_COMMAND_TOOL) nox -s complexity
1414

1515
.PHONY: fix-lint
1616
fix-lint: ## Fix code linting (autoflake, autopep8, black, isort, flynt, docformatter)
17-
$(ENV_COMMAND_TOOL) run nox -s fix
17+
$(ENV_COMMAND_TOOL) nox -s fix
1818

1919
.PHONY: markdown-lint
2020
markdown-lint: ## Fix markdown linting using mdformat
21-
$(ENV_COMMAND_TOOL) run nox -s mdformat
21+
$(ENV_COMMAND_TOOL) nox -s mdformat
2222

2323
.PHONY: precommit
2424
precommit: ## Run Pre-commit on all files manually
25-
$(ENV_COMMAND_TOOL) run nox -s precommit
25+
$(ENV_COMMAND_TOOL) nox -s precommit
2626

2727
.PHONY: ruff
2828
ruff: ## Run the ruff linter
29-
$(ENV_COMMAND_TOOL) run nox -s ruff-lint
29+
$(ENV_COMMAND_TOOL) nox -s ruff-lint
3030

3131
.PHONY: ruff-fix
3232
ruff-fix: ## Run the ruff linter and fix automatically fixable errors
33-
$(ENV_COMMAND_TOOL) run nox -s ruff-fix
33+
$(ENV_COMMAND_TOOL) nox -s ruff-fix
3434

3535
.PHONY: ruff-format
3636
ruff-format: ## Run the ruff code formatter
37-
$(ENV_COMMAND_TOOL) run nox -s ruff-format
37+
$(ENV_COMMAND_TOOL) nox -s ruff-format

.make/poetry.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-include Makefile.variables
44
-include Makefile.private
55

6-
ENV_COMMAND_TOOL := poetry
6+
ENV_COMMAND_TOOL := poetry run
77

88
## -- Poetry targets ------------------------------------------------------------------------------------------------ ##
99

.make/test.make

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.PHONY: test
44
test: ## Run all tests
5-
$(ENV_COMMAND_TOOL) run nox -s test
5+
$(ENV_COMMAND_TOOL) nox -s test
66

77
TEST_ARGS ?=
88
MARKER_TEST_ARGS = -m "$(TEST_ARGS)"
@@ -12,7 +12,7 @@ CUSTOM_TEST_ARGS = "$(TEST_ARGS)"
1212
.PHONY: test-marker
1313
test-marker: ## Run tests using pytest markers. Ex. make test-marker TEST_ARGS="<marker>"
1414
@if [ -n "$(TEST_ARGS)" ]; then \
15-
$(ENV_COMMAND_TOOL) run nox -s test_custom -- -- $(MARKER_TEST_ARGS); \
15+
$(ENV_COMMAND_TOOL) nox -s test_custom -- -- $(MARKER_TEST_ARGS); \
1616
else \
1717
echo "" ; \
1818
echo 'ERROR : Variable TEST_ARGS has not been set, please rerun the command like so :' ; \
@@ -23,7 +23,7 @@ test-marker: ## Run tests using pytest markers. Ex. make test-marker TEST_ARGS="
2323
.PHONY: test-specific
2424
test-specific: ## Run specific tests using the -k option. Ex. make test-specific TEST_ARGS="<name-of-test>"
2525
@if [ -n "$(TEST_ARGS)" ]; then \
26-
$(ENV_COMMAND_TOOL) run nox -s test_custom -- -- $(SPECIFIC_TEST_ARGS); \
26+
$(ENV_COMMAND_TOOL) nox -s test_custom -- -- $(SPECIFIC_TEST_ARGS); \
2727
else \
2828
echo "" ; \
2929
echo 'ERROR : Variable TEST_ARGS has not been set, please rerun the command like so :' ; \
@@ -35,7 +35,7 @@ test-specific: ## Run specific tests using the -k option. Ex. make test-specific
3535
.PHONY: test-custom
3636
test-custom: ## Run tests with custom args. Ex. make test-custom TEST_ARGS="-m 'not offline'"
3737
@if [ -n "$(TEST_ARGS)" ]; then \
38-
$(ENV_COMMAND_TOOL) run nox -s test_custom -- -- $(CUSTOM_TEST_ARGS); \
38+
$(ENV_COMMAND_TOOL) nox -s test_custom -- -- $(CUSTOM_TEST_ARGS); \
3939
else \
4040
echo "" ; \
4141
echo 'ERROR : Variable TEST_ARGS has not been set, please rerun the command like so :' ; \

.make/uv.make

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This is to make sure, sometimes the Makefile includes don't work.
33

44
## -- UV targets ------------------------------------------------------------------------------------------------ ##
5-
ENV_COMMAND_TOOL := uv
5+
ENV_COMMAND_TOOL := uv run
66

77
.PHONY: uv-install-auto
88
uv-install-auto:
@@ -292,7 +292,7 @@ install-precommit: install-dev ## Install the pre-commit hooks (also installs de
292292
echo "Pre-commit hook found"; \
293293
else \
294294
echo "Pre-commit hook not found, proceeding to configure it"; \
295-
$(ENV_COMMAND_TOOL) run pre-commit install; \
295+
$(ENV_COMMAND_TOOL) pre-commit install; \
296296
fi;
297297

298298
.PHONY: install-dev

Makefile.private.example

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616

1717
## Private variables
1818

19-
# If you use a different Conda tool, say `micromamba`, or if you use a different alias
20-
# CONDA_TOOL := <YOU_CONDA_TOOL_IF_DIFFERENT_FROM_CONDA>
21-
DOCKER_COMPOSE := docker compose
22-
23-
# Some targets use this variable. A 'false' value will ask user to confirm some steps.
24-
# a 'true' value will automatically install/remove without asking beforehand.
19+
# Most, but not all install/remove targets use this variable. A 'false' value will ask
20+
# users to confirm some steps. A 'true' value will automatically install/remove without
21+
# asking beforehand.
2522
AUTO_INSTALL := false
2623

2724
# The default environment to use. The choices are as follow: [venv, poetry, conda]
@@ -31,7 +28,16 @@ DEFAULT_INSTALL_ENV := venv
3128

3229
# The default environment where Poetry will be installed. The choices are as follow: [venv, conda]
3330
# If this is not set, the makefile will ask the user where they want to install Poetry
34-
DEFAULT_POETRY_INSTALL_ENV := venv
31+
#DEFAULT_POETRY_INSTALL_ENV := venv
32+
33+
34+
# This variable is to enable the '-y' flag when newer version of conda is available.
35+
# The default Mila conda module does not allow this flag; leave blanks or commented out
36+
#CONDA_YES_OPTION := -y
37+
38+
# If you use a different Conda tool, say `micromamba`, or if you use a different alias
39+
# CONDA_TOOL := <YOU_CONDA_TOOL_IF_DIFFERENT_FROM_CONDA>
40+
DOCKER_COMPOSE := docker compose
3541

3642
## -- Private targets ------------------------------------------------------------------------------------------------##
3743

Makefile.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
.PHONY: test-notebooks
77
test-notebooks: ## Execute test notebooks using pytest and nbval
8-
nox -s test_nb
8+
$(ENV_COMMAND_TOOL) nox -s test_nb

0 commit comments

Comments
 (0)