Skip to content

Commit

Permalink
v1.14.4 (#368)
Browse files Browse the repository at this point in the history
* v1.14.4-rc1

* v1.14.4-rc2

---------

Co-authored-by: rtosholdings-bot <rtosholdings-bot@sig.com>
  • Loading branch information
OrestZborowski-SIG and rtosholdings-bot authored Jan 31, 2024
1 parent eb3ecad commit 438b085
Show file tree
Hide file tree
Showing 29 changed files with 1,600 additions and 1,236 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
- name: Test riptable
run: |
set -ex
python -m riptable.tests.run
python -m pytest --pyargs riptable.tests
# disable tooling integration tests until they work
# ipython -m pytest riptable/test_tooling_integration
# disable hypothesis tests until they run faster, are more consistent, and are easier to investigate
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
conda list
- name: Test with pytest
run: |
python -m riptable.tests.run
python -m pytest --pyargs riptable.tests
- name: Tooling integration tests
run: |
echo "DISABLED until tooling tests can be updated"
Expand Down
7 changes: 3 additions & 4 deletions conda_recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ package:
build:
number: 0
noarch: python
# Use Python installed in host environment.
script: "{{ PYTHON }} -m pip install -v --no-deps --ignore-installed ."
script: "pip install -v --no-deps --no-build-isolation ."

source:
path: ..
Expand All @@ -16,13 +15,13 @@ requirements:
- python {{ python}}
- setuptools_scm
run:
- python
- ansi2html >=1.5.2
- numpy >=1.23
- numba >=0.56.2
- pandas >=1.0,<3.0
- python
- python-dateutil
- riptide_cpp >=1.16.1,<2 # run with any (compatible) version in this range
- riptide_cpp >=1.16.3,<2 # run with any (compatible) version in this range

about:
home: https://github.com/rtosholdings/riptable
Expand Down
34 changes: 0 additions & 34 deletions dev_tools/docstring_xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ riptable.rt_bin.cut
riptable.rt_bin.qcut
riptable.rt_bin.quantile
riptable.rt_categorical.CatZero
riptable.rt_categorical.Categorical
riptable.rt_categorical.Categorical.align
riptable.rt_categorical.Categorical.apply
riptable.rt_categorical.Categorical.apply_nonreduce
Expand All @@ -41,10 +40,7 @@ riptable.rt_categorical.Categorical.category_replace
riptable.rt_categorical.Categorical.copy
riptable.rt_categorical.Categorical.copy_invalid
riptable.rt_categorical.Categorical.expand_any
riptable.rt_categorical.Categorical.expand_array
riptable.rt_categorical.Categorical.expand_dict
riptable.rt_categorical.Categorical.fill_backward
riptable.rt_categorical.Categorical.fill_forward
riptable.rt_categorical.Categorical.fill_invalid
riptable.rt_categorical.Categorical.filtered_set_name
riptable.rt_categorical.Categorical.filtered_string
Expand All @@ -66,7 +62,6 @@ riptable.rt_categorical.Categorical.isfiltered
riptable.rt_categorical.Categorical.isin
riptable.rt_categorical.Categorical.ismultikey
riptable.rt_categorical.Categorical.isna
riptable.rt_categorical.Categorical.isnan
riptable.rt_categorical.Categorical.isnotnan
riptable.rt_categorical.Categorical.issinglekey
riptable.rt_categorical.Categorical.lock
Expand All @@ -84,7 +79,6 @@ riptable.rt_categorical.Categorical.nunique
riptable.rt_categorical.Categorical.one_hot_encode
riptable.rt_categorical.Categorical.set_name
riptable.rt_categorical.Categorical.set_valid
riptable.rt_categorical.Categorical.shift
riptable.rt_categorical.Categorical.shift_cat
riptable.rt_categorical.Categorical.shrink
riptable.rt_categorical.Categorical.sort_gb
Expand Down Expand Up @@ -644,7 +638,6 @@ riptable.rt_numpy.abs
riptable.rt_numpy.absolute
riptable.rt_numpy.all
riptable.rt_numpy.any
riptable.rt_numpy.arange
riptable.rt_numpy.argmax
riptable.rt_numpy.argmin
riptable.rt_numpy.argsort
Expand All @@ -667,12 +660,9 @@ riptable.rt_numpy.cumprod
riptable.rt_numpy.cumsum
riptable.rt_numpy.diff
riptable.rt_numpy.double
riptable.rt_numpy.empty
riptable.rt_numpy.empty_like
riptable.rt_numpy.float32
riptable.rt_numpy.float64
riptable.rt_numpy.floor
riptable.rt_numpy.full
riptable.rt_numpy.get_common_dtype
riptable.rt_numpy.get_dtype
riptable.rt_numpy.groupby
Expand All @@ -688,14 +678,7 @@ riptable.rt_numpy.int64
riptable.rt_numpy.int8
riptable.rt_numpy.interp
riptable.rt_numpy.interp_extrap
riptable.rt_numpy.isfinite
riptable.rt_numpy.isinf
riptable.rt_numpy.ismember
riptable.rt_numpy.isnan
riptable.rt_numpy.isnanorzero
riptable.rt_numpy.isnotfinite
riptable.rt_numpy.isnotinf
riptable.rt_numpy.isnotnan
riptable.rt_numpy.lexsort
riptable.rt_numpy.log
riptable.rt_numpy.log10
Expand All @@ -715,7 +698,6 @@ riptable.rt_numpy.mask_xor
riptable.rt_numpy.mask_xori
riptable.rt_numpy.max
riptable.rt_numpy.maximum
riptable.rt_numpy.mean
riptable.rt_numpy.median
riptable.rt_numpy.min
riptable.rt_numpy.min_scalar_type
Expand All @@ -725,43 +707,28 @@ riptable.rt_numpy.nan_to_num
riptable.rt_numpy.nanargmax
riptable.rt_numpy.nanargmin
riptable.rt_numpy.nanmax
riptable.rt_numpy.nanmean
riptable.rt_numpy.nanmedian
riptable.rt_numpy.nanmin
riptable.rt_numpy.nanpercentile
riptable.rt_numpy.nanstd
riptable.rt_numpy.nansum
riptable.rt_numpy.nanvar
riptable.rt_numpy.ones
riptable.rt_numpy.ones_like
riptable.rt_numpy.percentile
riptable.rt_numpy.power
riptable.rt_numpy.putmask
riptable.rt_numpy.reindex_fast
riptable.rt_numpy.repeat
riptable.rt_numpy.reshape
riptable.rt_numpy.round
riptable.rt_numpy.searchsorted
riptable.rt_numpy.single
riptable.rt_numpy.sort
riptable.rt_numpy.sortinplaceindirect
riptable.rt_numpy.std
riptable.rt_numpy.str_
riptable.rt_numpy.sum
riptable.rt_numpy.tile
riptable.rt_numpy.transpose
riptable.rt_numpy.trunc
riptable.rt_numpy.uint0
riptable.rt_numpy.uint16
riptable.rt_numpy.uint32
riptable.rt_numpy.uint64
riptable.rt_numpy.uint8
riptable.rt_numpy.unique
riptable.rt_numpy.var
riptable.rt_numpy.vstack
riptable.rt_numpy.where
riptable.rt_numpy.zeros
riptable.rt_numpy.zeros_like
riptable.rt_pdataset.PDataset
riptable.rt_pdataset.PDataset.hstack
riptable.rt_pdataset.PDataset.igroupby
Expand Down Expand Up @@ -864,7 +831,6 @@ riptable.rt_struct.Struct.hstack
riptable.rt_struct.Struct.info
riptable.rt_struct.Struct.is_valid_colname
riptable.rt_struct.Struct.items
riptable.rt_struct.Struct.key_search
riptable.rt_struct.Struct.keys
riptable.rt_struct.Struct.label_as_dict
riptable.rt_struct.Struct.label_filter
Expand Down
3 changes: 2 additions & 1 deletion dev_tools/gen_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def is_python(major: int, minor: int) -> bool:
] + toolchain_reqs

