Skip to content

Commit 5bffed1

Browse files
authored
Merge pull request #32 from reinout/reinout-modernisation
Setup modernisation + removal of pkg_resources
2 parents 0545c6f + 535651b commit 5bffed1

30 files changed

+441
-207
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 4
10+
max_line_length = 88
11+
12+
[*.{toml,yaml,yml}]
13+
indent_size = 2
14+
15+
[Makefile]
16+
indent_style = tab

.github/dependabot.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ updates:
44
- package-ecosystem: "github-actions"
55
directory: "/"
66
schedule:
7-
# Check for updates to GitHub Actions every week
8-
interval: "weekly"
7+
interval: "quarterly"

.github/workflows/test.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ['3.9', '3.13']
16+
python-version: ['3.10', '3.14']
1717
steps:
1818
- uses: actions/checkout@v4
1919
- name: Set up Python ${{ matrix.python-version }}
2020
uses: actions/setup-python@v6
2121
with:
2222
python-version: ${{ matrix.python-version }}
23-
- name: Install dependencies
24-
run: make install
25-
- name: Check syntax (ruff)
26-
run: make check && make beautiful
27-
- name: Test (flake8...)
28-
run: make test
23+
- uses: pre-commit/action@v3.0.1
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
26+
- name: Install python project
27+
run: uv sync
28+
- name: Test
29+
run: uv run pytest

.gitignore

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,39 @@
1+
# Pyc/pyo/backup files.
2+
*.py[co]
3+
*~
4+
*.swp
15
*.pyc
2-
*.pyo
3-
.Python
4-
.installed.cfg
5-
bin
6-
coverage
7-
develop-eggs
8-
dist
9-
eggs
10-
include
11-
lib
12-
parts
13-
checkoutmanager.egg-info
6+
.DS_Store
7+
8+
# Packages/buildout/pip/pipenv
9+
*.egg
10+
*.egg-info
11+
sdist
12+
pip-log.txt
13+
bower_components/
14+
node_modules/
15+
doc/build/
16+
ansible/*.retry
17+
.venv
18+
venv
19+
bin/
20+
lib/
21+
pyvenv.cfg
22+
dist/
23+
var/
24+
*.suggestion
25+
26+
# Unit test / coverage reports
1427
.coverage
28+
.tox
1529
htmlcov
16-
doc/build/
17-
/venv/
30+
.codeintel
31+
coverage.*
32+
.pytest_cache
33+
34+
# Pycharm, visual studio
35+
.idea
36+
.vscode
37+
38+
# Docker
39+
docker-compose.override.yml

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# See https://nens-meta.readthedocs.io/en/latest/config-files.html
2+
default_language_version:
3+
python: python3
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v6.0.0
8+
hooks:
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
- id: check-yaml
12+
args: [--allow-multiple-documents]
13+
- id: check-toml
14+
- id: check-added-large-files
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
# Ruff version.
17+
rev: v0.14.5
18+
hooks:
19+
# Run the linter.
20+
- id: ruff
21+
args: ["--fix"]
22+
# Run the formatter.
23+
- id: ruff-format
24+
25+
### Extra lines below are preserved ###

CHANGES.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ Changelog of checkoutmanager
44
3.2 (unreleased)
55
----------------
66

7-
- Nothing changed yet.
7+
- Removed ``pkg_resources`` for compatibility with newer python versions.
8+
9+
- Updated the project itself to use ``uv`` and ``pre-commit``.
10+
11+
- Removed two ancient svn-only commands.
812

913

1014
3.1 (2025-01-30)

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.rst

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Checkoutmanager works on linux, osx and windows.
1616
Starting to use it
1717
------------------
1818

19-
Starting is easy. Just ``pip install checkoutmanager`` and run
20-
``checkoutmanager``.
19+
Starting is easy. Just ``pip install checkoutmanager`` (or ``uv tool install
20+
checkoutmanager``) and run ``checkoutmanager``.
2121

2222
- The first time, you'll get a sample configuration you can copy to
2323
``.checkoutmanager.cfg`` in your home directory.
@@ -80,32 +80,6 @@ in
8080
respective commands and is therefore inherently fragile.
8181

8282

83-
84-
Hidden commands
85-
---------------
86-
87-
A few commands are hidden because they are seldom used and are only
88-
useful for subversion.
89-
90-
upgrade
91-
This upgrades the working copy to the new subversion 1.7 layout of
92-
the .svn directory. This should be done once after you have
93-
upgraded your subversion to 1.7. Note that when you accidentally
94-
run this twice you get an error, but nothing breaks. Since this
95-
command is so rarely needed, it is not advertised in the command
96-
line help.
97-
98-
info
99-
Display the svn info for the remote url. This is useful when your
100-
svn program has been updated and the security mechanisms on your OS
101-
now require you to explictly allow access to the stored credentials.
102-
The other commands either do not access the internet or are
103-
non-interactive (like command up). In fact, the reason for adding
104-
this command is that a non-interactive 'svn update' will fail when
105-
you have not granted access to your credentials yet for this new svn
106-
program. This has happened a bit too often for me (Maurits).
107-
108-
10983
Output directory naming
11084
-----------------------
11185

@@ -185,3 +159,13 @@ Config file
185159
it is in checkoutmanager/sample.cfg!
186160
187161
Sample configuration file::
162+
163+
164+
Developing on this project itself
165+
---------------------------------
166+
167+
Developing is pretty straightforward::
168+
169+
$ uv sync # Install the project
170+
$ pre-commit run --all # Syntax checks and formatting
171+
$ uv run pytest # (Or activate the virtualenv and just run pytest)

TODO.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)