Skip to content

Commit 02d4655

Browse files
chore: pass repo review (#219)
* chore: pass repo review * chore: add `noxfile` * chore: fix pre-commit check * Add `noxfile` to `MANIFEST.in` * Ignore `DeprecationWarning`s * Update setup.cfg Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> * chore: cleanup the changes made by pre-commit * chore: add license badge and update MANIFEST.in Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
1 parent dfeead2 commit 02d4655

18 files changed

+672
-683
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
## Development install
32

4-
You should *always* use a virtual environment when developing software. Setup:
3+
You should _always_ use a virtual environment when developing software. Setup:
54

65
```bash
76
python3 -m venv .env
@@ -21,7 +20,6 @@ python -m ipykernel install --user --name vector # For notebooks
2120

2221
You can update the environment with `conda env update`.
2322

24-
2523
## Docs
2624

2725
The documentation is in `/docs`. To rebuild the API docs:

.github/workflows/cd.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@ on:
44
workflow_dispatch:
55
release:
66
types:
7-
- published
7+
- published
88

99
jobs:
1010
dist:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
with:
15-
fetch-depth: 0
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
1616

17-
- name: Build SDist and wheel
18-
run: pipx run build
17+
- name: Build SDist and wheel
18+
run: pipx run build
1919

20-
- uses: actions/upload-artifact@v3
21-
with:
22-
path: dist/*
20+
- uses: actions/upload-artifact@v3
21+
with:
22+
path: dist/*
2323

24-
- name: Check metadata
25-
run: pipx run twine check dist/*
24+
- name: Check metadata
25+
run: pipx run twine check dist/*
2626

2727
publish:
2828
needs: [dist]
2929
runs-on: ubuntu-latest
3030
if: github.event_name == 'release' && github.event.action == 'published'
3131

3232
steps:
33-
- uses: actions/download-artifact@v3
34-
with:
35-
name: artifact
36-
path: dist
37-
38-
- uses: pypa/gh-action-pypi-publish@v1.5.0
39-
with:
40-
user: __token__
41-
password: ${{ secrets.pypi_password }}
33+
- uses: actions/download-artifact@v3
34+
with:
35+
name: artifact
36+
path: dist
37+
38+
- uses: pypa/gh-action-pypi-publish@v1.5.0
39+
with:
40+
user: __token__
41+
password: ${{ secrets.pypi_password }}

.github/workflows/ci.yml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- main
8-
- develop
7+
- main
8+
- develop
99
workflow_dispatch:
1010

1111
concurrency:
@@ -19,71 +19,71 @@ jobs:
1919
runs-on: ubuntu-latest
2020
name: Check SDist
2121
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-python@v4
24-
with:
25-
python-version: 3.x
26-
- uses: pre-commit/action@v3.0.0
27-
with:
28-
extra_args: --hook-stage manual check-manifest
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.x
26+
- uses: pre-commit/action@v3.0.0
27+
with:
28+
extra_args: --hook-stage manual check-manifest
2929

3030
checks:
3131
runs-on: ubuntu-latest
3232
strategy:
3333
fail-fast: false
3434
matrix:
3535
python-version:
36-
- 3.6
37-
- 3.7
38-
- 3.8
39-
- 3.9
36+
- 3.6
37+
- 3.7
38+
- 3.8
39+
- 3.9
4040
name: Check Python ${{ matrix.python-version }}
4141
steps:
42-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@v3
4343

44-
- uses: actions/setup-python@v4
45-
with:
46-
python-version: ${{ matrix.python-version }}
44+
- uses: actions/setup-python@v4
45+
with:
46+
python-version: ${{ matrix.python-version }}
4747

48-
- name: Requirements check
49-
run: python -m pip list
48+
- name: Requirements check
49+
run: python -m pip list
5050

51-
- name: Install package
52-
run: python -m pip install -e .[test]
51+
- name: Install package
52+
run: python -m pip install -e .[test]
5353

54-
- name: Test light package
55-
run: python -m pytest -ra
54+
- name: Test light package
55+
run: python -m pytest -ra
5656

57-
- name: Install develop extras
58-
run: python -m pip install -e .[dev]
57+
- name: Install develop extras
58+
run: python -m pip install -e .[dev]
5959

60-
- name: Test package
61-
run: python -m pytest -ra --cov=vector tests/
60+
- name: Test package
61+
run: python -m pytest -ra --cov=vector tests/
6262

63-
- name: Run doctests
64-
run: xdoctest ./src/vector/
63+
- name: Run doctests
64+
run: xdoctest ./src/vector/
6565

66-
- name: Upload coverage report
67-
uses: codecov/codecov-action@v3.1.0
66+
- name: Upload coverage report
67+
uses: codecov/codecov-action@v3.1.0
6868

6969
discheck:
7070
runs-on: ubuntu-latest
7171
name: Disassemble check
7272
steps:
73-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v3
7474

75-
- uses: actions/setup-python@v4
76-
with:
77-
python-version: 3.8.8
75+
- uses: actions/setup-python@v4
76+
with:
77+
python-version: 3.8.8
7878

79-
- name: Requirements check
80-
run: python -m pip list
79+
- name: Requirements check
80+
run: python -m pip list
8181

82-
- name: Check compute features
83-
run: python -m pip install .[test,test_extras]
82+
- name: Check compute features
83+
run: python -m pip install .[test,test_extras]
8484

85-
- name: Test package
86-
run: python -m pytest -ra -m dis
85+
- name: Test package
86+
run: python -m pytest -ra -m dis
8787

8888
# root:
8989
# runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 89 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,99 @@
1+
ci:
2+
autoupdate_commit_msg: "chore: update pre-commit hooks"
3+
autofix_commit_msg: "style: pre-commit fixes"
4+
15
repos:
2-
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.34.0
4-
hooks:
5-
- id: pyupgrade
6-
args: [--py36-plus]
6+
- repo: https://github.com/asottile/pyupgrade
7+
rev: v2.34.0
8+
hooks:
9+
- id: pyupgrade
10+
args: [--py36-plus]
11+
12+
- repo: https://github.com/psf/black
13+
rev: 22.3.0
14+
hooks:
15+
- id: black
16+
17+
- repo: https://github.com/pre-commit/pre-commit-hooks
18+
rev: v4.3.0
19+
hooks:
20+
- id: check-added-large-files
21+
- id: check-case-conflict
22+
- id: check-merge-conflict
23+
- id: check-symlinks
24+
- id: check-yaml
25+
- id: debug-statements
26+
- id: end-of-file-fixer
27+
exclude: ^docs
28+
- id: mixed-line-ending
29+
- id: requirements-txt-fixer
30+
- id: trailing-whitespace
731

8-
- repo: https://github.com/psf/black
9-
rev: 22.3.0
10-
hooks:
11-
- id: black
32+
- repo: https://github.com/PyCQA/isort
33+
rev: 5.10.1
34+
hooks:
35+
- id: isort
1236

13-
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v4.3.0
15-
hooks:
16-
- id: check-added-large-files
17-
- id: check-case-conflict
18-
- id: check-merge-conflict
19-
- id: check-symlinks
20-
- id: check-yaml
21-
- id: debug-statements
22-
- id: end-of-file-fixer
23-
exclude: ^docs
24-
- id: mixed-line-ending
25-
- id: requirements-txt-fixer
26-
- id: trailing-whitespace
37+
- repo: https://github.com/asottile/setup-cfg-fmt
38+
rev: v1.20.1
39+
hooks:
40+
- id: setup-cfg-fmt
2741

28-
- repo: https://github.com/PyCQA/isort
29-
rev: 5.10.1
30-
hooks:
31-
- id: isort
42+
- repo: https://github.com/mgedmin/check-manifest
43+
rev: "0.48"
44+
hooks:
45+
- id: check-manifest
46+
stages: [manual]
3247

33-
- repo: https://github.com/asottile/setup-cfg-fmt
34-
rev: v1.20.1
35-
hooks:
36-
- id: setup-cfg-fmt
48+
- repo: https://github.com/pre-commit/mirrors-mypy
49+
rev: v0.961
50+
hooks:
51+
- id: mypy
52+
files: src
53+
args: [--show-error-codes]
54+
additional_dependencies:
55+
- numpy==1.22.0
56+
- packaging
3757

38-
- repo: https://github.com/mgedmin/check-manifest
39-
rev: "0.48"
40-
hooks:
41-
- id: check-manifest
42-
stages: [manual]
58+
- repo: https://github.com/PyCQA/flake8
59+
rev: 4.0.1
60+
hooks:
61+
- id: flake8
62+
additional_dependencies:
63+
- flake8-bugbear
64+
- flake8-docstrings
65+
- flake8-print
4366

44-
- repo: https://github.com/pre-commit/mirrors-mypy
45-
rev: v0.961
46-
hooks:
47-
- id: mypy
48-
files: src
49-
args: [--show-error-codes]
50-
additional_dependencies:
51-
- numpy==1.22.0
52-
- packaging
67+
- repo: https://github.com/codespell-project/codespell
68+
rev: v2.1.0
69+
hooks:
70+
- id: codespell
71+
args: ["-L", "hist,nd,circularly,ba"]
72+
exclude: ^(notebooks/xarray.ipynb|notebooks/BoostHistogramHandsOn.ipynb)$
5373

54-
- repo: https://github.com/PyCQA/flake8
55-
rev: 4.0.1
56-
hooks:
57-
- id: flake8
58-
additional_dependencies:
59-
- flake8-bugbear
60-
- flake8-docstrings
61-
- flake8-print
74+
- repo: https://github.com/pre-commit/mirrors-prettier
75+
rev: "v2.7.1"
76+
hooks:
77+
- id: prettier
78+
types_or: [yaml, markdown, html, css, scss, javascript, json]
79+
exclude: assets/js/webapp\.js
6280

63-
- repo: https://github.com/codespell-project/codespell
64-
rev: v2.1.0
65-
hooks:
66-
- id: codespell
67-
args: ["-L", "hist,nd,circularly,ba"]
68-
exclude: ^(notebooks/xarray.ipynb|notebooks/BoostHistogramHandsOn.ipynb)$
81+
- repo: https://github.com/asottile/blacken-docs
82+
rev: v1.12.1
83+
hooks:
84+
- id: blacken-docs
85+
args: ["-E"]
86+
additional_dependencies: [black==22.3.0]
6987

70-
- repo: https://github.com/pre-commit/pygrep-hooks
71-
rev: v1.9.0
72-
hooks:
73-
- id: python-check-blanket-noqa
74-
- id: python-check-blanket-type-ignore
75-
exclude: ^src/vector/backends/_numba_object.py$
76-
- id: python-no-log-warn
77-
- id: python-no-eval
78-
- id: python-use-type-annotations
79-
- id: rst-backticks
80-
- id: rst-directive-colons
81-
- id: rst-inline-touching-normal
88+
- repo: https://github.com/pre-commit/pygrep-hooks
89+
rev: v1.9.0
90+
hooks:
91+
- id: python-check-blanket-noqa
92+
- id: python-check-blanket-type-ignore
93+
exclude: ^src/vector/backends/_numba_object.py$
94+
- id: python-no-log-warn
95+
- id: python-no-eval
96+
- id: python-use-type-annotations
97+
- id: rst-backticks
98+
- id: rst-directive-colons
99+
- id: rst-inline-touching-normal

.readthedocs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ formats: all
1515
python:
1616
version: 3.8
1717
install:
18-
- method: pip
19-
path: .
20-
extra_requirements:
21-
- docs
18+
- method: pip
19+
path: .
20+
extra_requirements:
21+
- docs

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
include LICENSE README.md
1+
include LICENSE README.md pyproject.toml setup.py setup.cfg
22
recursive-include src *.typed *.pyi
33
recursive-include tests *.py *.pkl

0 commit comments

Comments
 (0)