summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2025-09-03 16:18:52 +0200
committerjvoisin2025-09-04 14:35:36 +0200
commit102f08cd2807e0e664064f118a66b0c974c43c0e (patch)
tree28ef3e2048af11fd0d43971ba4a1681971dfbf16
parent7a8ea224bc327b8ee929379d577c74968ea1c352 (diff)
Switch the project from 0xacab to github
While the folks running 0xacab are much more lovely than the github ones, this project has outgrown the former: - Github offers beefy continuous integration, make it easier to run the testsuite on every python version, instead of using a weird docker-based contraption. Moreover, I'd rather burn some Microsoft money than 0xacab one. - Opening an account on 0xacab is non-trivial (by design), making it tedious for people to report issues and contribute to mat2. - Gitlab is becoming unbearably slow and convoluted, even compared to Github's awful Copilot/AI push. It's a sad state of affairs, but it's a pragmatic decision. People who don't have a Github account can still report issues and send patches by sending me an email.
-rw-r--r--.github/workflows/builds.yaml45
-rw-r--r--.gitlab-ci.yml109
-rw-r--r--.pylintrc18
-rw-r--r--CONTRIBUTING.md16
-rw-r--r--README.md2
-rw-r--r--doc/comparison_to_others.md8
-rw-r--r--doc/mat2.12
-rw-r--r--pyproject.toml6
-rw-r--r--setup.py4
9 files changed, 64 insertions, 146 deletions
diff --git a/.github/workflows/builds.yaml b/.github/workflows/builds.yaml
new file mode 100644
index 0000000..f6a62d0
--- /dev/null
+++ b/.github/workflows/builds.yaml
@@ -0,0 +1,45 @@
1name: CI for Python versions
2on:
3 pull_request:
4 push:
5 schedule:
6 - cron: '0 16 * * 5'
7
8jobs:
9 linting:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v5
13 - uses: actions/setup-python@v5
14 - run: pip install ruff
15 - run: |
16 ruff check .
17 build:
18 needs: linting
19 runs-on: ubuntu-latest
20 strategy:
21 matrix:
22 python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.2"]
23 steps:
24 - uses: actions/checkout@v5
25 - name: Setup Python
26 uses: actions/setup-python@v5
27 with:
28 python-version: ${{ matrix.python-version }}
29 - name: Install dependencies
30 run: |
31 sudo apt-get install --no-install-recommends --no-install-suggests --yes \
32 ffmpeg \
33 gir1.2-gdkpixbuf-2.0 \
34 gir1.2-poppler-0.18 \
35 gir1.2-rsvg-2.0 \
36 libimage-exiftool-perl \
37 python3-gi-cairo \
38 libcairo2-dev \
39 libgirepository-2.0-dev \
40 libgirepository1.0-dev \
41 gobject-introspection \
42 python3-mutagen
43 pip install .
44 - name: Build and run the testsuite
45 run: python3 -m unittest discover -v
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index c3b78a0..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,109 +0,0 @@
1variables:
2 CONTAINER_REGISTRY: $CI_REGISTRY/georg/mat2-ci-images
3 GIT_DEPTH: "5"
4 GIT_STRATEGY: clone
5
6stages:
7 - linting
8 - test
9
10.prepare_env: &prepare_env
11 before_script: # This is needed to not run the testsuite as root
12 - useradd --home-dir ${CI_PROJECT_DIR} mat2
13 - chown -R mat2 .
14
15linting:ruff:
16 image: $CONTAINER_REGISTRY:linting
17 stage: linting
18 script:
19 - apt update
20 - apt install -qqy --no-install-recommends python3-venv
21 - python3 -m venv venv
22 - source venv/bin/activate
23 - pip3 install ruff
24 - ruff check .
25
26tests:archlinux:
27 image: $CONTAINER_REGISTRY:archlinux
28 stage: test
29 script:
30 - python3 -m unittest discover -v
31
32tests:debian:
33 image: $CONTAINER_REGISTRY:debian
34 stage: test
35 <<: *prepare_env
36 script:
37 - apt-get -qqy purge bubblewrap
38 - su - mat2 -c "python3-coverage run --branch -m unittest discover -s tests/"
39 - su - mat2 -c "python3-coverage report --fail-under=95 -m --include 'libmat2/*'"
40
41tests:debian_with_bubblewrap:
42 image: $CONTAINER_REGISTRY:debian
43 stage: test
44 allow_failure: true
45 <<: *prepare_env
46 script:
47 - apt-get -qqy install bubblewrap
48 - python3 -m unittest discover -v
49
50tests:fedora:
51 image: $CONTAINER_REGISTRY:fedora
52 stage: test
53 script:
54 - python3 -m unittest discover -v
55
56tests:gentoo:
57 image: $CONTAINER_REGISTRY:gentoo
58 stage: test
59 <<: *prepare_env
60 script:
61 - su - mat2 -c "python3 -m unittest discover -v"
62
63tests:python3.7:
64 image: $CONTAINER_REGISTRY:python3.7
65 stage: test
66 script:
67 - python3 -m unittest discover -v
68
69tests:python3.8:
70 image: $CONTAINER_REGISTRY:python3.8
71 stage: test
72 script:
73 - python3 -m unittest discover -v
74
75tests:python3.9:
76 image: $CONTAINER_REGISTRY:python3.9
77 stage: test
78 script:
79 - python3 -m unittest discover -v
80
81tests:python3.10:
82 image: $CONTAINER_REGISTRY:python3.10
83 stage: test
84 script:
85 - python3 -m unittest discover -v
86
87tests:python3.11:
88 image: $CONTAINER_REGISTRY:python3.11
89 stage: test
90 script:
91 - python3 -m unittest discover -v
92
93tests:python3.12:
94 image: $CONTAINER_REGISTRY:python3.12
95 stage: test
96 script:
97 - python3 -m unittest discover -v
98
99tests:python3.13:
100 image: $CONTAINER_REGISTRY:python3.13
101 stage: test
102 script:
103 - python3 -m unittest discover -v
104
105tests:python3.14:
106 image: $CONTAINER_REGISTRY:python3.14
107 stage: test
108 script:
109 - python3 -m unittest discover -v
diff --git a/.pylintrc b/.pylintrc
deleted file mode 100644
index 41b3795..0000000
--- a/.pylintrc
+++ /dev/null
@@ -1,18 +0,0 @@
1[FORMAT]
2good-names=e,f,i,x,s
3max-locals=20
4
5[MESSAGES CONTROL]
6disable=
7 fixme,
8 invalid-name,
9 duplicate-code,
10 missing-docstring,
11 protected-access,
12 abstract-method,
13 wrong-import-position,
14 catching-non-exception,
15 cell-var-from-loop,
16 locally-disabled,
17 raise-missing-from,
18 invalid-sequence-index, # pylint doesn't like things like `Tuple[int, bytes]` in type annotation
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 69146e7..1e663a7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,9 +1,9 @@
1# Contributing to mat2 1# Contributing to mat2
2 2
3The main repository for mat2 is on [0xacab]( https://0xacab.org/jvoisin/mat2 ), 3The main repository for mat2 is on [github]( https://github.com/jvoisin/mat2 ),
4but you can send patches to jvoisin by [email](https://dustri.org/) if you prefer. 4but you can send patches to jvoisin by [email](https://dustri.org/) if you prefer.
5 5
6Do feel free to pick up [an issue]( https://0xacab.org/jvoisin/mat2/issues ) 6Do feel free to pick up [an issue]( https://github.com/jvoisin/mat2/issues )
7and to send a pull-request. 7and to send a pull-request.
8 8
9Before sending the pull-request, please do check that everything is fine by 9Before sending the pull-request, please do check that everything is fine by
@@ -27,11 +27,11 @@ Since mat2 is written in Python3, please conform as much as possible to the
27 27
28# Doing a release 28# Doing a release
29 29
301. Update the [changelog](https://0xacab.org/jvoisin/mat2/blob/master/CHANGELOG.md) 301. Update the [changelog](https://github.com/jvoisin/mat2/blob/master/CHANGELOG.md)
312. Update the version in the [mat2](https://0xacab.org/jvoisin/mat2/blob/master/mat2) file 312. Update the version in the [mat2](https://github.com/jvoisin/mat2/blob/master/mat2) file
323. Update the version in the [setup.py](https://0xacab.org/jvoisin/mat2/blob/master/setup.py) file 323. Update the version in the [setup.py](https://github.com/jvoisin/mat2/blob/master/setup.py) file
334. Update the version in the [pyproject.toml](https://0xacab.org/jvoisin/mat2/blob/master/yproject.toml) file 334. Update the version in the [pyproject.toml](https://github.com/jvoisin/mat2/blob/master/yproject.toml) file
345. Update the version and date in the [man page](https://0xacab.org/jvoisin/mat2/blob/master/doc/mat2.1) 345. Update the version and date in the [man page](https://github.com/jvoisin/mat2/blob/master/doc/mat2.1)
356. Commit the modified files 356. Commit the modified files
367. Create a tag with `git tag -s $VERSION` 367. Create a tag with `git tag -s $VERSION`
378. Push the commit with `git push origin master` 378. Push the commit with `git push origin master`
@@ -39,7 +39,7 @@ Since mat2 is written in Python3, please conform as much as possible to the
3910. Download the gitlab archive of the release 3910. Download the gitlab archive of the release
4011. Diff it against the local copy 4011. Diff it against the local copy
4112. If there is no difference, sign the archive with `gpg --armor --detach-sign mat2-$VERSION.tar.xz` 4112. If there is no difference, sign the archive with `gpg --armor --detach-sign mat2-$VERSION.tar.xz`
4213. Upload the signature on Gitlab's [tag page](https://0xacab.org/jvoisin/mat2/tags) and add the changelog there 4213. Upload the signature on Gitlab's [tag page](https://github.com/jvoisin/mat2/tags) and add the changelog there
4314. Announce the release on the [mailing list](https://mailman.boum.org/listinfo/mat-dev) 4314. Announce the release on the [mailing list](https://mailman.boum.org/listinfo/mat-dev)
4415. Sign'n'upload the new version on pypi with `python3 setup.py sdist bdist_wheel` then `twine upload -s dist/*` 4415. Sign'n'upload the new version on pypi with `python3 setup.py sdist bdist_wheel` then `twine upload -s dist/*`
4516. Do the secret release dance 4516. Do the secret release dance
diff --git a/README.md b/README.md
index bf4c4ac..45a24f1 100644
--- a/README.md
+++ b/README.md
@@ -149,7 +149,7 @@ of the guarantee that mat2 won't modify the data of their files, there is the
149 149
150# Contact 150# Contact
151 151
152If possible, use the [issues system](https://0xacab.org/jvoisin/mat2/issues) 152If possible, use the [issues system](https://github.com/jvoisin/mat2/issues)
153or the [mailing list](https://www.autistici.org/mailman/listinfo/mat-dev) 153or the [mailing list](https://www.autistici.org/mailman/listinfo/mat-dev)
154Should a more private contact be needed (eg. for reporting security issues), 154Should a more private contact be needed (eg. for reporting security issues),
155you can email Julien (jvoisin) Voisin at `julien.voisin+mat2@dustri.org`, 155you can email Julien (jvoisin) Voisin at `julien.voisin+mat2@dustri.org`,
diff --git a/doc/comparison_to_others.md b/doc/comparison_to_others.md
index 8939009..02648bd 100644
--- a/doc/comparison_to_others.md
+++ b/doc/comparison_to_others.md
@@ -19,14 +19,14 @@ details.
19# jpegoptim, optipng, … 19# jpegoptim, optipng, …
20 20
21While designed to reduce as much as possible the size of pictures, 21While designed to reduce as much as possible the size of pictures,
22those software can be used to remove metadata. They usually have very good 22those software can be used to remove metadata. They usually have excellent
23support for a single picture format, and can be used in place of mat2 for them. 23support for a single picture format, and can be used in place of mat2 for them.
24 24
25 25
26# PDF Redact Tools 26# PDF Redact Tools
27 27
28[PDF Redact Tools](https://github.com/firstlookmedia/pdf-redact-tools) is 28[PDF Redact Tools](https://github.com/firstlookmedia/pdf-redact-tools) is
29a software developed by the people from [First Look 29software developed by the people from [First Look
30Media](https://firstlook.media/), the entity behind, amongst other things, 30Media](https://firstlook.media/), the entity behind, amongst other things,
31[The Intercept](https://theintercept.com/). 31[The Intercept](https://theintercept.com/).
32 32
@@ -34,13 +34,13 @@ The tool uses roughly the same approach than mat2 to deal with PDF,
34which is unfortunately the only fileformat that it does support. 34which is unfortunately the only fileformat that it does support.
35It's interesting to note that it has counter-measures against 35It's interesting to note that it has counter-measures against
36[yellow dots](https://en.wikipedia.org/wiki/Machine_Identification_Code), 36[yellow dots](https://en.wikipedia.org/wiki/Machine_Identification_Code),
37a capacity that mat2 [doesn't possess yet](https://0xacab.org/jvoisin/mat2/issues/43). 37a capacity that mat2 doesn't have.
38 38
39 39
40# Exiv2 40# Exiv2
41 41
42[Exiv2](https://www.exiv2.org/) was considered for mat2, 42[Exiv2](https://www.exiv2.org/) was considered for mat2,
43but it currently [misses a lot of metadata](https://0xacab.org/jvoisin/mat2/issues/85) 43but it currently misses a lot of metadata.
44 44
45 45
46# Others non open source software/online service 46# Others non open source software/online service
diff --git a/doc/mat2.1 b/doc/mat2.1
index 1e70262..951d45c 100644
--- a/doc/mat2.1
+++ b/doc/mat2.1
@@ -84,7 +84,7 @@ but keep in mind by doing so, some metadata \fBwon't be cleaned\fR.
84 84
85While mat2 does its very best to remove every single metadata, 85While mat2 does its very best to remove every single metadata,
86it's still in beta, and \fBsome\fR might remain. Should you encounter 86it's still in beta, and \fBsome\fR might remain. Should you encounter
87some issues, check the bugtracker: https://0xacab.org/jvoisin/mat2/issues 87some issues, check the bugtracker: https://github.com/jvoisin/mat2/issues
88.PP 88.PP
89Please use accordingly and be careful. 89Please use accordingly and be careful.
90 90
diff --git a/pyproject.toml b/pyproject.toml
index 62912b1..b5f9c0d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,9 +11,9 @@ dependencies = [
11 'pycairo', 11 'pycairo',
12] 12]
13[project.urls] 13[project.urls]
14Repository = "https://0xacab.org/jvoisin/mat2" 14Repository = "https://github.com/jvoisin/mat2"
15Issues = "https://0xacab.org/jvoisin/mat2/-/issues" 15Issues = "https://github.com/jvoisin/mat2/issues"
16Changelog = "https://0xacab.org/jvoisin/mat2/-/blob/master/CHANGELOG.md" 16Changelog = "https://github.com/jvoisin/mat2/blob/master/CHANGELOG.md"
17 17
18[tool.ruff] 18[tool.ruff]
19target-version = "py39" 19target-version = "py39"
diff --git a/setup.py b/setup.py
index d8972fd..7f96ab6 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ setuptools.setup(
11 description="A handy tool to trash your metadata", 11 description="A handy tool to trash your metadata",
12 long_description=long_description, 12 long_description=long_description,
13 long_description_content_type="text/markdown", 13 long_description_content_type="text/markdown",
14 url="https://0xacab.org/jvoisin/mat2", 14 url="https://github.com/jvoisin/mat2",
15 python_requires = '>=3.5.0', 15 python_requires = '>=3.5.0',
16 scripts=['mat2'], 16 scripts=['mat2'],
17 install_requires=[ 17 install_requires=[
@@ -31,6 +31,6 @@ setuptools.setup(
31 "Intended Audience :: End Users/Desktop", 31 "Intended Audience :: End Users/Desktop",
32 ], 32 ],
33 project_urls={ 33 project_urls={
34 'bugtacker': 'https://0xacab.org/jvoisin/mat2/issues', 34 'bugtacker': 'https://github.com/jvoisin/mat2/issues',
35 }, 35 },
36) 36)