Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy errors in core.py #150

Merged
merged 46 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
67a89ba
Fix mypy errors
Illviljan Sep 23, 2022
01154ee
Turn on mypy ci
Illviljan Sep 23, 2022
baae520
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 23, 2022
a538524
mostly type corrections
Illviljan Sep 23, 2022
0874e48
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 23, 2022
d1a611b
Update core.py
Illviljan Sep 23, 2022
1ead63d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 23, 2022
b2fc2a8
Update core.py
Illviljan Sep 23, 2022
9f10ff2
Update core.py
Illviljan Sep 25, 2022
06ad423
undo some changes
Illviljan Sep 25, 2022
3118e7b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 25, 2022
6170791
Update core.py
Illviljan Sep 25, 2022
dfa2ad5
Update core.py
Illviljan Sep 25, 2022
c94eea6
Merge branch 'core_typing' of https://github.com/Illviljan/flox into …
Illviljan Sep 25, 2022
96fea1a
tuple to None
Illviljan Sep 25, 2022
018aec5
Please be this
Illviljan Sep 25, 2022
e8743ab
Ok! Now chunck_reduce
Illviljan Sep 25, 2022
b1f3f36
string is a sequence
Illviljan Sep 26, 2022
6e7ed3f
reduce len calcs
Illviljan Sep 26, 2022
33b6c3a
reindex_out is FAlse
Illviljan Sep 26, 2022
451ff57
rename axis -> axis_
Illviljan Sep 26, 2022
6603ccf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 26, 2022
cd087cd
min_count can be None
Illviljan Sep 26, 2022
c926b54
more renaming
Illviljan Sep 26, 2022
0eb8ecd
Merge branch 'core_typing' of https://github.com/Illviljan/flox into …
Illviljan Sep 26, 2022
3a09b4a
Update core.py
Illviljan Sep 26, 2022
ba55c70
Update core.py
Illviljan Sep 26, 2022
71da838
undo changes in _validate_reindex and allow returning None
Illviljan Sep 27, 2022
3a842c4
Merge remote-tracking branch 'upstream/main' into core_typing
Illviljan Sep 27, 2022
c08bc1c
Tighten checks.
Illviljan Sep 27, 2022
877bb22
Revert "Tighten checks."
Illviljan Sep 27, 2022
3dbe7d8
dask_agg returns a tuple[np | dask] instead
Illviljan Sep 27, 2022
93d715d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 27, 2022
512dcb1
Update core.py
Illviljan Sep 27, 2022
2327746
rename T_Axiss to T_Axes
Illviljan Sep 28, 2022
1a6cc09
Narrower type in find_group_cohorts
Illviljan Sep 28, 2022
7a59977
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 28, 2022
b51269b
Remove factorize comment
Illviljan Sep 28, 2022
b3ac6a6
use math.prod
Illviljan Sep 28, 2022
436043b
Merge branch 'core_typing' of https://github.com/Illviljan/flox into …
Illviljan Sep 28, 2022
3755045
fix typo in TODO comment
Illviljan Sep 28, 2022
83cdca9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 28, 2022
fd30b94
Merge remote-tracking branch 'upstream/main' into core_typing
Illviljan Sep 28, 2022
d435c7a
comments
Illviljan Sep 29, 2022
9e6e0f5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 29, 2022
3bc7d61
AxesOpt
dcherian Oct 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,46 +73,46 @@ jobs:
run: |
python -m pytest --doctest-modules flox --ignore flox/tests

# mypy:
# name: Mypy
# runs-on: "ubuntu-latest"
# needs: detect-ci-trigger
# if: needs.detect-ci-trigger.outputs.triggered == 'false'
# defaults:
# run:
# shell: bash -l {0}
# env:
# CONDA_ENV_FILE: ci/environment.yml
# PYTHON_VERSION: "3.10"
mypy:
name: Mypy
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/environment.yml
PYTHON_VERSION: "3.10"

# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0 # Fetch all history for all branches and tags.
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

# - name: set environment variables
# run: |
# echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
# - name: Setup micromamba
# uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc
# with:
# environment-file: ${{env.CONDA_ENV_FILE}}
# environment-name: xarray-tests
# extra-specs: |
# python=${{env.PYTHON_VERSION}}
# cache-env: true
# cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
# - name: Install xarray
# run: |
# python -m pip install --no-deps -e .
# - name: Version info
# run: |
# conda info -a
# conda list
# - name: Install mypy
# run: |
# python -m pip install mypy
- name: set environment variables
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
python=${{env.PYTHON_VERSION}}
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
- name: Install mypy
run: |
python -m pip install mypy

# - name: Run mypy
# run: |
# python -m mypy --install-types --non-interactive
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive
2 changes: 1 addition & 1 deletion flox/aggregations.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def _initialize_aggregation(
func: str | Aggregation,
array_dtype,
fill_value,
min_count: int,
min_count: int | None,
finalize_kwargs,
) -> Aggregation:
if not isinstance(func, Aggregation):
Expand Down
Loading