diff --git a/.circleci/config.yml b/.circleci/config.yml index b4b822ad..0eb6f4ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,4 @@ -version: 2.0 +version: 2.1 # heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml @@ -22,7 +22,7 @@ common: &common - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} - run: name: install dependencies - command: pip install --user tox + command: python -m pip install --user tox - run: name: run tox command: python -m tox -r @@ -35,6 +35,30 @@ common: &common - ./eggs key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} +orbs: + win: circleci/windows@5.0.0 + +windows_steps: &windows_steps + executor: + name: win/default + shell: bash.exe + working_directory: C:\Users\circleci\project\ + steps: + - checkout + - restore_cache: + keys: + - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} + - run: + name: install dependencies + command: python -m pip install --user tox + - run: + name: run tox + command: python -m tox -r + - save_cache: + paths: + - .tox + key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} + jobs: docs: <<: *common @@ -42,60 +66,31 @@ jobs: - image: cimg/python:3.8 environment: TOXENV: docs - py37-lint: - <<: *common - docker: - - image: cimg/python:3.7 - environment: - TOXENV: py37-lint + py37-core: <<: *common docker: - image: cimg/python:3.7 environment: TOXENV: py37-core - py38-lint: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-lint py38-core: <<: *common docker: - image: cimg/python:3.8 environment: TOXENV: py38-core - py39-lint: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-lint py39-core: <<: *common docker: - image: cimg/python:3.9 environment: TOXENV: py39-core - py310-lint: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-lint py310-core: <<: *common docker: - image: cimg/python:3.10 environment: TOXENV: py310-core - py311-lint: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-lint py311-core: <<: *common docker: @@ -103,18 +98,91 @@ jobs: environment: TOXENV: py311-core + py37-lint: + <<: *common + docker: + - image: cimg/python:3.7 + environment: + TOXENV: py37-lint + py38-lint: + <<: *common + docker: + - image: cimg/python:3.8 + environment: + TOXENV: py38-lint + py39-lint: + <<: *common + docker: + - image: cimg/python:3.9 + environment: + TOXENV: py39-lint + py310-lint: + <<: *common + docker: + - image: cimg/python:3.10 + environment: + TOXENV: py310-lint + py311-lint: + <<: *common + docker: + - image: cimg/python:3.11 + environment: + TOXENV: py311-lint + + py37-wheel: + <<: *common + docker: + - image: cimg/python:3.7 + environment: + TOXENV: py37-wheel + py38-wheel: + <<: *common + docker: + - image: cimg/python:3.8 + environment: + TOXENV: py38-wheel + py39-wheel: + <<: *common + docker: + - image: cimg/python:3.9 + environment: + TOXENV: py39-wheel + py310-wheel: + <<: *common + docker: + - image: cimg/python:3.10 + environment: + TOXENV: py310-wheel + py311-wheel: + <<: *common + docker: + - image: cimg/python:3.11 + environment: + TOXENV: py311-wheel + + py311-wheel-windows: + <<: *windows_steps + environment: + TOXENV: py311-wheel-windows + workflows: version: 2 test: jobs: - docs - - py37-lint - - py38-lint - - py39-lint - - py310-lint - - py311-lint - py37-core - py38-core - py39-core - py310-core - py311-core + - py37-lint + - py38-lint + - py39-lint + - py310-lint + - py311-lint + - py37-wheel + - py38-wheel + - py39-wheel + - py310-wheel + - py311-wheel + - py311-wheel-windows diff --git a/.gitignore b/.gitignore index 011ac1c8..e0e2be56 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,12 @@ logs # mypy .mypy_cache +# macOS +.DS_Store + +# pyenv +.python-version + # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm # For a more precise, explicit template, see: # https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 @@ -83,9 +89,6 @@ out/ ## Plugin-specific files: -### mpeltonen/sbt-idea plugin -.idea_modules/ - ### JIRA plugin atlassian-ide-plugin.xml diff --git a/docs/conf.py b/docs/conf.py index 6469208c..db3f3492 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -141,7 +141,7 @@ html_theme = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] +# html_static_path = ["_static"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/newsfragments/README.md b/newsfragments/README.md index e4740e4b..0e9b74a2 100644 --- a/newsfragments/README.md +++ b/newsfragments/README.md @@ -8,14 +8,15 @@ relevant to people working on the code itself.) Each file should be named like `..rst`, where `` is an issue number, and `` is one of: -* `feature` -* `bugfix` -* `performance` -* `doc` -* `internal` -* `removal` -* `misc` * `breaking` +* `bugfix` +* `deprecation`, +* `doc` +* `feature` +* `internal` +* `misc` +* `performance` +* `removal` So for example: `123.feature.rst`, `456.bugfix.rst` diff --git a/newsfragments/validate_files.py b/newsfragments/validate_files.py index c4bd29f6..edd5e050 100755 --- a/newsfragments/validate_files.py +++ b/newsfragments/validate_files.py @@ -9,6 +9,7 @@ import sys ALLOWED_EXTENSIONS = { ".breaking.rst", ".bugfix.rst", + ".deprecation.rst", ".doc.rst", ".feature.rst", ".internal.rst", diff --git a/pyproject.toml b/pyproject.toml index 73483504..64f8b8af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,12 +4,12 @@ package = "" filename = "docs/release_notes.rst" directory = "newsfragments" underlines = ["-", "~", "^"] -title_format = " v{version} ({project_date})" +title_format = " v{version} ({project_date})" issue_format = "`#{issue} /issues/{issue}>`__" [[tool.towncrier.type]] -directory = "feature" -name = "Features" +directory = "breaking" +name = "Breaking Changes" showcontent = true [[tool.towncrier.type]] @@ -18,8 +18,8 @@ name = "Bugfixes" showcontent = true [[tool.towncrier.type]] -directory = "performance" -name = "Performance improvements" +directory = "deprecation" +name = "Deprecations" showcontent = true [[tool.towncrier.type]] @@ -28,21 +28,26 @@ name = "Improved Documentation" showcontent = true [[tool.towncrier.type]] -directory = "removal" -name = "Deprecations and Removals" +directory = "feature" +name = "Features" showcontent = true [[tool.towncrier.type]] directory = "internal" -name = "Internal Changes - for Contributors" +name = "Internal Changes - for Contributors" showcontent = true [[tool.towncrier.type]] directory = "misc" -name = "Miscellaneous changes" +name = "Miscellaneous Changes" showcontent = false [[tool.towncrier.type]] -directory = "breaking" -name = "Breaking changes" +directory = "performance" +name = "Performance Improvements" +showcontent = true + +[[tool.towncrier.type]] +directory = "removal" +name = "Removals" showcontent = true diff --git a/setup.py b/setup.py index e4d82fac..00994c25 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ extras_require = { "isort>=5.10.1", "mypy==0.971", # mypy does not follow semver, leave it pinned. "pydocstyle>=6.0.0", - "black>=22", + "black>=23", ], "doc": [ "sphinx>=5.0.0", @@ -60,7 +60,7 @@ setup( install_requires=[ "eth-utils>=2", ], - python_requires=">=3.7.2, <4", + python_requires=">=3.7, <4", extras_require=extras_require, py_modules=[""], license="MIT", diff --git a/tox.ini b/tox.ini index e5255baa..35503e26 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,8 @@ envlist= py{37,38,39,310,311}-core py{37,38,39,310,311}-lint + py{37,38,39,310,311}-wheel + py311-wheel-windows docs [isort] @@ -54,3 +56,32 @@ commands: {[common-lint]commands} [testenv:py{37,38,39,310,311}-lint] extras: {[common-lint]extras} commands: {[common-lint]commands} + +[testenv:py{37,38,39,310,311}-wheel] +deps= + wheel + build[virtualenv] +allowlist_externals= + /bin/rm + /bin/bash +commands= + python -m pip install --upgrade pip + /bin/rm -rf build dist + python -m build + /bin/bash -c 'python -m pip install --upgrade "$(ls dist/-*-py3-none-any.whl)" --progress-bar off' + python -c "import " +skip_install=true + +[testenv:py311-wheel-windows] +deps= + wheel + build[virtualenv] +allowlist_externals= + bash.exe +commands= + python -m pip install --upgrade pip + bash.exe -c "rm -rf build dist" + python -m build + bash.exe -c 'python -m pip install --upgrade "$(ls dist/-*-py3-none-any.whl)" --progress-bar off' + python -c "import " +skip_install=true