Skip to content

Commit 988c2e7

Browse files
committed
address review: remove tox envs and pre-commit hook
Per review feedback from @emdneto: - Remove changelog/new-changelog tox envs (they generate CI jobs) - Remove pre-commit hook (not all PRs need changelog, PR number unknown at commit time) - Simplify CONTRIBUTING.md to document direct file creation - Regenerate misc.yml Assisted-by: Claude Opus 4.6
1 parent 9f096aa commit 988c2e7

5 files changed

Lines changed: 6 additions & 159 deletions

File tree

.github/workflows/misc.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -29,44 +29,6 @@ env:
2929

3030
jobs:
3131

32-
changelog:
33-
name: changelog
34-
runs-on: ubuntu-latest
35-
timeout-minutes: 30
36-
steps:
37-
- name: Checkout repo @ SHA - ${{ github.sha }}
38-
uses: actions/checkout@v4
39-
40-
- name: Set up Python 3.11
41-
uses: actions/setup-python@v5
42-
with:
43-
python-version: "3.11"
44-
45-
- name: Install tox
46-
run: pip install tox-uv
47-
48-
- name: Run tests
49-
run: tox -e changelog
50-
51-
new-changelog:
52-
name: new-changelog
53-
runs-on: ubuntu-latest
54-
timeout-minutes: 30
55-
steps:
56-
- name: Checkout repo @ SHA - ${{ github.sha }}
57-
uses: actions/checkout@v4
58-
59-
- name: Set up Python 3.11
60-
uses: actions/setup-python@v5
61-
with:
62-
python-version: "3.11"
63-
64-
- name: Install tox
65-
run: pip install tox-uv
66-
67-
- name: Run tests
68-
run: tox -e new-changelog
69-
7032
spellcheck:
7133
name: spellcheck
7234
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,3 @@ repos:
1919
- id: rstcheck
2020
additional_dependencies: ['rstcheck[sphinx]']
2121
args: ["--report-level", "warning"]
22-
- repo: local
23-
hooks:
24-
- id: changelog
25-
name: changelog fragment check
26-
language: system
27-
entry: python scripts/check_changelog_fragment.py
28-
pass_filenames: false
29-
always_run: true

CONTRIBUTING.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,13 @@ This project uses [towncrier](https://towncrier.readthedocs.io/) to manage the c
7979

8080
**Creating a changelog fragment:**
8181

82-
```console
83-
tox -e new-changelog -- PR_NUMBER TYPE "Description of the change"
84-
```
82+
Create a file named `.changelog/<PR_NUMBER>.<TYPE>` where `TYPE` is one of: `added`, `changed`, `deprecated`, `removed`, `fixed`.
8583

86-
Where `TYPE` is one of: `added`, `changed`, `deprecated`, `removed`, `fixed`.
84+
The file should contain a one-line description of the change. For example, `.changelog/1234.added`:
8785

88-
For example:
89-
90-
```console
91-
tox -e new-changelog -- 1234 added "`opentelemetry-sdk`: add support for new feature"
9286
```
93-
94-
This creates a file `.changelog/1234.added` containing the description. You can also create the file manually — it's just a text file with the description on one line.
87+
`opentelemetry-sdk`: add support for new feature
88+
```
9589

9690
**Writing a good changelog entry:**
9791

@@ -103,12 +97,10 @@ This creates a file `.changelog/1234.added` containing the description. You can
10397
**Preview the changelog:**
10498

10599
```console
106-
tox -e changelog
100+
towncrier build --draft --version Unreleased
107101
```
108102

109-
Running `tox -e precommit` will check that a changelog fragment exists for your branch and remind you to create one if missing.
110-
111-
The CI will also verify that a changelog fragment exists and that `CHANGELOG.md` is not directly modified.
103+
The CI will verify that a changelog fragment exists and that `CHANGELOG.md` is not directly modified.
112104

113105
If your change does not need a changelog entry, add the "Skip Changelog" label to the PR.
114106

scripts/check_changelog_fragment.py

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

tox.ini

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ envlist =
103103
lint-opentelemetry-test-utils
104104

105105
lint-license-header-check
106-
changelog
107-
new-changelog
108106
spellcheck
109107
tracecontext
110108
typecheck
@@ -357,28 +355,6 @@ commands =
357355
commands_post =
358356
docker-compose down -v
359357

360-
[testenv:changelog]
361-
description = Preview the changelog that would be generated from current fragments
362-
deps =
363-
towncrier
364-
commands =
365-
towncrier build --draft --version Unreleased {posargs}
366-
367-
[testenv:new-changelog]
368-
description = Create a new changelog fragment: tox -e new-changelog -- PR_NUMBER TYPE "DESCRIPTION"
369-
deps =
370-
allowlist_externals =
371-
python
372-
commands =
373-
python -c "import sys; \
374-
args = sys.argv[1:]; \
375-
len(args) >= 3 or sys.exit('Usage: tox -e new-changelog -- PR_NUMBER TYPE DESCRIPTION\\nTYPE must be one of: added, changed, deprecated, removed, fixed'); \
376-
pr, typ, desc = args[0], args[1], ' '.join(args[2:]); \
377-
typ in ('added', 'changed', 'deprecated', 'removed', 'fixed') or sys.exit(f'Invalid type: {{typ}}. Must be one of: added, changed, deprecated, removed, fixed'); \
378-
open(f'.changelog/{{pr}}.{{typ}}', 'w').write(desc + '\\n'); \
379-
print(f'Created .changelog/{{pr}}.{{typ}}')" \
380-
{posargs}
381-
382358
[testenv:lint-license-header-check]
383359
commands =
384360
python {toxinidir}/scripts/check_license_header.py

0 commit comments

Comments
 (0)