From 3272a47a0cf09728e55363e92c55818959aac291 Mon Sep 17 00:00:00 2001 From: GustavoGB Date: Tue, 7 Dec 2021 10:41:00 -0800 Subject: [PATCH 1/5] docs add new dependencies --- .github/CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b32e9744d..11e72fac1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -67,6 +67,12 @@ pytest tests make docs ``` + +#### Adding New Dependencies + +To add new dependencies to the project, make sure altering the *environment.yml* file. It will automatically update the *requirements-dev.txt* . + + #### Set up `pre-commit` This project uses [pre-commit](https://pre-commit.com/) to ensure that code From defdb32fa30300a2b9a37aee7f80a94779e27610 Mon Sep 17 00:00:00 2001 From: GustavoGB Date: Wed, 8 Dec 2021 17:05:39 -0300 Subject: [PATCH 2/5] docs add command to update dependencies --- .github/CONTRIBUTING.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 11e72fac1..9a3f04c5b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -70,7 +70,13 @@ make docs #### Adding New Dependencies -To add new dependencies to the project, make sure altering the *environment.yml* file. It will automatically update the *requirements-dev.txt* . +To add new dependencies to the project, make sure to alter the *environment.yml* file. Then to sync the dependencies from the *environment.yml* file to the *requirements-dev.txt* run the following command + +``` +python scripts/generate_pip_deps_from_conda.py + +``` +Moreover to add new dependecies in setup.py, it is necessary to add it to the **_extras_require** dictionary. #### Set up `pre-commit` From c9a2be0e37c91d43dff93805b434a774d6d3b433 Mon Sep 17 00:00:00 2001 From: cosmicBboy Date: Fri, 10 Dec 2021 08:49:53 -0500 Subject: [PATCH 3/5] update black version --- .pre-commit-config.yaml | 2 +- environment.yml | 2 +- pandera/engines/engine.py | 1 - pandera/engines/numpy_engine.py | 2 -- pandera/engines/pandas_engine.py | 1 - requirements-dev.txt | 2 +- tests/core/test_typing.py | 1 - 7 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d0972e6c..1172939de 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: - id: flynt - repo: https://github.com/psf/black - rev: 21.9b0 + rev: 21.12b0 hooks: - id: black args: ["--line-length=79"] diff --git a/environment.yml b/environment.yml index cf73c67ae..8644628b6 100644 --- a/environment.yml +++ b/environment.yml @@ -33,7 +33,7 @@ dependencies: - distributed # testing and dependencies - - black >= 20.8b1 + - black >= 21.12b0 # testing - isort >= 5.7.0 diff --git a/pandera/engines/engine.py b/pandera/engines/engine.py index 246b2877e..6e2bc85e4 100644 --- a/pandera/engines/engine.py +++ b/pandera/engines/engine.py @@ -42,7 +42,6 @@ def register( ) -> Callable[[Any], DataType]: """Register a new implementation for the given cls.""" - else: Dispatch = Callable[[Any], DataType] diff --git a/pandera/engines/numpy_engine.py b/pandera/engines/numpy_engine.py index 48c193c66..36c634778 100644 --- a/pandera/engines/numpy_engine.py +++ b/pandera/engines/numpy_engine.py @@ -254,7 +254,6 @@ class Float64(Float128): type = np.dtype("float64") bit_width: int = 64 - else: @Engine.register_dtype(equivalents=_float_equivalents[64]) @@ -304,7 +303,6 @@ class Complex128(Complex256): type = np.dtype("complex128") # type: ignore bit_width: int = 128 - else: @Engine.register_dtype(equivalents=_complex_equivalents[128]) diff --git a/pandera/engines/pandas_engine.py b/pandera/engines/pandas_engine.py index e083d9171..251b3b5cd 100644 --- a/pandera/engines/pandas_engine.py +++ b/pandera/engines/pandas_engine.py @@ -427,7 +427,6 @@ def from_parametrized_dtype(cls, pd_dtype: pd.StringDtype): def __str__(self) -> str: return repr(self.type) - else: @Engine.register_dtype( diff --git a/requirements-dev.txt b/requirements-dev.txt index 6dbc2b603..594e85ebd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -20,7 +20,7 @@ pyspark modin dask distributed -black >= 20.8b1 +black >= 21.12b0 isort >= 5.7.0 codecov mypy >= 0.902 diff --git a/tests/core/test_typing.py b/tests/core/test_typing.py index 585be8cb1..075c0d02e 100644 --- a/tests/core/test_typing.py +++ b/tests/core/test_typing.py @@ -316,7 +316,6 @@ class SchemaAnnotatedDatetimeTZDtype(pa.SchemaModel): class SchemaAnnotatedIntervalDtype(pa.SchemaModel): col: Series[Annotated[pd.IntervalDtype, "int32", "both"]] - else: class SchemaAnnotatedIntervalDtype(pa.SchemaModel): # type: ignore From a382e49d8cdc4731b9a8790b0bf1effa01f7d400 Mon Sep 17 00:00:00 2001 From: GustavoGB Date: Tue, 7 Dec 2021 10:41:00 -0800 Subject: [PATCH 4/5] docs add new dependencies --- .github/CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b32e9744d..11e72fac1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -67,6 +67,12 @@ pytest tests make docs ``` + +#### Adding New Dependencies + +To add new dependencies to the project, make sure altering the *environment.yml* file. It will automatically update the *requirements-dev.txt* . + + #### Set up `pre-commit` This project uses [pre-commit](https://pre-commit.com/) to ensure that code From 80d2efb7b9f4516db186a96f459dc79087d8c970 Mon Sep 17 00:00:00 2001 From: GustavoGB Date: Wed, 8 Dec 2021 17:05:39 -0300 Subject: [PATCH 5/5] docs add command to update dependencies --- .github/CONTRIBUTING.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 11e72fac1..9a3f04c5b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -70,7 +70,13 @@ make docs #### Adding New Dependencies -To add new dependencies to the project, make sure altering the *environment.yml* file. It will automatically update the *requirements-dev.txt* . +To add new dependencies to the project, make sure to alter the *environment.yml* file. Then to sync the dependencies from the *environment.yml* file to the *requirements-dev.txt* run the following command + +``` +python scripts/generate_pip_deps_from_conda.py + +``` +Moreover to add new dependecies in setup.py, it is necessary to add it to the **_extras_require** dictionary. #### Set up `pre-commit`