Skip to content

Commit

Permalink
v1.14.5-rc0 (rtosholdings#370)
Browse files Browse the repository at this point in the history
Co-authored-by: rtosholdings-bot <[email protected]>
  • Loading branch information
OrestZborowski-SIG and rtosholdings-bot authored Feb 7, 2024
1 parent 438b085 commit 6f85050
Show file tree
Hide file tree
Showing 33 changed files with 384 additions and 162 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
python-version: [3.9, "3.10", "3.11"]
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Set fetch-depth to 0 so all history is retrieved; this is needed so we get the git tags
# which we use for setting the package version (via setuptools-scm).
fetch-depth: 0
- name: Setup Miniconda
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: "flake8_env"
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -64,11 +64,11 @@ jobs:
ANACONDA_USER: rtosholdings
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
mkdir conda_pkgs_output
conda mambabuild conda_recipe --override-channels -c ${ANACONDA_USER} -c conda-forge -c defaults --output-folder ./conda_pkgs_output --no-test
- name: Publish artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: conda-build-artifacts
path: conda_pkgs_output/*/riptable-*.conda
Expand All @@ -113,13 +113,13 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Set fetch-depth to 0 so all history is retrieved; this is needed so we get the git tags
# which we use for setting the package version (via setuptools-scm).
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
Expand All @@ -131,7 +131,7 @@ jobs:
set -ex
python -m build --sdist
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/
Expand All @@ -153,12 +153,12 @@ jobs:
BUILD_VERSION: ${{needs.conda_build.outputs.build_version}}
steps:
- name: Checkout repo (sparse)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
sparse-checkout: dev_tools
sparse-checkout-cone-mode: false
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
Expand All @@ -171,7 +171,7 @@ jobs:
channel-priority: flexible
show-channel-urls: true
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: conda-build-artifacts
path: conda_pkgs_output/
Expand Down Expand Up @@ -214,14 +214,14 @@ jobs:
numpy-version: [1.23, 1.24]
steps:
- name: Checkout repo (sparse)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
sparse-checkout: dev_tools
sparse-checkout-cone-mode: false
- name: Setup Miniconda
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: "pypi_test"
python-version: ${{ matrix.python-version }}
Expand All @@ -232,7 +232,7 @@ jobs:
channel-priority: flexible
show-channel-urls: true
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist/
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
ANACONDA_TOKEN: ${{ secrets.anaconda_token }}
steps:
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
Expand All @@ -299,7 +299,7 @@ jobs:
run: |
mamba install anaconda-client -q -y
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: conda-build-artifacts
path: conda_pkgs_output/
Expand All @@ -316,15 +316,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist/
Expand Down
1 change: 1 addition & 0 deletions conda_recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ requirements:
- python
- python-dateutil
- riptide_cpp >=1.16.3,<2 # run with any (compatible) version in this range
- typing-extensions >=4.9.0

about:
home: https://github.com/rtosholdings/riptable
Expand Down
1 change: 1 addition & 0 deletions dev_tools/gen_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def is_python(major: int, minor: int) -> bool:
"pandas>=1.0,<3.0",
"python-dateutil",
_TBB_REQ,
"typing-extensions>=4.9.0",
]

# Optional runtime requirements for riptable and riptide_cpp.
Expand Down
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.7
- python>=3.11
- typing-extensions>=4.9.0
- numpy
- scipy
- numba
Expand All @@ -12,6 +13,6 @@ dependencies:
- pre-commit
- black
- flake8
- pytest
- pytest>=7.0.0
- coverage
- pyarrow>=4.0.0
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies = [
"pandas >=1.0,<3.0",
"python-dateutil",
"riptide_cpp >=1.16.3,<2",
"typing-extensions >=4.9.0"
]
classifiers = [
"Development Status :: 4 - Beta",
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ numpy
riptide_cpp
riptable
ipython
typing-extensions
3 changes: 2 additions & 1 deletion riptable/Utils/pandas_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ def _to_unicode_if_string(arr):
old_category_mode = arr.category_mode
arr = arr.as_singlekey()
warnings.warn(
f"Series converted from {repr(CategoryMode(old_category_mode))} to {repr(CategoryMode(arr.category_mode))}."
f"Series converted from {repr(CategoryMode(old_category_mode))} to {repr(CategoryMode(arr.category_mode))}.",
stacklevel=2,
)
else:
raise NotImplementedError(
Expand Down
3 changes: 2 additions & 1 deletion riptable/Utils/rt_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def assert_categorical_equal(
)
else: # TODO implement category_mode checks for MultiKey, Dict, and IntEnum.
warnings.warn(
f"{fn}: category_array checks not implemented for {repr(rt.rt_enum.CategoryMode(expected.category_mode))} "
f"{fn}: category_array checks not implemented for {repr(rt.rt_enum.CategoryMode(expected.category_mode))} ",
stacklevel=2,
)

# check underlying FastArray
Expand Down
2 changes: 1 addition & 1 deletion riptable/hypothesis_tests/strategies/helper_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def rt_element_strategy(
elements_strategy = complex_numbers(allow_nan=True, allow_infinity=True)
else:
# TODO handle invalids for np.sctypes["others"] [bool, object, bytes, str, numpy.void]
warnings.warn(f"unhandled dtype '{dtype}'")
warnings.warn(f"unhandled dtype '{dtype}'", stacklevel=2)
return None
return elements_strategy

Expand Down
12 changes: 10 additions & 2 deletions riptable/rt_accum2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import warnings

import numpy as np
import riptide_cpp as rc

from .rt_categorical import Categorical
from .rt_enum import (
Expand Down Expand Up @@ -1024,7 +1025,7 @@ def _calculate_all(self, funcNum, *args, func_param=0, **kwargs):
f"Data did not have the same length has categoricals in Accum2 object, {len(test_col.view(FastArray))} vs. {len(self._cat_rows._fa)}"
)
else:
warnings.warn(f"Accum2: No data was calculated")
warnings.warn("Accum2: No data was calculated", stacklevel=2)
return

accum_dict = self.grouping._calculate_all(
Expand Down Expand Up @@ -1179,7 +1180,14 @@ def count(self, **kwargs):
"""Compute count of group"""
kwargs["showfilter"] = kwargs.get("showfilter", self._showfilter)
# print("count array", self.ncountgroup)
result = self._stack_dataset(self.ncountgroup, self.ncountkey, GB_FUNC_COUNT, **kwargs)

ncountgroup = self.ncountgroup
if (filter := kwargs.pop("filter", None)) is not None:
# re-calc with filter
ikey = where(filter, self.ikey, 0)
ncountgroup = rc.BinCount(ikey, self.grouping.unique_count + 1)

result = self._stack_dataset(ncountgroup, ncountgroup[1:], GB_FUNC_COUNT, **kwargs)
if self._totals:
result = result.imatrix_totals()
return result
Expand Down
1 change: 1 addition & 0 deletions riptable/rt_accumtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,7 @@ def accum_ratiop(
warnings.warn(
'Kwarg "filt" is being deprecated for "filter" to align with common syntax. "filt" will be removed in a future version',
FutureWarning,
stacklevel=2,
)
filter = filt
else:
Expand Down
Loading

0 comments on commit 6f85050

Please sign in to comment.