Skip to content

Commit 07ad611

Browse files
Update copyright header in .py and .rst files
1 parent d871d72 commit 07ad611

18 files changed

+280
-31
lines changed

Makefile

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,47 @@
66
# https://github.com/btschwertfeger
77
#
88

9-
VENV := venv
9+
UV := uv
1010
PYTHON := python
11+
PYTEST := $(UV) run pytest
1112
TESTS := tests
12-
PYTEST_OPTS := -vv
13-
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
13+
PYTEST_OPTS := -vv --junit-xml=pytest.xml
14+
PYTEST_COV_OPTS := $(PYTEST_OPTS) --cov=cmethods --cov-report=xml:coverage.xml --cov-report=term
1415

16+
## ======= M A K E F I L E - T A R G E T S =====================================
17+
## help Show this help message
18+
##
1519
.PHONY: help
1620
help:
1721
@grep "^##" Makefile | sed -e "s/##//"
1822

19-
## build Builds python-cmethods
23+
## ======= B U I L D I N G =====================================================
24+
## build Builds the package
2025
##
2126
.PHONY: build
2227
build:
2328
$(PYTHON) -m build .
2429

30+
## rebuild Rebuild the package
31+
##
32+
.PHONY: rebuild
33+
rebuild: clean build
34+
35+
## ======= I N S T A L L A T I O N =============================================
36+
## install Install the package
37+
##
38+
.PHONY: install
39+
install: check-uv
40+
$(UV) pip install .
41+
2542
## dev Installs the package in edit mode
2643
##
2744
.PHONY: dev
2845
dev:
2946
@git lfs install
30-
$(PYTHON) -m pip install -e ".[dev,test,jupyter,examples]" -r doc/requirements.txt
31-
32-
## install Install the package
33-
##
34-
.PHONY: install
35-
install:
36-
$(PYTHON) -m pip install .
47+
$(UV) pip install -e ".[dev,test,jupyter,examples]" -r doc/requirements.txt
3748

49+
## ======= T E S T I N G =======================================================
3850
## test Run the unit tests
3951
##
4052
.PHONY: test
@@ -50,13 +62,19 @@ tests: test
5062
retest:
5163
$(PYTHON) -m pytest $(PYTEST_OPTS) --lf $(TESTS)
5264

53-
5465
## wip Run tests marked as wip
5566
##
5667
.PHONY: wip
5768
wip:
5869
$(PYTHON) -m pytest $(PYTEST_OPTS) -m "wip" $(TESTS)
5970

