dycw-utilities 0.159.3__tar.gz → 0.159.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/PKG-INFO +1 -1
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/pyproject.toml +2 -2
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_math.py +14 -16
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_polars.py +18 -32
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/__init__.py +1 -1
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/math.py +5 -1
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/polars.py +24 -56
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/.gitignore +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/LICENSE +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/README.md +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/conftest.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_missing/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_missing/module.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/outer_1.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/outer_2.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/subpackage/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/subpackage/inner_1.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/subpackage/inner_2.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/subpackage/inner_3.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_without/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_without/module_1.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_without/module_2.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/standalone.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/with_imports.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__obj.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__series.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_int.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__false.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__true.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_nested.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_dataframe.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_series.json +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_altair.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_asyncio.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_atomicwrites.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_atools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_cachetools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_click.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_concurrent.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_contextlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_contextvars.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_cryptography.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_cvxpy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_dataclasses.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_enum.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_errors.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_eventkit.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_fastapi.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_fpdf2.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_functions.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_functools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_getpass.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_gzip.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_hashlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_http.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_hypothesis.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_importlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_inflect.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_ipython.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_iterables.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_json.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_jupyter.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_libcst.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_lightweight_charts.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_logging.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_memory_profiler.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_modules.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_more_itertools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_numpy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_objects/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_objects/objects.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_operator.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_optuna.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_orjson.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_os.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_parse.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pathlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pickle.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_platform.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_polars_ols.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_postgres.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pottery.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pqdm.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_psutil.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pyinstrument.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pytest.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pytest_randomly.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_pytest_regressions.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_random.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_re.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_redis.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_reprlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_scipy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_sentinel.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_shelve.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_slack_sdk.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_socket.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_sqlalchemy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_statsmodels.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_string.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_tempfile.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_text.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_threading.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_timer.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_traceback.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_typed_settings.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_types.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_typing.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_typing_funcs/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_typing_funcs/no_future.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_typing_funcs/with_future.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_tzdata.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_tzlocal.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_uuid.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_version.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_warnings.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_whenever.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_zipfile.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_zoneinfo.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/altair.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/asyncio.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/atomicwrites.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/atools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/cachetools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/click.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/concurrent.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/contextlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/contextvars.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/cryptography.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/cvxpy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/dataclasses.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/enum.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/errors.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/eventkit.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/fastapi.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/fpdf2.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/functions.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/functools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/getpass.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/gzip.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/hashlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/http.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/hypothesis.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/importlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/inflect.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/ipython.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/iterables.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/json.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/jupyter.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/libcst.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/lightweight_charts.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/logging.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/memory_profiler.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/modules.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/more_itertools.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/numpy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/operator.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/optuna.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/orjson.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/os.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/parse.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pathlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pickle.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/platform.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/polars_ols.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/postgres.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pottery.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pqdm.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/psutil.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/py.typed +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pyinstrument.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pytest.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pytest_plugins/__init__.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pytest_plugins/pytest_randomly.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pytest_plugins/pytest_regressions.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pytest_regressions.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/random.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/re.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/redis.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/reprlib.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/scipy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/sentinel.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/shelve.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/slack_sdk.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/socket.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/sqlalchemy.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/statsmodels.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/string.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/tempfile.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/text.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/threading.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/timer.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/traceback.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/typed_settings.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/types.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/typing.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/tzdata.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/tzlocal.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/uuid.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/version.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/warnings.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/whenever.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/zipfile.py +0 -0
- {dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/zoneinfo.py +0 -0
@@ -227,7 +227,7 @@ dependencies = [
|
|
227
227
|
name = "dycw-utilities"
|
228
228
|
readme = "README.md"
|
229
229
|
requires-python = ">= 3.12"
|
230
|
-
version = "0.159.
|
230
|
+
version = "0.159.4"
|
231
231
|
|
232
232
|
[project.entry-points.pytest11]
|
233
233
|
pytest-randomly = "utilities.pytest_plugins.pytest_randomly"
|
@@ -259,7 +259,7 @@ test = [
|
|
259
259
|
# bump-my-version
|
260
260
|
[tool.bumpversion]
|
261
261
|
allow_dirty = true
|
262
|
-
current_version = "0.159.
|
262
|
+
current_version = "0.159.4"
|
263
263
|
|
264
264
|
[[tool.bumpversion.files]]
|
265
265
|
filename = "src/utilities/__init__.py"
|
@@ -843,22 +843,20 @@ class TestMaxLongAndDouble:
|
|
843
843
|
|
844
844
|
class TestNumberOfDecimals:
|
845
845
|
max_int: ClassVar[int] = int(1e6)
|
846
|
+
cases: ClassVar[list[tuple[float, int]]] = [
|
847
|
+
(0.0, 0),
|
848
|
+
(0.1, 1),
|
849
|
+
(0.12, 2),
|
850
|
+
(0.123, 3),
|
851
|
+
(0.1234, 4),
|
852
|
+
(0.12345, 5),
|
853
|
+
(0.123456, 6),
|
854
|
+
(0.1234567, 7),
|
855
|
+
(0.12345678, 8),
|
856
|
+
(0.123456789, 9),
|
857
|
+
]
|
846
858
|
|
847
|
-
@given(
|
848
|
-
integer=integers(-max_int, max_int),
|
849
|
-
case=sampled_from([
|
850
|
-
(0.0, 0),
|
851
|
-
(0.1, 1),
|
852
|
-
(0.12, 2),
|
853
|
-
(0.123, 3),
|
854
|
-
(0.1234, 4),
|
855
|
-
(0.12345, 5),
|
856
|
-
(0.123456, 6),
|
857
|
-
(0.1234567, 7),
|
858
|
-
(0.12345678, 8),
|
859
|
-
(0.123456789, 9),
|
860
|
-
]),
|
861
|
-
)
|
859
|
+
@given(integer=integers(-max_int, max_int), case=sampled_from(cases))
|
862
860
|
def test_main(self, *, integer: int, case: tuple[float, int]) -> None:
|
863
861
|
frac, expected = case
|
864
862
|
x = integer + frac
|
@@ -870,7 +868,7 @@ class TestNumberOfDecimals:
|
|
870
868
|
with raises(
|
871
869
|
NumberOfDecimalsError,
|
872
870
|
match=escape(
|
873
|
-
"Could not determine number of decimals of 1.401298464324817e-45 (up to
|
871
|
+
"Could not determine number of decimals of 1.401298464324817e-45 (up to 10)"
|
874
872
|
),
|
875
873
|
):
|
876
874
|
_ = number_of_decimals(x)
|
@@ -60,6 +60,7 @@ from pytest import mark, param, raises
|
|
60
60
|
from whenever import DateDelta, DateTimeDelta, PlainDateTime, TimeDelta, ZonedDateTime
|
61
61
|
|
62
62
|
import tests.test_math
|
63
|
+
import utilities.math
|
63
64
|
import utilities.polars
|
64
65
|
from utilities.hypothesis import (
|
65
66
|
date_deltas,
|
@@ -78,7 +79,6 @@ from utilities.hypothesis import (
|
|
78
79
|
zoned_date_time_periods,
|
79
80
|
zoned_date_times,
|
80
81
|
)
|
81
|
-
from utilities.math import number_of_decimals
|
82
82
|
from utilities.numpy import DEFAULT_RNG
|
83
83
|
from utilities.pathlib import PWD
|
84
84
|
from utilities.polars import (
|
@@ -123,8 +123,6 @@ from utilities.polars import (
|
|
123
123
|
_GetDataTypeOrSeriesTimeZoneNotDateTimeError,
|
124
124
|
_GetDataTypeOrSeriesTimeZoneNotZonedError,
|
125
125
|
_GetDataTypeOrSeriesTimeZoneStructNonUniqueError,
|
126
|
-
_GetSeriesNumberOfDecimalsAllNullError,
|
127
|
-
_GetSeriesNumberOfDecimalsNotFloatError,
|
128
126
|
_InsertBetweenMissingColumnsError,
|
129
127
|
_InsertBetweenNonConsecutiveError,
|
130
128
|
_IsNearEventAfterError,
|
@@ -169,7 +167,6 @@ from utilities.polars import (
|
|
169
167
|
get_data_type_or_series_time_zone,
|
170
168
|
get_expr_name,
|
171
169
|
get_frequency_spectrum,
|
172
|
-
get_series_number_of_decimals,
|
173
170
|
increasing_horizontal,
|
174
171
|
insert_after,
|
175
172
|
insert_before,
|
@@ -183,6 +180,7 @@ from utilities.polars import (
|
|
183
180
|
nan_sum_agg,
|
184
181
|
nan_sum_cols,
|
185
182
|
normal,
|
183
|
+
number_of_decimals,
|
186
184
|
offset_datetime,
|
187
185
|
one_column,
|
188
186
|
order_of_magnitude,
|
@@ -1660,34 +1658,6 @@ class TestGetFrequencySpectrum:
|
|
1660
1658
|
assert allclose(result.filter(col("frequency").abs() > 0.02)["amplitude"], 0.0)
|
1661
1659
|
|
1662
1660
|
|
1663
|
-
class TestGetSeriesNumberOfDecimals:
|
1664
|
-
@given(data=data(), n=hypothesis.strategies.integers(1, 10), nullable=booleans())
|
1665
|
-
def test_main(self, *, data: DataObject, n: int, nullable: bool) -> None:
|
1666
|
-
strategy = int64s() | none() if nullable else int64s()
|
1667
|
-
ints_or_none = data.draw(lists(strategy, min_size=1, max_size=10))
|
1668
|
-
values = [None if i is None else i / 10**n for i in ints_or_none]
|
1669
|
-
series = Series(values=values, dtype=Float64)
|
1670
|
-
result = get_series_number_of_decimals(series, nullable=nullable)
|
1671
|
-
if not nullable:
|
1672
|
-
assert result is not None
|
1673
|
-
expected = max(number_of_decimals(v) for v in values if v is not None)
|
1674
|
-
assert result == expected
|
1675
|
-
|
1676
|
-
def test_error_not_float(self) -> None:
|
1677
|
-
with raises(
|
1678
|
-
_GetSeriesNumberOfDecimalsNotFloatError,
|
1679
|
-
match="Data type must be Float64; got Boolean",
|
1680
|
-
):
|
1681
|
-
_ = get_series_number_of_decimals(Series(dtype=Boolean))
|
1682
|
-
|
1683
|
-
def test_error_not_zoned(self) -> None:
|
1684
|
-
with raises(
|
1685
|
-
_GetSeriesNumberOfDecimalsAllNullError,
|
1686
|
-
match="Series must not be all-null; got .*",
|
1687
|
-
):
|
1688
|
-
_ = get_series_number_of_decimals(Series(dtype=Float64))
|
1689
|
-
|
1690
|
-
|
1691
1661
|
class TestIncreasingAndDecreasingHorizontal:
|
1692
1662
|
def test_main(self) -> None:
|
1693
1663
|
df = DataFrame(
|
@@ -2261,6 +2231,22 @@ class TestNormal:
|
|
2261
2231
|
assert series.is_finite().all()
|
2262
2232
|
|
2263
2233
|
|
2234
|
+
class TestNumberOfDecimals:
|
2235
|
+
@given(
|
2236
|
+
integer=hypothesis.strategies.integers(
|
2237
|
+
-tests.test_math.TestNumberOfDecimals.max_int,
|
2238
|
+
tests.test_math.TestNumberOfDecimals.max_int,
|
2239
|
+
),
|
2240
|
+
case=sampled_from(tests.test_math.TestNumberOfDecimals.cases),
|
2241
|
+
)
|
2242
|
+
def test_main(self, *, integer: int, case: tuple[float, int]) -> None:
|
2243
|
+
frac, expected = case
|
2244
|
+
x = integer + frac
|
2245
|
+
series = Series(name="x", values=[x], dtype=Float64)
|
2246
|
+
result = number_of_decimals(series)
|
2247
|
+
assert result.item() == expected
|
2248
|
+
|
2249
|
+
|
2264
2250
|
class TestOffsetDateTime:
|
2265
2251
|
@mark.parametrize(
|
2266
2252
|
("n", "time"), [param(1, whenever.Time(13, 30)), param(2, whenever.Time(15))]
|
@@ -641,7 +641,10 @@ def _is_close(
|
|
641
641
|
##
|
642
642
|
|
643
643
|
|
644
|
-
|
644
|
+
MAX_DECIMALS = 10
|
645
|
+
|
646
|
+
|
647
|
+
def number_of_decimals(x: float, /, *, max_decimals: int = MAX_DECIMALS) -> int:
|
645
648
|
"""Get the number of decimals."""
|
646
649
|
_, frac = divmod(x, 1)
|
647
650
|
results = (
|
@@ -889,6 +892,7 @@ def significant_figures(x: float, /, *, n: int = 2) -> str:
|
|
889
892
|
|
890
893
|
|
891
894
|
__all__ = [
|
895
|
+
"MAX_DECIMALS",
|
892
896
|
"MAX_FLOAT32",
|
893
897
|
"MAX_FLOAT64",
|
894
898
|
"MAX_INT8",
|
@@ -53,11 +53,10 @@ from polars.schema import Schema
|
|
53
53
|
from polars.testing import assert_frame_equal, assert_series_equal
|
54
54
|
from whenever import DateDelta, DateTimeDelta, PlainDateTime, TimeDelta, ZonedDateTime
|
55
55
|
|
56
|
+
import utilities.math
|
56
57
|
from utilities.dataclasses import yield_fields
|
57
58
|
from utilities.errors import ImpossibleCaseError
|
58
59
|
from utilities.functions import (
|
59
|
-
EnsureIntError,
|
60
|
-
ensure_int,
|
61
60
|
is_dataclass_class,
|
62
61
|
is_dataclass_instance,
|
63
62
|
make_isinstance,
|
@@ -80,12 +79,12 @@ from utilities.iterables import (
|
|
80
79
|
)
|
81
80
|
from utilities.json import write_formatted_json
|
82
81
|
from utilities.math import (
|
82
|
+
MAX_DECIMALS,
|
83
83
|
CheckIntegerError,
|
84
84
|
check_integer,
|
85
85
|
ewm_parameters,
|
86
86
|
is_less_than,
|
87
87
|
is_non_negative,
|
88
|
-
number_of_decimals,
|
89
88
|
)
|
90
89
|
from utilities.reprlib import get_repr
|
91
90
|
from utilities.types import MaybeStr, Number, PathLike, WeekDay
|
@@ -1427,56 +1426,6 @@ def get_frequency_spectrum(series: Series, /, *, d: int = 1) -> DataFrame:
|
|
1427
1426
|
##
|
1428
1427
|
|
1429
1428
|
|
1430
|
-
@overload
|
1431
|
-
def get_series_number_of_decimals(
|
1432
|
-
series: Series, /, *, nullable: Literal[True]
|
1433
|
-
) -> int | None: ...
|
1434
|
-
@overload
|
1435
|
-
def get_series_number_of_decimals(
|
1436
|
-
series: Series, /, *, nullable: Literal[False] = False
|
1437
|
-
) -> int: ...
|
1438
|
-
@overload
|
1439
|
-
def get_series_number_of_decimals(
|
1440
|
-
series: Series, /, *, nullable: bool = False
|
1441
|
-
) -> int | None: ...
|
1442
|
-
def get_series_number_of_decimals(
|
1443
|
-
series: Series, /, *, nullable: bool = False
|
1444
|
-
) -> int | None:
|
1445
|
-
"""Get the number of decimals of a series."""
|
1446
|
-
if not isinstance(dtype := series.dtype, Float64):
|
1447
|
-
raise _GetSeriesNumberOfDecimalsNotFloatError(dtype=dtype)
|
1448
|
-
decimals = series.map_elements(number_of_decimals, return_dtype=Int64).max()
|
1449
|
-
try:
|
1450
|
-
return ensure_int(decimals, nullable=nullable)
|
1451
|
-
except EnsureIntError:
|
1452
|
-
raise _GetSeriesNumberOfDecimalsAllNullError(series=series) from None
|
1453
|
-
|
1454
|
-
|
1455
|
-
@dataclass(kw_only=True, slots=True)
|
1456
|
-
class GetSeriesNumberOfDecimalsError(Exception): ...
|
1457
|
-
|
1458
|
-
|
1459
|
-
@dataclass(kw_only=True, slots=True)
|
1460
|
-
class _GetSeriesNumberOfDecimalsNotFloatError(GetSeriesNumberOfDecimalsError):
|
1461
|
-
dtype: DataType
|
1462
|
-
|
1463
|
-
@override
|
1464
|
-
def __str__(self) -> str:
|
1465
|
-
return f"Data type must be Float64; got {self.dtype}"
|
1466
|
-
|
1467
|
-
|
1468
|
-
@dataclass(kw_only=True, slots=True)
|
1469
|
-
class _GetSeriesNumberOfDecimalsAllNullError(GetSeriesNumberOfDecimalsError):
|
1470
|
-
series: Series
|
1471
|
-
|
1472
|
-
@override
|
1473
|
-
def __str__(self) -> str:
|
1474
|
-
return f"Series must not be all-null; got {self.series}"
|
1475
|
-
|
1476
|
-
|
1477
|
-
##
|
1478
|
-
|
1479
|
-
|
1480
1429
|
@overload
|
1481
1430
|
def increasing_horizontal(*columns: ExprLike) -> Expr: ...
|
1482
1431
|
@overload
|
@@ -2023,6 +1972,26 @@ def normal(
|
|
2023
1972
|
##
|
2024
1973
|
|
2025
1974
|
|
1975
|
+
def number_of_decimals(
|
1976
|
+
series: Series, /, *, max_decimals: int = MAX_DECIMALS
|
1977
|
+
) -> Series:
|
1978
|
+
"""Get the number of decimals."""
|
1979
|
+
frac = series - series.floor()
|
1980
|
+
results = [
|
1981
|
+
_number_of_decimals_check_scale(frac, s) for s in range(max_decimals + 1)
|
1982
|
+
]
|
1983
|
+
df_results = concat_series(*results)
|
1984
|
+
return first_true_horizontal(df_results)
|
1985
|
+
|
1986
|
+
|
1987
|
+
def _number_of_decimals_check_scale(frac: Series, scale: int, /) -> Series:
|
1988
|
+
scaled = 10**scale * frac
|
1989
|
+
return is_close(scaled, scaled.round()).alias(str(scale))
|
1990
|
+
|
1991
|
+
|
1992
|
+
##
|
1993
|
+
|
1994
|
+
|
2026
1995
|
def offset_datetime(
|
2027
1996
|
datetime: ZonedDateTime, offset: str, /, *, n: int = 1
|
2028
1997
|
) -> ZonedDateTime:
|
@@ -2389,7 +2358,7 @@ def round_to_float(
|
|
2389
2358
|
"""Round a column to the nearest multiple of another float."""
|
2390
2359
|
x = ensure_expr_or_series(x)
|
2391
2360
|
z = (x / y).round(mode=mode) * y
|
2392
|
-
return z.round(decimals=number_of_decimals(y) + 1)
|
2361
|
+
return z.round(decimals=utilities.math.number_of_decimals(y) + 1)
|
2393
2362
|
|
2394
2363
|
|
2395
2364
|
##
|
@@ -2595,7 +2564,6 @@ __all__ = [
|
|
2595
2564
|
"ExprOrSeries",
|
2596
2565
|
"FiniteEWMMeanError",
|
2597
2566
|
"GetDataTypeOrSeriesTimeZoneError",
|
2598
|
-
"GetSeriesNumberOfDecimalsError",
|
2599
2567
|
"InsertAfterError",
|
2600
2568
|
"InsertBeforeError",
|
2601
2569
|
"InsertBetweenError",
|
@@ -2634,7 +2602,6 @@ __all__ = [
|
|
2634
2602
|
"get_data_type_or_series_time_zone",
|
2635
2603
|
"get_expr_name",
|
2636
2604
|
"get_frequency_spectrum",
|
2637
|
-
"get_series_number_of_decimals",
|
2638
2605
|
"increasing_horizontal",
|
2639
2606
|
"insert_after",
|
2640
2607
|
"insert_before",
|
@@ -2650,6 +2617,7 @@ __all__ = [
|
|
2650
2617
|
"nan_sum_agg",
|
2651
2618
|
"nan_sum_cols",
|
2652
2619
|
"normal",
|
2620
|
+
"number_of_decimals",
|
2653
2621
|
"offset_datetime",
|
2654
2622
|
"one_column",
|
2655
2623
|
"order_of_magnitude",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_missing/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_missing/module.py
RENAMED
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_with/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_without/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_without/module_1.py
RENAMED
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/modules/package_without/module_2.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/tests/test_typing_funcs/with_future.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pytest_plugins/pytest_randomly.py
RENAMED
File without changes
|
{dycw_utilities-0.159.3 → dycw_utilities-0.159.4}/src/utilities/pytest_plugins/pytest_regressions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|