Skip to content

Commit

Permalink
Upgrade template (#50)
Browse files Browse the repository at this point in the history
* bump docs dependencies

* new github issue and pr templates (#75)

* new issue and pr templates

* convert bash scripts to py (#77)

* convert bash scripts to py

* Various template default updates (#74)

* bump versions in dependencies and ci builds

* move tox to [dev] per issue #34

* move RTD deps pointer into .readthedocs.yml

* unpin flake8 add flake8-bugbear to lint deps

* remove outdated sections of README (#76)

* remove gitter, testing setup, and pandoc sections, add quotes to dev install

* repin flake8 and misc updates (#79)

* repin flake8, bump tox to >=4.0.0 as that's where whitelist was deprecated, misc updates

* template cleanup following initial merge with py-evm (#80)

* template cleanup following initial merge with py-evm

* add flake8 pin comment

* correct license years

* add pin note to mypy

* apply template updates found following merge with eth-typing (#81)

* apply template updates found following merge with eth-typing

* add build as a dev dependency

* remove timeout from pytest.ini, it doesn't do anything without pytest-timeout as a dep

* Template updates post ssz and ethabi (#82)

* add updates found when merging template with py-ssz and eth-abi

* add wheel and wheel-windows to ci and reorg

* upgrade pip and remove --user from tox install during ci (#85)

* introduce contributing doc + main branch convention (#84)

* update tox calls to use run, update all pip calls to use python -m (#86)

* Remove testall (#88)

* remove testall because it doesnt work

* minor formatting updates, remove contributing docs

* bump sphinx version and set py version rtd uses to 3.8

* change references to doc to all be docs

* Update .gitignore spelling error

* fix typos in ci config and Makefile

* Add tests to distribution by default (#97)

* Update release command to check remote for upstream

* Update .gitignore

add `.venv*` to .gitignore

* ignore flake8 F401 errors in __init__.py files

* Reverts

* Drop python 3.7

* Sphinx 5 -> 6

* Revert dropping py37

* Newsfragment

---------

Co-authored-by: pacrob <pacrob@protonmail.com>
Co-authored-by: Paul Robinson <5199899+pacrob@users.noreply.github.com>
Co-authored-by: Marc Garreau <3621728+wolovim@users.noreply.github.com>
Co-authored-by: kclowes <kclowes@users.noreply.github.com>
  • Loading branch information
5 people committed Sep 28, 2023
1 parent 6acf843 commit 62c05eb
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Expand Up @@ -14,7 +14,7 @@ common: &common
command: ./.circleci/merge_pr.sh
when: on_fail
- run:
name: merge pull request base (3nd try)
name: merge pull request base (3rd try)
command: ./.circleci/merge_pr.sh
when: on_fail
- restore_cache:
Expand All @@ -27,7 +27,7 @@ common: &common
python -m pip install tox
- run:
name: run tox
command: python -m tox -r
command: python -m tox run -r
- save_cache:
paths:
- .hypothesis
Expand Down Expand Up @@ -57,7 +57,7 @@ windows_steps: &windows_steps
python -m pip install tox
- run:
name: run tox
command: python -m tox -r
command: python -m tox run -r
- save_cache:
paths:
- .tox
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Expand Up @@ -65,6 +65,8 @@ body:
- type: textarea
id: pip-freeze
attributes:
label: Output from pip-freeze
description: Run `pip-freeze` and paste the output below
label: Output from `pip freeze`
description: Run `python -m pip freeze` and paste the output below
render: shell
validations:
required: false
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -20,6 +20,7 @@ lib
lib64
pip-wheel-metadata
venv*
.venv*

# Installer logs
pip-log.txt
Expand Down Expand Up @@ -51,7 +52,7 @@ docs/*._utils.*
# Blockchain
chains

# Hypothese Property base testing
# Hypothesis Property base testing
.hypothesis

# tox/pytest cache
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Expand Up @@ -13,4 +13,4 @@ python:
- method: pip
path: .
extra_requirements:
- doc
- docs
12 changes: 4 additions & 8 deletions Makefile
Expand Up @@ -5,10 +5,9 @@ CURRENT_SIGN_SETTING := $(shell git config commit.gpgSign)
help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "lint - check style with flake8"
@echo "lint-roll - automatically fix problems with isort, flake8, etc"
@echo "lint - check style with mypy, flake8, isort, pydocstyle, and black"
@echo "lint-roll - automatically fix problems with flake8 and black"
@echo "test - run tests quickly with the default Python"
@echo "testall - run tests on every Python version with tox"
@echo "docs - generate docs and open in browser (linux-docs for version on linux)"
@echo "notes - consume towncrier newsfragments/ and update release notes in docs/"
@echo "release - package and upload a release (does not run notes target)"
Expand All @@ -28,7 +27,7 @@ clean-pyc:
find . -name '__pycache__' -exec rm -rf {} +

lint:
tox -e lint
tox run -e lint

lint-roll:
isort eth_typing tests
Expand All @@ -38,9 +37,6 @@ lint-roll:
test:
pytest tests

test-all:
tox

build-docs:
sphinx-apidoc -o docs/ . setup.py "*conftest*"
$(MAKE) -C docs clean
Expand Down Expand Up @@ -75,7 +71,7 @@ notes: check-bump

release: check-bump test clean
# require that you be on a branch that's linked to upstream/master
git status -s -b | head -1 | grep "\.\.upstream/master"
git remote -v | grep "upstream\tgit@github.com:ethereum/eth-typing.git (push)\|upstream\thttps://github.com/ethereum/eth-typing (push)"
# verify that docs build correctly
./newsfragments/validate_files.py is-empty
make build-docs
Expand Down
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -5,7 +5,6 @@
[![PyPI version](https://badge.fury.io/py/eth-typing.svg)](https://badge.fury.io/py/eth-typing)
[![Python versions](https://img.shields.io/pypi/pyversions/eth-typing.svg)](https://pypi.python.org/pypi/eth-typing)
[![Docs build](https://readthedocs.org/projects/eth-typing/badge/?version=latest)](https://eth-typing.readthedocs.io/en/latest/?badge=latest)


Common type annotations for ethereum python packages.

Expand All @@ -14,7 +13,7 @@ Read more in the [documentation on ReadTheDocs](https://eth-typing.readthedocs.i
## Quickstart

```sh
pip install eth-typing
python -m pip install eth-typing
```

## Developer Setup
Expand All @@ -37,7 +36,7 @@ git clone git@github.com:ethereum/eth-typing.git
cd eth-typing
virtualenv -p python3 venv
. venv/bin/activate
pip install -e ".[dev]"
python -m pip install -e ".[dev]"
```

### Release setup
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -190,7 +190,7 @@
# html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = "eth_typingdoc"
htmlhelp_basename = "eth_typingdocs"


# -- Options for LaTeX output ---------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Expand Up @@ -12,7 +12,6 @@ Contents
eth_typing
release_notes


Indices and tables
------------------

Expand Down
1 change: 1 addition & 0 deletions newsfragments/50.internal.rst
@@ -0,0 +1 @@
Fix release command by checking the git remote upstream configuration and merge other minor template updates.
4 changes: 2 additions & 2 deletions newsfragments/README.md
Expand Up @@ -11,7 +11,7 @@ Each file should be named like `<ISSUE>.<TYPE>.rst`, where
* `breaking`
* `bugfix`
* `deprecation`
* `doc`
* `docs`
* `feature`
* `internal`
* `misc`
Expand All @@ -26,4 +26,4 @@ then open up the PR first and use the PR number for the newsfragment.
Note that the `towncrier` tool will automatically
reflow your text, so don't try to do any fancy formatting. Run
`towncrier build --draft` to get a preview of what the release notes entry
will look like in the final release notes.
will look like in the final release notes.
2 changes: 1 addition & 1 deletion newsfragments/validate_files.py
Expand Up @@ -10,7 +10,7 @@
".breaking.rst",
".bugfix.rst",
".deprecation.rst",
".doc.rst",
".docs.rst",
".feature.rst",
".internal.rst",
".misc.rst",
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Expand Up @@ -23,7 +23,7 @@ name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "doc"
directory = "docs"
name = "Improved Documentation"
showcontent = true

Expand All @@ -39,12 +39,12 @@ showcontent = true

[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous changes"
name = "Miscellaneous Changes"
showcontent = false

[[tool.towncrier.type]]
directory = "performance"
name = "Performance improvements"
name = "Performance Improvements"
showcontent = true

[[tool.towncrier.type]]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -18,7 +18,7 @@
"pydocstyle>=6.0.0",
"black>=23",
],
"doc": [
"docs": [
"sphinx>=5.0.0",
"sphinx_rtd_theme>=1.0.0",
"towncrier>=21,<22",
Expand All @@ -38,7 +38,7 @@
extras_require["dev"]
+ extras_require["test"]
+ extras_require["lint"]
+ extras_require["doc"]
+ extras_require["docs"]
)


Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Expand Up @@ -16,9 +16,10 @@ multi_line_output=3
profile=black

[flake8]
max-line-length=88
exclude=venv*,.tox,docs,build
extend-ignore=E203
max-line-length=88
per-file-ignores=__init__.py:F401

[testenv]
usedevelop=True
Expand All @@ -34,7 +35,7 @@ basepython=
py311: python3.11
extras=
test
docs: doc
docs
allowlist_externals=make

[common-lint]
Expand Down Expand Up @@ -72,7 +73,7 @@ commands=
python -c "import eth_typing"
skip_install=true

[testenv:py11-wheel-windows]
[testenv:py311-wheel-windows]
deps=
wheel
build[virtualenv]
Expand Down

0 comments on commit 62c05eb

Please sign in to comment.