Skip to content

Commit

Permalink
Merge branch 'fsfe:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kbroch-rivosinc authored Jun 10, 2024
2 parents 5d53bee + 3831234 commit 092e17c
Show file tree
Hide file tree
Showing 76 changed files with 13,412 additions and 6,831 deletions.
28 changes: 0 additions & 28 deletions .bumpversion.cfg

This file was deleted.

19 changes: 16 additions & 3 deletions .github/workflows/gettext.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPDX-FileCopyrightText: 2023 Carmen Bianca BAKKER <carmenbianca@fsfe.org>
# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -22,8 +23,16 @@ jobs:
# exception to the branch protection, so we'll use that account's
# token to push to the main branch.
token: ${{ secrets.FSFE_SYSTEM_TOKEN }}
- name: Install gettext
run: sudo apt-get install -y gettext
- name: Install gettext and wlc
run: sudo apt-get install -y gettext wlc
- name: Lock Weblate
run: |
wlc --url https://hosted.weblate.org/api/ --key ${{secrets.WEBLATE_KEY }} lock fsfe/reuse-tool
- name: Push changes from Weblate to upstream repository
run: |
wlc --url https://hosted.weblate.org/api/ --key ${{secrets.WEBLATE_KEY }} push fsfe/reuse-tool
- name: Pull Weblate translations
run: git pull origin main
- name: Create .pot file
run: make create-pot
# Normally, POT-Creation-Date changes in two locations. Check if the diff
Expand All @@ -32,7 +41,7 @@ jobs:
id: diff
run:
echo "changed=$(git diff -U0 | grep '^[+|-][^+|-]' | grep -Ev
'^[+-]"POT-Creation-Date' | wc -l)" >> $GITHUB_OUTPUT
'^[+-]("POT-Creation-Date|#:)' | wc -l)" >> $GITHUB_OUTPUT
- name: Commit and push updated reuse.pot
if: ${{ steps.diff.outputs.changed != '0' }}
run: |
Expand All @@ -41,3 +50,7 @@ jobs:
git add po/reuse.pot po/*.po
git commit -m "Update reuse.pot"
git push origin main
- name: Unlock Weblate
run: |
wlc --url https://hosted.weblate.org/api/ --key ${{ secrets.WEBLATE_KEY }} pull fsfe/reuse-tool
wlc --url https://hosted.weblate.org/api/ --key ${{ secrets.WEBLATE_KEY }} unlock fsfe/reuse-tool
2 changes: 1 addition & 1 deletion .github/workflows/pijul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: 3.x
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction --only main,test
# TODO: As soon as a binary is available for Ubuntu 22.04, use it instead
# of manually building it.
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction --only main,test
- name: Run tests with pytest
run: |
Expand All @@ -52,7 +52,7 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction --only main,dev,test
- name: Lint with Pylint
run: |
Expand All @@ -68,12 +68,12 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction --only dev
- name: Test formatting with black
run: |
poetry run isort --check src/ tests/
poetry run black .
poetry run black --check .
mypy:
runs-on: ubuntu-22.04
Expand All @@ -82,10 +82,10 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction --only main,dev,test
- name: Test typing with mypy
run: |
Expand All @@ -111,11 +111,10 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction --only main
- name: Test REUSE compliance
run: |
make reuse
run: make reuse

docs:
runs-on: ubuntu-22.04
Expand All @@ -127,8 +126,8 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install -r docs/requirements.txt
pip install poetry~=1.3.0
poetry install --no-interaction --only main,docs
- name: Create docs with Sphinx
run: |
make docs-ci
make docs
4 changes: 2 additions & 2 deletions .github/workflows/third_party_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction
# Clone and lint repositories
- name: Clone and lint repositories
Expand All @@ -59,7 +59,7 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.2.0
pip install poetry~=1.3.0
poetry install --no-interaction
# Clone and lint repositories
- name: Clone and lint repositories
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ po/reuse.pot
docs/api/
docs/history.md
docs/readme.md
docs/contributing.md
docs/contribute.md
prof/

# Nix-related
Expand Down
10 changes: 7 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

repos:
- repo: https://github.com/psf/black
rev: 23.10.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
Expand All @@ -20,9 +20,13 @@ repos:
name: isort (pyi)
types: [pyi]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.10.0
hooks:
- id: mypy
# This is a bit annoying. There are probably more dependencies that need
# to be defined here for identical behaviour between `poetry run mypy`
# and `pre-commit run mypy`.
additional_dependencies: [attrs==23.2.0]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
Expand Down
15 changes: 7 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
version: 2

build:
# This should mirror the configuration in ./.github/workflows/pythonpackage.yaml
os: "ubuntu-20.04"
# This should mirror the configuration in ./.github/workflows/test.yaml
os: ubuntu-22.04
tools:
python: "3.8"

python:
install:
# This file is generated with poetry as follows:
# poetry export --with docs --without-hashes >docs/requirements-docs.txt
- requirements: docs/requirements.txt
jobs:
post_create_environment:
- pip install poetry
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs

sphinx:
configuration: docs/conf.py
36 changes: 0 additions & 36 deletions .reuse/dep5

This file was deleted.

53 changes: 50 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,66 @@ CLI command and its behaviour. There are no guarantees of stability for the
### Security
-->

## Unreleased - YYYY-MM-DD
## 3.1.0a1 - 2024-05-28

### Added

- Added support for `REUSE.toml`. (#863)
- Manpages added for all `reuse` commands. Distribution maintainers might wish
to distribute the (Sphinx-built) manpages. (#975)
- More file types are recognised:
- Assembler (`.asm`) (#928)
- GraphQL (`.graphqls`, `.gqls`) (#930)
- CUDA-C++ (`.cu`, `.cuh`) (#938)
- Various .NET files (`.csproj`, `.fsproj`, `.fsx`, `.props`, `.sln`,
`.vbproj`) (#940)
- Cargo (`Cargo.lock`) (#937)
- Clang-Tidy (`.clang-tidy`) (#961)
- Java `.properties` files (#968)
- Apache HTTP server config `.htaccess` files (#985)
- npm `.npmrc` files (#985)
- LaTeX class files (`.cls`) (#971)
- Added comment styles:
- `man` for UNIX Man pages (`.man`) (#954)
- Added `--lines` output option for `lint`. (#956)
- Treat `% !TEX` and `% !BIB` as shebangs in TeX and BibTeX files, respectively
(#971)

### Changed

- Updated SPDX resources to 3.24.0. (#994)
- Updated REUSE specification version to 3.2. (#994)
- `.s` files now use the Python comment style as per GNU Assembler (gas). (#928)
- Previously, any file that begins with `COPYING` or `LICENSE` was ignored. This
has been changed. Now, files like `COPYING_README` are no longer ignored, but
`COPYING` and `COPYING.txt` are still ignored (in other words: exact matches,
or `COPYING` + a file extension). Idem ditto for `LICENSE`. (#886)
- Dependencies added:
- `attrs>=21.1` (#863)
- `tomlkit>=0.8` (#863)

### Deprecated

### Removed
- `.reuse/dep5` is marked deprecated. `reuse convert-dep5` will help you switch
to `REUSE.toml`. (#863)

### Fixed

### Security
- Clearer instructions for `--suppress-deprecation` in deprecation warning.
(#949)
- The datetime value for `Created:` was wrongly formatted since 3.0.0. It now
returns a correctly formatted ISO 8601 date again. (#952)
- Repaired the behaviour of `reuse download` where being inside of a LICENSES/
directory should not create a deeper LICENSES/LICENSES/ directory. (#975)
- Support annotating a file that contains only a shebang. (#965)
- Add `CONTRIBUTING.md` to the sdist. (#987)

## 3.0.2 - 2024-04-08

### Fixed

- `annotate`'s '`--style` now works again when used for a file with an
unrecognised extension. (#909)

## 3.0.1 - 2024-01-19

Expand Down
13 changes: 10 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ Next, you'll find the following commands handy:
### Poetry

Because our downstreams may not have a very recent version of Poetry, we should
target `poetry-core>=1.1.0` and `poetry~=1.2.0` when interacting with Poetry,
target `poetry-core>=1.4.0` and `poetry~=1.3.0` when interacting with Poetry,
especially when generating the `poetry.lock` file. You can
`pip install poetry~=1.2.0` to ascertain that you always get this right.
`pip install poetry~=1.3.0` to ascertain that you always get this right.

In order to update the `poetry.lock` file while changing as few lines as
possible, run `poetry lock --no-update`.
Expand All @@ -70,7 +70,7 @@ possible, run `poetry lock --no-update`.

- Verify changelog
- Create branch release-x.y.z
- `bumpversion --new-version x.y.z minor`
- `bumpver update --set-version vx.y.z`
- `make update-resources`
- Alter changelog
- Do some final tweaks/bugfixes (and alter changelog)
Expand All @@ -83,6 +83,13 @@ possible, run `poetry lock --no-update`.
- `git merge release-x.y.z`
- `git push origin main`
- Create a release on GitHub.

### After release

- Update readthedocs (if not happened automatically)
- Update API worker: https://git.fsfe.org/reuse/api-worker#user-content-server
- Make sure package is updated in distros (contact maintainers)
- Update the revision in `dev.md` of
[reuse-website](https://github.com/fsfe/reuse-website).
- If a major release, make sure
[reuse-action](https://github.com/fsfe/reuse-action/) is updated.
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ lint-third-party: ## Lint selected third-party repositories to compare with expe

.PHONY: docs
docs: clean-docs ## generate Sphinx HTML documentation, including API docs
poetry export --with docs --without-hashes >docs/requirements.txt
$(MAKE) -C docs html

.PHONY: docs-ci
docs-ci: ## generate Sphinx HTML documentation, including API docs without dependency file generation (for CI)
$(MAKE) -C docs html
$(MAKE) -C docs html man

.PHONY: dist
dist: clean-build clean-pyc clean-docs ## builds source and wheel package
Expand All @@ -71,7 +66,7 @@ dist: clean-build clean-pyc clean-docs ## builds source and wheel package

.PHONY: create-pot
create-pot: ## generate .pot file
xgettext --add-comments --from-code=utf-8 --output=po/reuse.pot --files-from=po/POTFILES.in
xgettext --add-comments --from-code=utf-8 --output=po/reuse.pot src/reuse/**.py
xgettext --add-comments --output=po/argparse.pot /usr/lib*/python3*/argparse.py
msgcat --output=po/reuse.pot po/reuse.pot po/argparse.pot
for name in po/*.po; do \
Expand Down
Loading

0 comments on commit 092e17c

Please sign in to comment.