Skip to content

Commit be01069

Browse files
authored
Merge pull request ethereum#70 from fselmo/minor-cleanup
Do not invoke `setup.py` directly; minor refactor + cleanup
2 parents 7b0bc76 + 7c85f95 commit be01069

File tree

5 files changed

+24
-25
lines changed

5 files changed

+24
-25
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
## What was wrong?
1+
### What was wrong?
22

3-
Issue #
3+
Related to issue #
44

5-
## How was it fixed?
6-
7-
Summary of approach.
5+
### How was it fixed?
86

97
### To-Do
108

119
[//]: # (Stay ahead of things, add list items here!)
1210
- [ ] Clean up commit history
1311

14-
[//]: # (For important changes that should go into the release notes please add a newsfragment file as explained here: https://github.com/ethereum/<REPO_NAME>/blob/master/newsfragments/README.md)
15-
1612
[//]: # (See: https://<RTD_NAME>.readthedocs.io/en/latest/contributing.html#pull-requests)
1713
- [ ] Add entry to the [release notes](https://github.com/ethereum/<REPO_NAME>/blob/master/newsfragments/README.md)
1814

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ clean-pyc:
2828
find . -name '__pycache__' -exec rm -rf {} +
2929

3030
lint:
31-
tox -elint
31+
tox -e lint
3232

3333
lint-roll:
3434
isort <MODULE_NAME> tests
@@ -83,11 +83,11 @@ release: check-bump clean
8383
git config commit.gpgSign true
8484
bumpversion $(bump)
8585
git push upstream && git push upstream --tags
86-
python setup.py sdist bdist_wheel
86+
python -m build
8787
twine upload dist/*
8888
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"
8989

9090

9191
dist: clean
92-
python setup.py sdist bdist_wheel
92+
python -m build
9393
ls -l dist

newsfragments/70.internal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Do not invoke ``setup.py`` directly. Minor cleanup and refactors in newsfragment ``README.md`` and newsfragment validation. Minot cleanup in ``Makefile``.

newsfragments/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ commit message and PR description, which are a description of the change as
66
relevant to people working on the code itself.)
77

88
Each file should be named like `<ISSUE>.<TYPE>.rst`, where
9-
`<ISSUE>` is an issue numbers, and `<TYPE>` is one of:
9+
`<ISSUE>` is an issue number, and `<TYPE>` is one of:
1010

1111
* `feature`
1212
* `bugfix`
@@ -24,5 +24,5 @@ then open up the PR first and use the PR number for the newsfragment.
2424

2525
Note that the `towncrier` tool will automatically
2626
reflow your text, so don't try to do any fancy formatting. Run
27-
`towncrier build --draft` to get a preview of what the release notes entry
27+
`towncrier build --draft` to get a preview of what the release notes entry
2828
will look like in the final release notes.

newsfragments/validate_files.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@
88
import sys
99

1010
ALLOWED_EXTENSIONS = {
11-
'.breaking.rst',
12-
'.bugfix.rst',
13-
'.doc.rst',
14-
'.feature.rst',
15-
'.internal.rst',
16-
'.misc.rst',
17-
'.performance.rst',
18-
'.removal.rst',
11+
".breaking.rst",
12+
".bugfix.rst",
13+
".doc.rst",
14+
".feature.rst",
15+
".internal.rst",
16+
".misc.rst",
17+
".performance.rst",
18+
".removal.rst",
1919
}
2020

2121
ALLOWED_FILES = {
22-
'validate_files.py',
23-
'README.md',
22+
"validate_files.py",
23+
"README.md",
2424
}
2525

2626
THIS_DIR = pathlib.Path(__file__).parent
2727

2828
num_args = len(sys.argv) - 1
2929
assert num_args in {0, 1}
3030
if num_args == 1:
31-
assert sys.argv[1] in ('is-empty', )
31+
assert sys.argv[1] in ("is-empty",)
3232

3333
for fragment_file in THIS_DIR.iterdir():
3434

@@ -38,7 +38,9 @@
3838
full_extension = "".join(fragment_file.suffixes)
3939
if full_extension not in ALLOWED_EXTENSIONS:
4040
raise Exception(f"Unexpected file: {fragment_file}")
41-
elif sys.argv[1] == 'is-empty':
41+
elif sys.argv[1] == "is-empty":
4242
raise Exception(f"Unexpected file: {fragment_file}")
4343
else:
44-
raise RuntimeError("Strange: arguments {sys.argv} were validated, but not found")
44+
raise RuntimeError(
45+
f"Strange: arguments {sys.argv} were validated, but not found"
46+
)

0 commit comments

Comments
 (0)