Skip to content

Commit

Permalink
Use declarative setuptools (#7629)
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Mar 30, 2023
1 parent 24da06a commit 78a926d
Show file tree
Hide file tree
Showing 13 changed files with 493 additions and 2,156 deletions.
32 changes: 0 additions & 32 deletions .coveragerc

This file was deleted.

37 changes: 37 additions & 0 deletions .flake8
@@ -0,0 +1,37 @@
# flake8 doesn't support pyproject.toml yet https://github.com/PyCQA/flake8/issues/234
[flake8]
# References:
# https://flake8.readthedocs.io/en/latest/user/configuration.html
# https://flake8.readthedocs.io/en/latest/user/error-codes.html

# Note: there cannot be spaces after commas here
exclude = __init__.py,versioneer.py,distributed/_concurrent_futures_thread.py
ignore =
# Ignores below are aligned with black https://github.com/psf/black/blob/main/.flake8
# Whitespace before ':'
E203
# Too many leading '#' for block comment
E266
# Line too long, ignored in favor of B950
E501
# Line break occurred before a binary operator
W503
# Line too long
B950
# No explicit stacklevel in warnings.warn. FIXME we should correct this in the code
B028

per-file-ignores =
**/tests/*:
# Module level import not at top of file (to silence on pytest.importorskip)
# See https://github.com/PyCQA/pycodestyle/issues/472
E402,
# Do not use variables named 'I', 'O', or 'l'
E741,
# Local variable name is assigned to but never used
F841,
# Do not call assert False since python -O removes these calls
B011,

# B950 will only trigger at 88
max-line-length = 80
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Expand Up @@ -6,9 +6,9 @@ on:
pull_request:
paths:
- setup.py
- requirements.txt
- continuous_integration/recipes/**
- .github/workflows/conda.yml
- pyproject.toml

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Expand Up @@ -154,7 +154,7 @@ jobs:
shell: bash -l {0}
# No SIGALRM available on Windows
if: ${{ matrix.os != 'windows-latest' }}
run: sed -i.bak 's/timeout_method = thread/timeout_method = signal/' setup.cfg
run: sed -i.bak 's/timeout_method = "thread"/timeout_method = "signal"/' pyproject.toml

- name: Disable IPv6
shell: bash -l {0}
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Expand Up @@ -22,7 +22,6 @@ repos:
hooks:
- id: black
language_version: python3
exclude: versioneer.py
args:
- --target-version=py38
- repo: https://github.com/pycqa/flake8
Expand All @@ -38,14 +37,16 @@ repos:
rev: v2.2.2
hooks:
- id: codespell
additional_dependencies:
- tomli
types_or: [rst, markdown]
files: docs
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.0
hooks:
- id: mypy
# Override default --ignore-missing-imports
# Use setup.cfg if possible instead of adding command line parameters here
# Use pyproject.toml if possible instead of adding command line parameters here
args: [--warn-unused-configs]
additional_dependencies:
# Type stubs
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Expand Up @@ -15,10 +15,8 @@ include setup.py
include README.rst
include LICENSE.txt
include MANIFEST.in
include requirements.txt
include distributed/py.typed
exclude distributed/pytest_resourceleaks.py

prune docs/_build
include versioneer.py
include distributed/_version.py
2 changes: 2 additions & 0 deletions continuous_integration/recipes/distributed/meta.yaml
Expand Up @@ -27,6 +27,8 @@ requirements:
- python >=3.8
- pip
- dask-core {{ dask_version }}
- versioneer =0.28
- tomli # [py<311]
run:
- python >=3.8
- click >=8.0
Expand Down

0 comments on commit 78a926d

Please sign in to comment.