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

fixes #663 #696

Merged
merged 6 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ pytest tests
make docs
```


#### Adding New Dependencies

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`

This project uses [pre-commit](https://pre-commit.com/) to ensure that code
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies:
- distributed

# testing and dependencies
- black >= 20.8b1
- black >= 21.12b0

# testing
- isort >= 5.7.0
Expand Down
1 change: 0 additions & 1 deletion pandera/engines/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def register(
) -> Callable[[Any], DataType]:
"""Register a new implementation for the given cls."""


else:
Dispatch = Callable[[Any], DataType]

Expand Down
2 changes: 0 additions & 2 deletions pandera/engines/numpy_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ class Float64(Float128):
type = np.dtype("float64")
bit_width: int = 64


else:

@Engine.register_dtype(equivalents=_float_equivalents[64])
Expand Down Expand Up @@ -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])
Expand Down
1 change: 0 additions & 1 deletion pandera/engines/pandas_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pyspark
modin
dask
distributed
black >= 20.8b1
black >= 21.12b0
isort >= 5.7.0
codecov
mypy >= 0.902
Expand Down
1 change: 0 additions & 1 deletion tests/core/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down