diff options
| author | jvoisin | 2025-09-03 16:18:52 +0200 |
|---|---|---|
| committer | jvoisin | 2025-09-04 14:35:36 +0200 |
| commit | 102f08cd2807e0e664064f118a66b0c974c43c0e (patch) | |
| tree | 28ef3e2048af11fd0d43971ba4a1681971dfbf16 | |
| parent | 7a8ea224bc327b8ee929379d577c74968ea1c352 (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.yaml | 45 | ||||
| -rw-r--r-- | .gitlab-ci.yml | 109 | ||||
| -rw-r--r-- | .pylintrc | 18 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 16 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | doc/comparison_to_others.md | 8 | ||||
| -rw-r--r-- | doc/mat2.1 | 2 | ||||
| -rw-r--r-- | pyproject.toml | 6 | ||||
| -rw-r--r-- | setup.py | 4 |
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 @@ | |||
| 1 | name: CI for Python versions | ||
| 2 | on: | ||
| 3 | pull_request: | ||
| 4 | push: | ||
| 5 | schedule: | ||
| 6 | - cron: '0 16 * * 5' | ||
| 7 | |||
| 8 | jobs: | ||
| 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 @@ | |||
| 1 | variables: | ||
| 2 | CONTAINER_REGISTRY: $CI_REGISTRY/georg/mat2-ci-images | ||
| 3 | GIT_DEPTH: "5" | ||
| 4 | GIT_STRATEGY: clone | ||
| 5 | |||
| 6 | stages: | ||
| 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 | |||
| 15 | linting: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 | |||
| 26 | tests:archlinux: | ||
| 27 | image: $CONTAINER_REGISTRY:archlinux | ||
| 28 | stage: test | ||
| 29 | script: | ||
| 30 | - python3 -m unittest discover -v | ||
| 31 | |||
| 32 | tests: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 | |||
| 41 | tests: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 | |||
| 50 | tests:fedora: | ||
| 51 | image: $CONTAINER_REGISTRY:fedora | ||
| 52 | stage: test | ||
| 53 | script: | ||
| 54 | - python3 -m unittest discover -v | ||
| 55 | |||
| 56 | tests:gentoo: | ||
| 57 | image: $CONTAINER_REGISTRY:gentoo | ||
| 58 | stage: test | ||
| 59 | <<: *prepare_env | ||
| 60 | script: | ||
| 61 | - su - mat2 -c "python3 -m unittest discover -v" | ||
| 62 | |||
| 63 | tests:python3.7: | ||
| 64 | image: $CONTAINER_REGISTRY:python3.7 | ||
| 65 | stage: test | ||
| 66 | script: | ||
| 67 | - python3 -m unittest discover -v | ||
| 68 | |||
| 69 | tests:python3.8: | ||
| 70 | image: $CONTAINER_REGISTRY:python3.8 | ||
| 71 | stage: test | ||
| 72 | script: | ||
| 73 | - python3 -m unittest discover -v | ||
| 74 | |||
| 75 | tests:python3.9: | ||
| 76 | image: $CONTAINER_REGISTRY:python3.9 | ||
| 77 | stage: test | ||
| 78 | script: | ||
| 79 | - python3 -m unittest discover -v | ||
| 80 | |||
| 81 | tests:python3.10: | ||
| 82 | image: $CONTAINER_REGISTRY:python3.10 | ||
| 83 | stage: test | ||
| 84 | script: | ||
| 85 | - python3 -m unittest discover -v | ||
| 86 | |||
| 87 | tests:python3.11: | ||
| 88 | image: $CONTAINER_REGISTRY:python3.11 | ||
| 89 | stage: test | ||
| 90 | script: | ||
| 91 | - python3 -m unittest discover -v | ||
| 92 | |||
| 93 | tests:python3.12: | ||
| 94 | image: $CONTAINER_REGISTRY:python3.12 | ||
| 95 | stage: test | ||
| 96 | script: | ||
| 97 | - python3 -m unittest discover -v | ||
| 98 | |||
| 99 | tests:python3.13: | ||
| 100 | image: $CONTAINER_REGISTRY:python3.13 | ||
| 101 | stage: test | ||
| 102 | script: | ||
| 103 | - python3 -m unittest discover -v | ||
| 104 | |||
| 105 | tests: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] | ||
| 2 | good-names=e,f,i,x,s | ||
| 3 | max-locals=20 | ||
| 4 | |||
| 5 | [MESSAGES CONTROL] | ||
| 6 | disable= | ||
| 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 | ||
| 3 | The main repository for mat2 is on [0xacab]( https://0xacab.org/jvoisin/mat2 ), | 3 | The main repository for mat2 is on [github]( https://github.com/jvoisin/mat2 ), |
| 4 | but you can send patches to jvoisin by [email](https://dustri.org/) if you prefer. | 4 | but you can send patches to jvoisin by [email](https://dustri.org/) if you prefer. |
| 5 | 5 | ||
| 6 | Do feel free to pick up [an issue]( https://0xacab.org/jvoisin/mat2/issues ) | 6 | Do feel free to pick up [an issue]( https://github.com/jvoisin/mat2/issues ) |
| 7 | and to send a pull-request. | 7 | and to send a pull-request. |
| 8 | 8 | ||
| 9 | Before sending the pull-request, please do check that everything is fine by | 9 | Before 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 | ||
| 30 | 1. Update the [changelog](https://0xacab.org/jvoisin/mat2/blob/master/CHANGELOG.md) | 30 | 1. Update the [changelog](https://github.com/jvoisin/mat2/blob/master/CHANGELOG.md) |
| 31 | 2. Update the version in the [mat2](https://0xacab.org/jvoisin/mat2/blob/master/mat2) file | 31 | 2. Update the version in the [mat2](https://github.com/jvoisin/mat2/blob/master/mat2) file |
| 32 | 3. Update the version in the [setup.py](https://0xacab.org/jvoisin/mat2/blob/master/setup.py) file | 32 | 3. Update the version in the [setup.py](https://github.com/jvoisin/mat2/blob/master/setup.py) file |
| 33 | 4. Update the version in the [pyproject.toml](https://0xacab.org/jvoisin/mat2/blob/master/yproject.toml) file | 33 | 4. Update the version in the [pyproject.toml](https://github.com/jvoisin/mat2/blob/master/yproject.toml) file |
| 34 | 5. Update the version and date in the [man page](https://0xacab.org/jvoisin/mat2/blob/master/doc/mat2.1) | 34 | 5. Update the version and date in the [man page](https://github.com/jvoisin/mat2/blob/master/doc/mat2.1) |
| 35 | 6. Commit the modified files | 35 | 6. Commit the modified files |
| 36 | 7. Create a tag with `git tag -s $VERSION` | 36 | 7. Create a tag with `git tag -s $VERSION` |
| 37 | 8. Push the commit with `git push origin master` | 37 | 8. 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 | |||
| 39 | 10. Download the gitlab archive of the release | 39 | 10. Download the gitlab archive of the release |
| 40 | 11. Diff it against the local copy | 40 | 11. Diff it against the local copy |
| 41 | 12. If there is no difference, sign the archive with `gpg --armor --detach-sign mat2-$VERSION.tar.xz` | 41 | 12. If there is no difference, sign the archive with `gpg --armor --detach-sign mat2-$VERSION.tar.xz` |
| 42 | 13. Upload the signature on Gitlab's [tag page](https://0xacab.org/jvoisin/mat2/tags) and add the changelog there | 42 | 13. Upload the signature on Gitlab's [tag page](https://github.com/jvoisin/mat2/tags) and add the changelog there |
| 43 | 14. Announce the release on the [mailing list](https://mailman.boum.org/listinfo/mat-dev) | 43 | 14. Announce the release on the [mailing list](https://mailman.boum.org/listinfo/mat-dev) |
| 44 | 15. Sign'n'upload the new version on pypi with `python3 setup.py sdist bdist_wheel` then `twine upload -s dist/*` | 44 | 15. Sign'n'upload the new version on pypi with `python3 setup.py sdist bdist_wheel` then `twine upload -s dist/*` |
| 45 | 16. Do the secret release dance | 45 | 16. Do the secret release dance |
| @@ -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 | ||
| 152 | If possible, use the [issues system](https://0xacab.org/jvoisin/mat2/issues) | 152 | If possible, use the [issues system](https://github.com/jvoisin/mat2/issues) |
| 153 | or the [mailing list](https://www.autistici.org/mailman/listinfo/mat-dev) | 153 | or the [mailing list](https://www.autistici.org/mailman/listinfo/mat-dev) |
| 154 | Should a more private contact be needed (eg. for reporting security issues), | 154 | Should a more private contact be needed (eg. for reporting security issues), |
| 155 | you can email Julien (jvoisin) Voisin at `julien.voisin+mat2@dustri.org`, | 155 | you 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 | ||
| 21 | While designed to reduce as much as possible the size of pictures, | 21 | While designed to reduce as much as possible the size of pictures, |
| 22 | those software can be used to remove metadata. They usually have very good | 22 | those software can be used to remove metadata. They usually have excellent |
| 23 | support for a single picture format, and can be used in place of mat2 for them. | 23 | support 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 |
| 29 | a software developed by the people from [First Look | 29 | software developed by the people from [First Look |
| 30 | Media](https://firstlook.media/), the entity behind, amongst other things, | 30 | Media](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, | |||
| 34 | which is unfortunately the only fileformat that it does support. | 34 | which is unfortunately the only fileformat that it does support. |
| 35 | It's interesting to note that it has counter-measures against | 35 | It'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), |
| 37 | a capacity that mat2 [doesn't possess yet](https://0xacab.org/jvoisin/mat2/issues/43). | 37 | a 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, |
| 43 | but it currently [misses a lot of metadata](https://0xacab.org/jvoisin/mat2/issues/85) | 43 | but 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 |
| @@ -84,7 +84,7 @@ but keep in mind by doing so, some metadata \fBwon't be cleaned\fR. | |||
| 84 | 84 | ||
| 85 | While mat2 does its very best to remove every single metadata, | 85 | While mat2 does its very best to remove every single metadata, |
| 86 | it's still in beta, and \fBsome\fR might remain. Should you encounter | 86 | it's still in beta, and \fBsome\fR might remain. Should you encounter |
| 87 | some issues, check the bugtracker: https://0xacab.org/jvoisin/mat2/issues | 87 | some issues, check the bugtracker: https://github.com/jvoisin/mat2/issues |
| 88 | .PP | 88 | .PP |
| 89 | Please use accordingly and be careful. | 89 | Please 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] |
| 14 | Repository = "https://0xacab.org/jvoisin/mat2" | 14 | Repository = "https://github.com/jvoisin/mat2" |
| 15 | Issues = "https://0xacab.org/jvoisin/mat2/-/issues" | 15 | Issues = "https://github.com/jvoisin/mat2/issues" |
| 16 | Changelog = "https://0xacab.org/jvoisin/mat2/-/blob/master/CHANGELOG.md" | 16 | Changelog = "https://github.com/jvoisin/mat2/blob/master/CHANGELOG.md" |
| 17 | 17 | ||
| 18 | [tool.ruff] | 18 | [tool.ruff] |
| 19 | target-version = "py39" | 19 | target-version = "py39" |
| @@ -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 | ) |