# PyPI setup build requirements.
# Most everything else will be specified in setup.py.
# Most everything *should* be in pyproject.toml, but some packages
# need to be set up manually here.
pypi_reqs = [
"build", # PEP-517 py build frontend
_BENCHMARK_REQ, # PyPI package doesn't exist
Expand Down
3 changes: 1 addition & 2 deletions dev_tools/validate_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Validator,
validate,
)
import pandas

import riptable
from riptable.Utils.common import cached_weakref_property

Expand Down Expand Up @@ -98,7 +98,6 @@

IMPORT_CONTEXT = {
"np": numpy,
"pd": pandas,
"rt": riptable,
}

Expand Down
8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,16 @@ def parse_filters(filterpath: str) -> typing.Tuple[typing.Optional[list[str]], t
"sphinx_design",
]

# Put the list of valid time zones into docstrings using rst_prolog.
from riptable import TimeZone

tz_list = 'Supported timezones: "' + '", "'.join(TimeZone.valid_timezones) + '"'
current_tzs_note = f"{tz_list}. To see supported timezones, use ``rt.TimeZone.valid_timezones``."


rst_prolog = f"""
.. |rtosholdings_docs| replace:: {os.getenv("RTOSHOLDINGS_DOCS", "rtosholdings-docs@sig.com")}
.. |To see supported timezones, use ``rt.TimeZone.valid_timezones``.| replace:: {current_tzs_note}
"""


Expand Down
6 changes: 3 additions & 3 deletions docs/source/tutorial/tutorial_cat_adv_instantiation.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

A Useful Way to Instantiate a Categorical
*****************************************
Build a Categorical Iteratively
*******************************

