Skip to content

Commit a00b867

Browse files
committed
typo
2 parents 624fcae + f717fc4 commit a00b867

23 files changed

+584
-151
lines changed

.coveragerc

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[run]
22
omit = pint_pandas/testsuite/*
3-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Check dependency specification
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
matrix:
9+
python-version: [3.9, "3.10", "3.11"]
10+
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
TEST_OPTS: "-rfsxEX -s"
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 100
20+
21+
- name: Get tags
22+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Get pip cache dir
30+
id: pip-cache
31+
run: echo "::set-output name=dir::$(pip cache dir)"
32+
33+
- name: Setup caching
34+
uses: actions/cache@v2
35+
with:
36+
path: ${{ steps.pip-cache.outputs.dir }}
37+
key: pip-${{ matrix.python-version }}
38+
restore-keys: |
39+
pip-${{ matrix.python-version }}
40+
41+
- name: Install pint_pandas (just the bare minimum, no extras, no pre-installed dependencies)
42+
run: |
43+
pip install .
44+
45+
- name: Install pytest
46+
run: pip install pytest
47+
48+
- name: Run Tests
49+
run: |
50+
pytest $TEST_OPTS

.github/workflows/ci-pint-master.yml

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: CI-pint-master
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
matrix:
9+
python-version: [3.9, "3.10", "3.11"]
10+
numpy: ["numpy>=1.20.3,<2.0.0"]
11+
pandas: ["pandas==2.0.2", ]
12+
pint: ["pint>=0.21.1"]
13+
14+
runs-on: ubuntu-latest
15+
16+
env:
17+
TEST_OPTS: "-rfsxEX -s --cov=pint_pandas --cov-config=.coveragerc"
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 100
23+
24+
- name: Get tags
25+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Install pint
33+
run: python -m pip install git+https://github.com/hgrecco/pint.git@master
34+
35+
- name: Get pip cache dir
36+
id: pip-cache
37+
run: echo "::set-output name=dir::$(pip cache dir)"
38+
39+
- name: Setup caching
40+
uses: actions/cache@v2
41+
with:
42+
path: ${{ steps.pip-cache.outputs.dir }}
43+
key: pip-${{ matrix.python-version }}
44+
restore-keys: |
45+
pip-${{ matrix.python-version }}
46+
47+
- name: Install numpy
48+
if: ${{ matrix.numpy != null }}
49+
run: pip install "${{matrix.numpy}}"
50+
51+
- name: Install dependencies
52+
run: |
53+
pip install .[test]
54+
55+
- name: Install pandas
56+
if: ${{ matrix.pandas != null }}
57+
run: pip install "${{matrix.pandas}}"
58+
59+
- name: Run Tests
60+
run: |
61+
pytest $TEST_OPTS
62+
63+
- name: Coverage report
64+
run: coverage report -m
65+
66+
- name: Coveralls Parallel
67+
env:
68+
COVERALLS_FLAG_NAME: ${{ matrix.test-number }}
69+
COVERALLS_PARALLEL: true
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
COVERALLS_SERVICE_NAME: github
72+
run: |
73+
pip install coveralls
74+
coveralls
75+
76+
coveralls:
77+
needs: test
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/setup-python@v2
81+
with:
82+
python-version: 3.x
83+
- name: Coveralls Finished
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
COVERALLS_SERVICE_NAME: github
87+
run: |
88+
pip install coveralls
89+
coveralls --finish
90+
91+
# Dummy task to summarize all. See https://github.com/bors-ng/bors-ng/issues/1300
92+
ci-success:
93+
name: ci
94+
if: ${{ success() }}
95+
needs: test
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: CI succeeded
99+
run: exit 0

.github/workflows/ci-pint-pre.yml

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: CI-pint-pre
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
matrix:
9+
python-version: [3.9, "3.10", "3.11"]
10+
numpy: ["numpy>=1.20.3,<2.0.0"]
11+
pandas: ["pandas==2.0.2", ]
12+
pint: ["pint>=0.21.1"]
13+
14+
runs-on: ubuntu-latest
15+
16+
env:
17+
TEST_OPTS: "-rfsxEX -s --cov=pint_pandas --cov-config=.coveragerc"
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 100
23+
24+
- name: Get tags
25+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Install pint
33+
run: python -m pip install --pre pint
34+
35+
- name: Get pip cache dir
36+
id: pip-cache
37+
run: echo "::set-output name=dir::$(pip cache dir)"
38+
39+
- name: Setup caching
40+
uses: actions/cache@v2
41+
with:
42+
path: ${{ steps.pip-cache.outputs.dir }}
43+
key: pip-${{ matrix.python-version }}
44+
restore-keys: |
45+
pip-${{ matrix.python-version }}
46+
47+
- name: Install numpy
48+
if: ${{ matrix.numpy != null }}
49+
run: pip install "${{matrix.numpy}}"
50+
51+
- name: Install dependencies
52+
run: |
53+
pip install .[test]
54+
55+
- name: Install pandas
56+
if: ${{ matrix.pandas != null }}
57+
run: pip install "${{matrix.pandas}}"
58+
59+
- name: Run Tests
60+
run: |
61+
pytest $TEST_OPTS
62+
63+
- name: Coverage report
64+
run: coverage report -m
65+
66+
- name: Coveralls Parallel
67+
env:
68+
COVERALLS_FLAG_NAME: ${{ matrix.test-number }}
69+
COVERALLS_PARALLEL: true
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
COVERALLS_SERVICE_NAME: github
72+
run: |
73+
pip install coveralls
74+
coveralls
75+
76+
coveralls:
77+
needs: test
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/setup-python@v2
81+
with:
82+
python-version: 3.x
83+
- name: Coveralls Finished
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
COVERALLS_SERVICE_NAME: github
87+
run: |
88+
pip install coveralls
89+
coveralls --finish
90+
91+
# Dummy task to summarize all. See https://github.com/bors-ng/bors-ng/issues/1300
92+
ci-success:
93+
name: ci
94+
if: ${{ success() }}
95+
needs: test
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: CI succeeded
99+
run: exit 0

.github/workflows/ci.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ jobs:
66
test:
77
strategy:
88
matrix:
9-
python-version: [3.8, 3.9, "3.10"]
9+
python-version: [3.9, "3.10", "3.11"]
1010
numpy: ["numpy>=1.20.3,<2.0.0"]
11-
pandas: ["git+https://github.com/andrewgsavage/pandas.git@assert_1_5",
12-
"git+https://github.com/andrewgsavage/pandas.git@assert_almost_equal", ]
13-
pint: ["pint>=0.20.1"]
11+
pandas: ["pandas==2.0.2", ]
12+
pint: ["pint>=0.21.1", "pint==0.22"]
1413

1514
runs-on: ubuntu-latest
1615

.github/workflows/lint-autoupdate.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: pre-commit
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * 0" # every Sunday at 00:00 UTC
6+
workflow_dispatch:
7+
8+
9+
jobs:
10+
autoupdate:
11+
name: autoupdate
12+
runs-on: ubuntu-latest
13+
if: github.repository == 'hgrecco/pint-pandas'
14+
steps:
15+
- name: checkout
16+
uses: actions/checkout@v2
17+
- name: Cache pip and pre-commit
18+
uses: actions/cache@v2
19+
with:
20+
path: |
21+
~/.cache/pre-commit
22+
~/.cache/pip
23+
key: ${{ runner.os }}-pre-commit-autoupdate
24+
- name: setup python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.x
28+
- name: upgrade pip
29+
run: python -m pip install --upgrade pip
30+
- name: install dependencies
31+
run: python -m pip install --upgrade pre-commit
32+
- name: version info
33+
run: python -m pip list
34+
- name: autoupdate
35+
uses: technote-space/create-pr-action@bfd4392c80dbeb54e0bacbcf4750540aecae6ed4
36+
with:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
EXECUTE_COMMANDS: |
39+
python -m pre_commit autoupdate
40+
python -m pre_commit run --all-files
41+
COMMIT_MESSAGE: 'pre-commit: autoupdate hook versions'
42+
COMMIT_NAME: 'github-actions[bot]'
43+
COMMIT_EMAIL: 'github-actions[bot]@users.noreply.github.com'
44+
PR_TITLE: 'pre-commit: autoupdate hook versions'
45+
PR_BRANCH_PREFIX: 'pre-commit/'
46+
PR_BRANCH_NAME: 'autoupdate-${PR_ID}'

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
- name: Lint
1515
uses: pre-commit/[email protected]
1616
with:
17-
extra_args: --all-files --show-diff-on-failure
17+
extra_args: --all-files --show-diff-on-failure

.github/workflows/publish.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.x'
17+
18+
- name: Install dependencies
19+
run: python -m pip install build
20+
21+
- name: Build package
22+
run: python -m build
23+
24+
- name: Publish to PyPI
25+
uses: pypa/gh-action-pypi-publish@release/v1
26+
with:
27+
password: ${{ secrets.PYPI_API_TOKEN }}

.pre-commit-config.yaml

+25-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
1+
exclude: '^pint/_vendor'
12
repos:
2-
- repo: https://github.com/ambv/black
3-
rev: 22.8.0
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.4.0
5+
hooks:
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
- repo: https://github.com/psf/black
10+
rev: 23.3.0
411
hooks:
512
- id: black
6-
- repo: https://github.com/pre-commit/mirrors-isort
7-
rev: 'v5.10.1'
13+
- id: black-jupyter
14+
- repo: https://github.com/charliermarsh/ruff-pre-commit
15+
rev: 'v0.0.270'
16+
hooks:
17+
- id: ruff
18+
args: ["--fix"]
19+
- repo: https://github.com/executablebooks/mdformat
20+
rev: 0.7.16
821
hooks:
9-
- id: isort
10-
- repo: https://github.com/pycqa/flake8
11-
rev: 5.0.4
22+
- id: mdformat
23+
additional_dependencies:
24+
- mdformat-gfm # GitHub-flavored Markdown
25+
- mdformat-black
26+
- repo: https://github.com/kynan/nbstripout
27+
rev: 0.6.1
1228
hooks:
13-
- id: flake8
29+
- id: nbstripout
30+
args: [--extra-keys=metadata.kernelspec metadata.language_info.version]

0 commit comments

Comments
 (0)