71+
## coverage Run all tests and generate the coverage report
72+
##
73+
.PHONY: coverage
74+
coverage:
75+
@rm .cache/tests/*.log || true
76+
$(PYTEST) $(PYTEST_COV_OPTS) $(TEST_DIR)
77+
6078
## doc Build the documentation
6179
##
6280
.PHONY: doc
@@ -69,7 +87,8 @@ doc:
6987
doctest:
7088
cd doc && make doctest
7189

72-
## pre-commit Pre-Commit
90+
## ======= M I S C E L A N I O U S =============================================
91+
## pre-commit Run the pre-commit targets
7392
##
7493
.PHONY: pre-commit
7594
pre-commit:
@@ -92,7 +111,7 @@ ruff-fix:
92111
.PHONY: changelog
93112
changelog:
94113
docker run -it --rm \
95-
-v $(ROOT_DIR):/usr/local/src/your-app/ \
114+
-v $(PWD):/usr/local/src/your-app/ \
96115
githubchangeloggenerator/github-changelog-generator \
97116
-u btschwertfeger \
98117
-p python-cmethods \
@@ -115,3 +134,12 @@ clean:
115134
find tests -name "__pycache__" | xargs rm -rf
116135
find cmethods -name "__pycache__" | xargs rm -rf
117136
find examples -name "__pycache__" | xargs rm -rf
137+
138+
## check-uv Check if uv is installed
139+
##
140+
.PHONY: check-uv
141+
check-uv:
142+
@if ! command -v $(UV) >/dev/null; then \
143+
echo "Error: uv is not installed. Please visit https://github.com/astral-sh/uv for installation instructions."; \
144+
exit 1; \
145+
fi

cmethods/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# -*- mode: python; coding: utf-8 -*-
22
#
33
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
4-
# All rights reserved.
54
# https://github.com/btschwertfeger
65
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see
18+
# https://www.gnu.org/licenses/gpl-3.0.html.
19+
#
720
# pylint: disable=consider-using-f-string,logging-not-lazy
821

922
r"""

cmethods/core.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# -*- mode: python; coding: utf-8 -*-
22
#
33
# Copyright (C) 2024 Benjamin Thomas Schwertfeger
4-
# All rights reserved.
54
# https://github.com/btschwertfeger
65
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see
18+
# https://www.gnu.org/licenses/gpl-3.0.html.
19+
#
720

821
"""
922
Module providing the main function that is used to apply the implemented bias

cmethods/distribution.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# -*- mode: python; coding: utf-8 -*-
22
#
33
# Copyright (C) 2024 Benjamin Thomas Schwertfeger
4-
# All rights reserved.
54
# https://github.com/btschwertfeger
65
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see
18+
# https://www.gnu.org/licenses/gpl-3.0.html.
19+
#
720

821
"""
922
Module providing functions for distribution-based bias adjustments. Functions are not

cmethods/scaling.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# -*- mode: python; coding: utf-8 -*-
22
#
33
# Copyright (C) 2024 Benjamin Thomas Schwertfeger
4-
# All rights reserved.
54
# https://github.com/btschwertfeger
65
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see
18+
# https://www.gnu.org/licenses/gpl-3.0.html.
19+
#
720

821
"""
922
Module providing functions for scaling-based bias adjustments. Functions are not

cmethods/static.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# -*- mode: python; coding: utf-8 -*-
22
#
33
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
4-
# All rights reserved.
54
# https://github.com/btschwertfeger
65
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see
18+
# https://www.gnu.org/licenses/gpl-3.0.html.
19+
#
720

821
"""Module providing static information for the python-cmethods package"""
922

cmethods/types.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# -*- mode: python; coding: utf-8 -*-
22
#
33
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
4-
# All rights reserved.
54
# https://github.com/btschwertfeger
65
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see
18+
# https://www.gnu.org/licenses/gpl-3.0.html.
19+
#
720

821
"""Module providing custom types"""
922

cmethods/utils.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# -*- mode: python; coding: utf-8 -*-
22
#
33
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
4-
# All rights reserved.
54
# https://github.com/btschwertfeger
65
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see
18+
# https://www.gnu.org/licenses/gpl-3.0.html.
19+
#
720

821
"""Module providing utility functions"""
922

doc/cli.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
.. -*- mode: rst; coding: utf-8 -*-
22
..
33
.. Copyright (C) 2023 Benjamin Thomas Schwertfeger
4-
.. All rights reserved.
54
.. https://github.com/btschwertfeger
65
..
6+
.. This program is free software: you can redistribute it and/or modify
7+
.. it under the terms of the GNU General Public License as published by
8+
.. the Free Software Foundation, either version 3 of the License, or
9+
.. (at your option) any later version.
10+
..
11+
.. This program is distributed in the hope that it will be useful,
12+
.. but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
.. GNU General Public License for more details.
15+
..
16+
.. You should have received a copy of the GNU General Public License
17+
.. along with this program. If not, see
18+
.. https://www.gnu.org/licenses/gpl-3.0.html.
19+
..
720
821
Command-Line Interface
922
======================

doc/cmethods.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
.. -*- mode: rst; coding: utf-8 -*-
22
..
33
.. Copyright (C) 2023 Benjamin Thomas Schwertfeger
4-
.. All rights reserved.
54
.. https://github.com/btschwertfeger
65
..
6+
.. This program is free software: you can redistribute it and/or modify
7+
.. it under the terms of the GNU General Public License as published by
8+
.. the Free Software Foundation, either version 3 of the License, or
9+
.. (at your option) any later version.
10+
..
11+
.. This program is distributed in the hope that it will be useful,
12+
.. but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
.. GNU General Public License for more details.
15+
..
16+
.. You should have received a copy of the GNU General Public License
17+
.. along with this program. If not, see
18+
.. https://www.gnu.org/licenses/gpl-3.0.html.
19+
..
720
821
Classes and Functions
922
=====================

0 commit comments

Comments
 (0)