It can sometimes be useful to instantiate a Categorical with only one
category, then fill it in as needed.
category, then fill it in iteratively as needed.

For example, let’s say we have a Dataset with a column that has a lot of
categories, and we want to create a new Categorical column that keeps
Expand Down
6 changes: 5 additions & 1 deletion docs/source/tutorial/tutorial_categoricals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,11 @@ resulting Dataset is expanded.

Note that until a reported bug is fixed, column names might not persist through grouping operations.

For more in-depth information about Categoricals, see the `Categoricals User Guide <categoricals_user_guide>`.
For more in-depth information about Categoricals, see:

- Appendix: :doc:`Build a Categorical Iteratively <tutorial_cat_adv_instantiation>`
- :doc:`Categoricals User Guide <categoricals_user_guide>`
- API Reference: :py:class:`~.rt_categorical.Categorical` class

In the next section, `Accums <tutorial_accums.rst>`__, we look at
another way to do multi-key groupings with fancier output.
Expand Down
18 changes: 6 additions & 12 deletions docs/source/tutorial/tutorial_datetimes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,13 @@ strings. Strings are common when the data is from, say, a CSV file.

Unlike ``Date`` objects, ``DateTimeNano``\ s are time-zone-aware. When
you create a ``DateTimeNano``, you need to specify the time zone of
origin with the ``from_tz`` argument. Since Riptable is mainly used for
financial market data, its time zone options are limited to NYC, DUBLIN,
and (as of Riptable 1.3.6) Australia/Sydney, plus GMT and UTC (which is
an alias for GMT).

(If you’re wondering why ‘Australia/Sydney’ isn’t abbreviated, it’s
because Riptable uses the standard time zone name from the `tz
database <https://en.wikipedia.org/wiki/Tz_database>`__. In the future,
Riptable will support only the `standard
names <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`__
in the tz database.)
origin with the ``from_tz`` argument. Riptable supports time zones in
certain areas of interest, such as New York, Dublin, Sydney, Tokyo, and
Hong Kong (more are added as needed). It also supports GMT and UTC.

::
To see the list of valid time zones, use ``rt.TimeZone.valid_timezones``.

Here, we create a ``DateTimeNano`` with 'GMT' as the time zone of origin::

>>> rt.DateTimeNano(['20210101 09:31:15', '20210519 05:21:17'], from_tz='GMT')
DateTimeNano(['20210101 04:31:15.000000000', '20210519 01:21:17.000000000'], to_tz='NYC')
Expand Down
56 changes: 3 additions & 53 deletions docs/source/tutorial/tutorial_visualize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Matplotlib, to create visualizations of your data. You can also take
advantage of the plotting and HTML styling tools offered by Pandas.

In this section we’ll look at a couple of simple examples using
Matplotlib, Pandas, and Playa.
Matplotlib and Pandas.

::

Expand Down Expand Up @@ -202,59 +202,9 @@ your Dataset for the rendering::
</tr>
</tbody>
</table>

Groupscatter Plots with Playa
-----------------------------

Playa’s ``GroupScatter()`` method groups data into buckets based on
x-values and returns a Matplotlib plot summarizing the data.

::

from playa.plot import GroupScatter

Make a noisier price signal
^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

>>> ds.NoisyPrice = ds.Price + rng.normal(0, 10, ds.shape[0])

A regular Matplotlib scatter plot, for comparison
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

>>> num_rows = int(rt.ceil(len(symbols)/2))
>>> fig, axes = plt.subplots(num_rows, 2, figsize=(20, 5 * num_rows))
>>> for (ax, symbol) in zip(axes.flatten(), symbols):
... f = ds.Symbol==symbol
... ax.scatter(ds.Time[f], ds.NoisyPrice[f])
... ax.grid()
... ax.set_xlabel('Time')
... ax.set_ylabel('Price')
... ax.set_title(f'{symbol} Noisy Stock Price by Time')
>>> plt.show()

.. image:: output_25_0.png


Now a GroupScatter for each one, you can see how it clarifies the point cloud and reveals the shape.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

>>> fig, axes = plt.subplots(num_rows, 2, figsize=(20, 5 * num_rows))
>>> for (ax, symbol) in zip(axes.flatten(), symbols):
... f = ds.Symbol==symbol
... gs = GroupScatter(ds.Time[f].hour, ds.NoisyPrice[f])
... gs.plot(title=f'{symbol} Noisy Stock Price Over Time', x_label='Hour of the Day', y_label='Price', ax=ax)
>>> plt.show()

.. image:: output_27_0.png

This was just a brief introduction – check out the Matpotlib, Pandas,
and Playa documentation for more details and possibilities.
This was a brief introduction – check out the Matpotlib and Pandas documentation for
more details and possibilities.

Next we cover useful tools for working with ``NaN``\ s and other missing
values: `Working with Missing Data <tutorial_missing_data.rst>`__.
Expand Down
Loading

0 comments on commit 438b085

Please sign in to comment.