Skip to content

Commit 9dd79b3

Browse files
authored
Merge pull request #34 from Point72/pit/remove_wrappings
Remove PyArrowDataType and pandas pydantic wrappers. …
2 parents 99b793d + d4b2286 commit 9dd79b3

File tree

7 files changed

+4
-301
lines changed

7 files changed

+4
-301
lines changed

ccflow/exttypes/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from .arrow import ArrowSchema, ArrowTable, PyArrowDatatype
1+
from .arrow import *
22
from .exprtk import *
33
from .frequency import *
44
from .jinja import *
5-
from .pandas import DataFrameWrapper, GenericPandasWrapper, SeriesWrapper, SparseNumericDataFrame
65

76
# Do NOT import .polars. We don't want ccflow (without flow) to have a dependency on polars!
87
from .pydantic_numpy import *

ccflow/exttypes/arrow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from pydantic_core import core_schema
77
from typing_extensions import Literal, Self, get_args
88

9+
__all__ = ("ArrowSchema", "ArrowTable", "PyArrowDatatype")
10+
911

1012
class ArrowSchema(type):
1113
"""A metaclass for creating Arrow schema-specific types that can be used with Generic classes"""

ccflow/exttypes/pandas.py

Lines changed: 0 additions & 165 deletions
This file was deleted.

ccflow/tests/exttypes/test_pandas.py

Lines changed: 0 additions & 130 deletions
This file was deleted.

ccflow/tests/test_import.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def test(self):
2020
"deltalake",
2121
"emails",
2222
"matplotlib",
23-
"pandera",
2423
"mlflow",
2524
"plotly",
2625
"pyarrow.dataset",

docs/wiki/First-Steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ print(list(root))
531531

532532
In the above, note that the "x" and "y" variables are passed as strings referencing other objects in the registry. When using hydra, something similar could be accomplished by using [variable interpolation](https://omegaconf.readthedocs.io/en/2.3_branch/usage.html#variable-interpolation) in OmegaConf, but there is one key difference. In hydra/omegaconf, variable interpolation makes a copy of the yaml config, so `transform.x` would point to an object that is configured the same way as `data/source1`, but it would not be pointing to the same *instance*. Thus, if changes were made to `data/source1`, they would not be reflected in `transform.x`.
533533

534-
With the above behavior in place, especially the ability to load dictionaries of configs into the root `ModelRegistry`, the next step is to be able to load the configurations from files. Fortunately, this piece has already been solved by hydra. In particular, it allows for configurations to be split across multiple sub-directories and files, re-used in multiple places, and recombined as needed. It also provides advanced command line tools to configure your application.
534+
With the above behavior in place, especially the ability to load dictionaries of configs into the root `ModelRegistry`, the next step is to be able to load the configurations from files. Fortunately, this piece has already been solved by hydra. In particular, it allows for configurations to be split across multiple sub-directories and files, reused in multiple places, and recombined as needed. It also provides advanced command line tools to configure your application.
535535

536536
While hydra is primarily concerned with loading file-based configurations into command-line applications, their [Compose API](https://hydra.cc/docs/advanced/compose_api/) provides a way to load the configs interactively in a notebook, as a special dictionary type. However, to save people the work of first loading config files into config dictionaries, and then adding those into the registry, we've provided a function to do this directly, shown below. Note that these config files are loading models which are defined in `ccflow` and `ccflow.examples`.
537537

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ dependencies = [
5252
full = [
5353
"cexprtk",
5454
"pandas",
55-
"pandera",
5655
"plotly",
5756
"polars",
5857
"ray",
@@ -74,7 +73,6 @@ develop = [
7473
"cexprtk",
7574
"csp>=0.0.4,<0.1",
7675
"pandas",
77-
"pandera",
7876
"plotly",
7977
"polars",
8078
"ray",

0 commit comments

Comments
 (0)