Skip to content

Commit

Permalink
Merge pull request #61 from martindurant/rename_to_akimbo
Browse files Browse the repository at this point in the history
rename
  • Loading branch information
martindurant committed Jun 20, 2024
2 parents b31ab22 + a150b1b commit 83cbe37
Show file tree
Hide file tree
Showing 23 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.dir-locals.el

# setuptools_scm
src/awkward_pandas/version.py
src/akimbo/version.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# awkward-pandas
# akimbo

> Awkward Array extension for use in pandas.
[![Tests](https://github.com/intake/awkward-pandas/actions/workflows/pypi.yml/badge.svg)](https://github.com/intake/awkward-pandas/actions/workflows/pypi.yml)
[![Documentation Status](https://readthedocs.org/projects/awkward-pandas/badge/?version=latest)](https://awkward-pandas.readthedocs.io/en/latest/?badge=latest)
[![Tests](https://github.com/intake/akimbo/actions/workflows/pypi.yml/badge.svg)](https://github.com/intake/akimbo/actions/workflows/pypi.yml)
[![Documentation Status](https://readthedocs.org/projects/akimbo/badge/?version=latest)](https://akimbo.readthedocs.io/en/latest/?badge=latest)

See the [quick
start](https://awkward-pandas.readthedocs.io/en/latest/quickstart.html)
in the documentation for an introduction to awkward-pandas.
start](https://akimbo.readthedocs.io/en/latest/quickstart.html)
in the documentation for an introduction to akimbo.

Acknowledgements
----------------
Expand Down
6 changes: 3 additions & 3 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
awkward-pandas
akimbo
==============

.. currentmodule:: awkward_pandas
.. currentmodule:: akimbo

Top Level Functions
~~~~~~~~~~~~~~~~~~~
Expand All @@ -17,7 +17,7 @@ Top Level Functions
Accessor
~~~~~~~~

.. currentmodule:: awkward_pandas.accessor
.. currentmodule:: akimbo.accessor

.. autosummary::
:toctree: generated/
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "awkward-pandas"
project = "akimbo"
copyright = "2022, Awkward Developers"
author = "Awkward Developers"

Expand All @@ -29,7 +29,7 @@
"Thumbs.db",
".DS_Store",
"**.ipynb_checkpoints",
"**awkward-pandas-demo.ipynb",
"**akimbo-demo.ipynb",
]


Expand Down
10 changes: 5 additions & 5 deletions docs/demo/awkward-pandas-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"metadata": {},
"outputs": [],
"source": [
"import awkward_pandas\n",
"import akimbo\n",
"import pandas as pd\n",
"import awkward as ak\n",
"import dask_awkward as dak"
Expand Down Expand Up @@ -442,7 +442,7 @@
"id": "04ecbc23-4834-4ebe-bdb5-f2e467c2137d",
"metadata": {},
"source": [
"In awkward-pandas world we have access to functions from the awkward-array API:"
"In akimbo world we have access to functions from the awkward-array API:"
]
},
{
Expand Down Expand Up @@ -955,7 +955,7 @@
"metadata": {},
"outputs": [],
"source": [
"merged = awkward_pandas.merge(df[[\"run\", \"luminosityBlock\"]])"
"merged = akimbo.merge(df[[\"run\", \"luminosityBlock\"]])"
]
},
{
Expand Down Expand Up @@ -1024,7 +1024,7 @@
}
],
"source": [
"ak.to_parquet(awkward_pandas.merge(df[df.luminosityBlock == maybe_strange_lumiblock]), \"strange.parquet\")"
"ak.to_parquet(akimbo.merge(df[df.luminosityBlock == maybe_strange_lumiblock]), \"strange.parquet\")"
]
},
{
Expand All @@ -1051,7 +1051,7 @@
}
],
"source": [
"ak.to_parquet(awkward_pandas.merge(df[df.luminosityBlock == maybe_strange_lumiblock]).values._data, \"strange.parquet\")"
"ak.to_parquet(akimbo.merge(df[df.luminosityBlock == maybe_strange_lumiblock]).values._data, \"strange.parquet\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. awkward-pandas documentation master file, created by
.. akimbo documentation master file, created by
sphinx-quickstart on Wed Oct 26 10:24:20 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Awkward Pandas
==============

The awkward-pandas project provides a Pandas `ExtensionArray`_ and
The akimbo project provides a Pandas `ExtensionArray`_ and
`ExtensionDtype`_ that enable analysis of nested, non-tabular data in
workflows that are already leveraging `Pandas`_ Series and DataFrames.

Expand Down
6 changes: 3 additions & 3 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Installation
Requirements
~~~~~~~~~~~~

To install ``awkward-pandas`` you will need both ``awkward`` and
To install ``akimbo`` you will need both ``awkward`` and
``pandas``. Whether you install from PyPI or conda-forge, these
requirements will be enforced. The strict requirements are:

Expand All @@ -16,14 +16,14 @@ From PyPI

.. code-block:: none
$ pip install awkward-pandas
$ pip install akimbo
From conda-forge
~~~~~~~~~~~~~~~~

.. code-block:: none
$ conda install awkward-pandas -c conda-forge
$ conda install akimbo -c conda-forge
Optional dependencies
~~~~~~~~~~~~~~~~~~~~~
Expand Down
12 changes: 6 additions & 6 deletions docs/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"outputs": [],
"source": [
"import awkward as ak\n",
"import awkward_pandas as akpd\n",
"import akimbo as akpd\n",
"import numpy as np\n",
"import pandas as pd"
]
Expand Down Expand Up @@ -59,11 +59,11 @@
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">awkward_pandas <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2023.8</span>.<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1.</span>dev2+g7abb99c\n",
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">akimbo <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2023.8</span>.<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1.</span>dev2+g7abb99c\n",
"</pre>\n"
],
"text/plain": [
"awkward_pandas \u001b[1;36m2023.8\u001b[0m.\u001b[1;36m1.\u001b[0mdev2+g7abb99c\n"
"akimbo \u001b[1;36m2023.8\u001b[0m.\u001b[1;36m1.\u001b[0mdev2+g7abb99c\n"
]
},
"metadata": {},
Expand Down Expand Up @@ -164,7 +164,7 @@
"id": "021d3236",
"metadata": {},
"source": [
"We get a series representation of the awkward array by using awkward-pandas `form_awkward` function:"
"We get a series representation of the awkward array by using akimbo `form_awkward` function:"
]
},
{
Expand Down Expand Up @@ -569,7 +569,7 @@
{
"data": {
"text/plain": [
"<awkward_pandas.accessor.AwkwardAccessor at 0x13ff18cd0>"
"<akimbo.accessor.AwkwardAccessor at 0x13ff18cd0>"
]
},
"execution_count": 13,
Expand Down Expand Up @@ -676,7 +676,7 @@
"\n",
"2. In the second call we are accessing the underlying array directly, still via the `ak` accessor, but we then call the `ak.min` function directly, so an awkward `Array` object is returned.\n",
"\n",
"The second path should be somewhat rare when using awkward-pandas. The purpose of awkward-pandas is to plug awkward-arrays into Pandas-like workflows. If you find yourself reaching for the second type of call, then think about if you actually need Pandas at all! You may be fine just using awkward-array. Of course, there will be occasional reasons to need to reach down to the underlying array, which is why we provide that interface.\n",
"The second path should be somewhat rare when using akimbo. The purpose of akimbo is to plug awkward-arrays into Pandas-like workflows. If you find yourself reaching for the second type of call, then think about if you actually need Pandas at all! You may be fine just using awkward-array. Of course, there will be occasional reasons to need to reach down to the underlying array, which is why we provide that interface.\n",
"\n",
"In general, the `ak` accessor on a `Series` of `awkward` dtype can be used to leverage the `awkward` library while continuing to work with `Series` objects. "
]
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["hatchling>=1.8.0", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "awkward-pandas"
name = "akimbo"
description = "Awkward Array Pandas Extension"
readme = "README.md"
license = "BSD-3-Clause"
Expand Down Expand Up @@ -35,7 +35,7 @@ dynamic = ["version"]

[project.optional-dependencies]
complete = [
"awkward-pandas[strings,parquet,dask]",
"akimbo[strings,parquet,dask]",
]
dask = [
"dask[dataframe]",
Expand All @@ -47,7 +47,7 @@ strings = [
"pyarrow >=7.0.0",
]
test = [
"awkward-pandas[complete]",
"akimbo[complete]",
"pytest >=6.0",
"pytest-cov >=3.0.0",
"distributed",
Expand All @@ -61,15 +61,15 @@ docs = [
]

[project.urls]
Homepage = "https://github.com/intake/awkward-pandas"
"Bug Tracker" = "https://github.com/intake/awkward-pandas/issues"
Homepage = "https://github.com/intake/akimbo"
"Bug Tracker" = "https://github.com/intake/akimbo/issues"

[tool.hatch.version]
source = "vcs"
path = "src/awkward_pandas/__init__.py"
path = "src/akimbo/__init__.py"

[tool.hatch.build.hooks.vcs]
version-file = "src/awkward_pandas/version.py"
version-file = "src/akimbo/version.py"

[tool.hatch.build.targets.sdist]
include = ["/src"]
Expand Down Expand Up @@ -125,8 +125,8 @@ fail_under = 75
show_missing = true

[tool.coverage.run]
omit = ["src/awkward_pandas/version.py"]
source = ["src/awkward_pandas"]
omit = ["src/akimbo/version.py"]
source = ["src/akimbo"]

[tool.ruff]
ignore = ["E501"]
11 changes: 11 additions & 0 deletions src/akimbo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from __future__ import annotations

import akimbo.dask
import akimbo.pandas # noqa
from akimbo.io import read_json, read_parquet
from akimbo.version import version as __version__ # noqa

__all__ = (
"read_parquet",
"read_json",
)
8 changes: 4 additions & 4 deletions src/awkward_pandas/dask.py → src/akimbo/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
register_series_accessor,
)

from awkward_pandas.mixin import Accessor as AkAccessor
from awkward_pandas.pandas import PandasAwkwardAccessor
from akimbo.mixin import Accessor as AkAccessor
from akimbo.pandas import PandasAwkwardAccessor


class DaskAwkwardAccessor(AkAccessor):
Expand Down Expand Up @@ -61,7 +61,7 @@ def run(self, *args, **kwargs):
meta = None

def inner(data, _=DaskAwkwardAccessor):
import awkward_pandas.pandas # noqa: F401
import akimbo.pandas # noqa: F401

ar2 = (ar.ak.array if hasattr(ar, "ak") else ar for ar in args)
out = op(data.ak.array, *ar2, **kwargs)
Expand All @@ -82,7 +82,7 @@ def __getattr__(self, item):
@functools.wraps(func)
def f(*others, **kwargs):
def func2(data):
import awkward_pandas.pandas # noqa: F401
import akimbo.pandas # noqa: F401

# data and others are pandas objects here
return getattr(data.ak, item)(*others, **kwargs)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/awkward_pandas/io.py → src/akimbo/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import awkward as ak
import fsspec

import awkward_pandas.pandas
import akimbo.pandas


def read_parquet(
Expand All @@ -28,7 +28,7 @@ def read_parquet(
will return a series.
"""
ds = ak.from_parquet(url, storage_options=storage_options, **kwargs)
s = awkward_pandas.pandas.PandasAwkwardAccessor._to_output(ds)
s = akimbo.pandas.PandasAwkwardAccessor._to_output(ds)
if extract:
return s.ak.unmerge()
return s
Expand Down Expand Up @@ -58,7 +58,7 @@ def read_json(
line_delimited=True,
**kwargs,
)
s = awkward_pandas.pandas.PandasAwkwardAccessor._to_output(ds)
s = akimbo.pandas.PandasAwkwardAccessor._to_output(ds)
if extract:
return s.ak.unmerge()
return s
4 changes: 2 additions & 2 deletions src/awkward_pandas/mixin.py → src/akimbo/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ def array(self) -> ak.Array:
@property
def str(self):
"""Nested string operations"""
from awkward_pandas.strings import StringAccessor
from akimbo.strings import StringAccessor

return StringAccessor(self)

@property
def dt(self):
"""Nested datetime operations"""
from awkward_pandas.datetimes import DatetimeAccessor
from akimbo.datetimes import DatetimeAccessor

return DatetimeAccessor(self)

Expand Down
2 changes: 1 addition & 1 deletion src/awkward_pandas/pandas.py → src/akimbo/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pyarrow
import pyarrow as pa

from awkward_pandas.mixin import Accessor
from akimbo.mixin import Accessor


@pd.api.extensions.register_series_accessor("ak")
Expand Down
2 changes: 1 addition & 1 deletion src/awkward_pandas/polars.py → src/akimbo/polars.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import awkward as ak
import polars as pl

from awkward_pandas.mixin import Accessor
from akimbo.mixin import Accessor


@pl.api.register_series_namespace("ak")
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 0 additions & 11 deletions src/awkward_pandas/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

dd = pytest.importorskip("dask.dataframe")

import awkward_pandas.dask # noqa
import akimbo.dask # noqa


def test_simple_map():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

import awkward_pandas.pandas # noqa
import akimbo.pandas # noqa

pd = pytest.importorskip("pandas")

Expand Down
Loading

0 comments on commit 83cbe37

Please sign in to comment.