Skip to content

Commit

Permalink
Merge pull request #259 from juliamcclellan/purge_unify
Browse files Browse the repository at this point in the history
Remove instances of Unify from docstrings
  • Loading branch information
pcattori committed Aug 13, 2019
2 parents 74415af + 46f2768 commit ef6cfce
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 64 deletions.
6 changes: 3 additions & 3 deletions docs/user-guide/advanced-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Asynchronous Operations
-----------------------

You can opt-in to an asynchronous interface via the asynchronous keyword argument
for methods that kick-off Unify operations.
for methods that kick-off Tamr operations.

E.g.::

Expand Down Expand Up @@ -68,8 +68,8 @@ We encourage you to use the high-level, object-oriented interface offered by
the Python Client. If you aren't sure whether you need to send low-level HTTP
requests, you probably don't.

But sometimes it's useful to directly send HTTP requests to Unify; for example,
Unify has many APIs that are not covered by the higher-level interface (most of
But sometimes it's useful to directly send HTTP requests to Tamr; for example,
Tamr has many APIs that are not covered by the higher-level interface (most of
which are neither versioned nor supported). You can still call these endpoints
using the Python Client, but you'll need to work with raw ``Response`` objects.

Expand Down
16 changes: 8 additions & 8 deletions docs/user-guide/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you are already using the Python Client, you have 3 options:
Upgrade to the latest stable version *even* if it has a different major
version from what you currently use.

Note that you do not need to reason about the Unify API version nor the the Unify version.
Note that you do not need to reason about the Tamr API version nor the the Tamr version.

----

Expand All @@ -42,7 +42,7 @@ We'll illustrate with an example.
Let's say you want to get a dataset by name in your Python code.

**1.** If no such feature exists, you can file a Feature Request. Note that the Python
Client is limited by what the Unify API enables. So you should check if the Unify
Client is limited by what the Tamr API enables. So you should check if the Tamr
API docs to see if the feature you want is even possible.

**2.** If this feature already exists, you can try it out!
Expand All @@ -54,10 +54,10 @@ E.g. ``unify.datasets.by_name(some_dataset_name)``
**2.b** If it fails with an HTTP error, it could be for 2 reasons:

**2.a.i** It might be impossible to support that feature in the Python Client
because your Unify API version does not have the necessary endpoints to
because your Tamr API version does not have the necessary endpoints to
support it.

**2.a.ii** Your Unify API version *does* support this feature with some endpoints,
**2.a.ii** Your Tamr API version *does* support this feature with some endpoints,
but the Python Client know how to correctly implement this feature for this
version of the API. In this case, you should submit a Feature Request.

Expand All @@ -67,22 +67,22 @@ E.g. ``unify.datasets.by_name(some_dataset_name)``
.. note::
To see how to submit Bug Reports / Feature Requests, see :ref:`bug-reports-feature-requests`.

To check what endpoints your version of the Unify API supports, see `docs.tamr.com/reference <https://docs.tamr.com/reference>`_
To check what endpoints your version of the Tamr API supports, see `docs.tamr.com/reference <https://docs.tamr.com/reference>`_
(be sure to select the correct version in the top left!).


How do I call custom endpoints, e.g. endpoints outside the Unify API?
How do I call custom endpoints, e.g. endpoints outside the Tamr API?
---------------------------------------------------------------------

To call a custom endpoint *within* the Unify API, use the ``client.request()`` method, and
To call a custom endpoint *within* the Tamr API, use the ``client.request()`` method, and
provide an endpoint described by a path relative to ``base_path``. For example, if ``base_path``
is ``/api/versioned/v1/`` (the default), and you want to get ``/api/versioned/v1/projects/1``,
you only need to provide ``projects/1`` (the relative ID provided by the project) as the endpoint,
and the Client will resolve that into ``/api/versioned/v1/projects/1``.

There are various APIs outside the ``/api/versioned/v1/`` prefix that are often useful or necessary
to call - e.g. ``/api/service/health``, or other un-versioned / unsupported APIs. To call a custom
endpoint *outside* the Unify API, use the ``client.request()`` method, and provide an endpoint
endpoint *outside* the Tamr API, use the ``client.request()`` method, and provide an endpoint
described by an *absolute* path (a path starting with ``/``). For example, to get
``/api/service/health`` (no matter what ``base_path`` is), call ``client.request()`` with
``/api/service/health`` as the endpoint. The Client will ignore ``base_path`` and send the
Expand Down
12 changes: 6 additions & 6 deletions docs/user-guide/geo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ There are three layers of information, modeled after GeoJSON; see https://tools.
- coordinates (doubles; exactly how these are structured depends on the type of the geometry)

Although the Python Geo Interface is non-prescriptive when it comes to the data types of the id and
properties, Unify has a more restricted set of supported types. See https://docs.tamr.com/reference#attribute-types
properties, Tamr has a more restricted set of supported types. See https://docs.tamr.com/reference#attribute-types

The :class:`~tamr_unify_client.models.dataset.resource.Dataset` class supports the
``__geo_interface__`` property. This will produce one ``FeatureCollection`` for the entire dataset.
Expand Down Expand Up @@ -56,20 +56,20 @@ By default the features' geometries will be placed into the first dataset attrib
type. You can override this by specifying the geometry attribute to use in the ``geo_attr``
parameter to ``from_geo_features``.

Rules for converting from Unify records to Geospatial Features
Rules for converting from Tamr records to Geospatial Features
------------------------------------------------------------------

The record's primary key will be used as the feature's ``id``. If the primary key is a single
attribute, then the value of that attribute will be the value of ``id``. If the primary key is
composed of multiple attributes, then the value of the ``id`` will be an array with the values
of the key attributes in order.

Unify allows any number of geometry attributes per record; the Python Geo Interface is limited to
one. When converting Unify records to Python Geo Features, the first geometry attribute in the schema
Tamr allows any number of geometry attributes per record; the Python Geo Interface is limited to
one. When converting Tamr records to Python Geo Features, the first geometry attribute in the schema
will be used as the geometry; all other geometry attributes will appear as properties with no type
conversion. In the future, additional control over the handling of multiple geometries may be
provided; the current set of capabilities is intended primarily to support the use case of working
with FeatureCollections within Unify, and FeatureCollection has only one geometry per feature.
with FeatureCollections within Tamr, and FeatureCollection has only one geometry per feature.

An attribute is considered to have geometry type if it has type ``RECORD`` and contains an attribute
named ``point``, ``multiPoint``, ``lineString``, ``multiLineString``, ``polygon``, or
Expand All @@ -82,7 +82,7 @@ may be provided.
All other attributes will be placed in ``properties``, with no type conversion. This includes
all geometry attributes other than the first.

Rules for converting from Geospatial Features to Unify records
Rules for converting from Geospatial Features to Tamr records
--------------------------------------------------------------

The Feature's ``id`` will be converted into the primary key for the record. If the record uses
Expand Down
8 changes: 4 additions & 4 deletions docs/user-guide/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Next, create an authentication provider and use that to create an authenticated

For more, see `User Guide > Secure Credentials <secure-credentials.html>`_ .

By default, the client tries to find the Unify instance on ``localhost``.
By default, the client tries to find the Tamr instance on ``localhost``.
To point to a different host, set the host argument when instantiating the Client.

For example, to connect to ``10.20.0.1``::
Expand Down Expand Up @@ -68,14 +68,14 @@ E.g. To access the Unified Dataset for a particular project::

ud = project.unified_dataset()

Kick-off Unify Operations
Kick-off Tamr Operations
-------------------------

Some methods on Model objects can kick-off long-running Unify operations.
Some methods on Model objects can kick-off long-running Tamr operations.

Here, kick-off a "Unified Dataset refresh" operation::

operation = project.unified_dataset().refresh()
assert op.succeeded()

By default, the API Clients expose a synchronous interface for Unify operations.
By default, the API Clients expose a synchronous interface for Tamr operations.
2 changes: 1 addition & 1 deletion tamr_unify_client/attribute/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Attribute(BaseResource):
"""
A Unify Attribute.
A Tamr Attribute.
See https://docs.tamr.com/reference#attribute-types
"""
Expand Down
4 changes: 2 additions & 2 deletions tamr_unify_client/auth/username_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def _basic_auth_str(username, password):


class UsernamePasswordAuth(HTTPBasicAuth):
"""Provides username/password authentication for Unify.
Specifically, sets the `Authorization` HTTP header with Unify's custom `BasicCreds` format.
"""Provides username/password authentication for Tamr.
Specifically, sets the `Authorization` HTTP header with Tamr's custom `BasicCreds` format.
:param str username:
:param str password:
Expand Down
2 changes: 1 addition & 1 deletion tamr_unify_client/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class MachineLearningModel(BaseResource):
"""A Unify Machine Learning model."""
"""A Tamr Machine Learning model."""

@classmethod
def from_json(cls, client, resource_json, api_path=None):
Expand Down
2 changes: 1 addition & 1 deletion tamr_unify_client/categorization/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class CategorizationProject(Project):
"""A Categorization project in Unify."""
"""A Categorization project in Tamr."""

def model(self):
"""Machine learning model for this Categorization project.
Expand Down
12 changes: 6 additions & 6 deletions tamr_unify_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ def successful(self):


class Client:
"""Python Client for Unify API. Each client is specific to a specific origin
"""Python Client for Tamr API. Each client is specific to a specific origin
(protocol, host, port).
:param auth: Unify-compatible Authentication provider.
:param auth: Tamr-compatible Authentication provider.
**Recommended**: use one of the classes described in :ref:`authentication`
:type auth: :class:`requests.auth.AuthBase`
:param host: Host address of remote Unify instance (e.g. `10.0.10.0`). Default: `'localhost'`
:param host: Host address of remote Tamr instance (e.g. `10.0.10.0`). Default: `'localhost'`
:type host: str
:param protocol: Either `'http'` or `'https'`. Default: `'http'`
:type protocol: str
:param port: Unify instance main port. Default: `9100`
:param port: Tamr instance main port. Default: `9100`
:type port: int
:param base_path: Base API path. Requests made by this client will be relative to this path. Default: `'api/versioned/v1/'`
:type base_path: str
Expand Down Expand Up @@ -135,7 +135,7 @@ def delete(self, endpoint, **kwargs):

@property
def projects(self):
"""Collection of all projects on this Unify instance.
"""Collection of all projects on this Tamr instance.
:return: Collection of all projects.
:rtype: :class:`~tamr_unify_client.project.collection.ProjectCollection`
Expand All @@ -144,7 +144,7 @@ def projects(self):

@property
def datasets(self):
"""Collection of all datasets on this Unify instance.
"""Collection of all datasets on this Tamr instance.
:return: Collection of all datasets.
:rtype: :class:`~tamr_unify_client.dataset.collection.DatasetCollection`
Expand Down
6 changes: 3 additions & 3 deletions tamr_unify_client/dataset/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def by_name(self, dataset_name):

def create(self, creation_spec):
"""
Create a Dataset in Unify
Create a Dataset in Tamr
:param creation_spec: Dataset creation specification should be formatted as specified in the `Public Docs for Creating a Dataset <https://docs.tamr.com/reference#create-a-dataset>`_.
:type creation_spec: dict[str, str]
Expand All @@ -107,9 +107,9 @@ def create_from_dataframe(
:type df: :class:`pandas.DataFrame`
:param primary_key_name: The name of the primary key of the dataset. Must be a column of `df`.
:type primary_key_name: str
:param dataset_name: What to name the dataset in Unify. There cannot already be a dataset with this name.
:param dataset_name: What to name the dataset in Tamr. There cannot already be a dataset with this name.
:type dataset_name: str
:param ignore_nan: Whether to convert `NaN` values to `null` before upserting records to Unify. If `False` and
:param ignore_nan: Whether to convert `NaN` values to `null` before upserting records to Tamr. If `False` and
`NaN` is in `df`, this function will fail. Optional, default is `True`.
:type ignore_nan: bool
:returns: The newly created dataset.
Expand Down
2 changes: 1 addition & 1 deletion tamr_unify_client/dataset/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class DatasetProfile(BaseResource):
"""Profile info of a Unify dataset."""
"""Profile info of a Tamr dataset."""

@classmethod
def from_json(cls, client, resource_json, api_path=None) -> "DatasetProfile":
Expand Down
18 changes: 9 additions & 9 deletions tamr_unify_client/dataset/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class Dataset(BaseResource):
"""A Unify dataset."""
"""A Tamr dataset."""

@classmethod
def from_json(cls, client, resource_json, api_path=None):
Expand Down Expand Up @@ -64,7 +64,7 @@ def _update_records(self, updates, **json_args):
:param records: Each record should be formatted as specified in the `Public Docs for Dataset updates <https://docs.tamr.com/reference#modify-a-datasets-records>`_.
:type records: iterable[dict]
:param `**json_args`: Arguments to pass to the JSON `dumps` function, as documented `here <https://simplejson.readthedocs.io/en/latest/#simplejson.dumps>`_.
Some of these, such as `indent`, may not work with Unify.
Some of these, such as `indent`, may not work with Tamr.
:returns: JSON response body from server.
:rtype: :py:class:`dict`
"""
Expand All @@ -90,7 +90,7 @@ def upsert_records(self, records, primary_key_name, **json_args):
:param primary_key_name: The name of the primary key for these records, which must be a key in each record dictionary.
:type primary_key_name: str
:param `**json_args`: Arguments to pass to the JSON `dumps` function, as documented `here <https://simplejson.readthedocs.io/en/latest/#simplejson.dumps>`_.
Some of these, such as `indent`, may not work with Unify.
Some of these, such as `indent`, may not work with Tamr.
:return: JSON response body from the server.
:rtype: dict
"""
Expand Down Expand Up @@ -222,12 +222,12 @@ def from_geo_features(self, features, geo_attr=None):
See: geopandas.GeoDataFrame.from_features()
If geo_attr is provided, then the named Unify attribute will be used for the geometry.
If geo_attr is provided, then the named Tamr attribute will be used for the geometry.
If geo_attr is not provided, then the first attribute on the dataset with geometry type
will be used for the geometry.
:param features: geospatial features
:param geo_attr: (optional) name of the Unify attribute to use for the feature's geometry
:param geo_attr: (optional) name of the Tamr attribute to use for the feature's geometry
:type geo_attr: str
"""
if hasattr(features, "__geo_interface__"):
Expand Down Expand Up @@ -283,7 +283,7 @@ def itergeofeatures(self, geo_attr=None):
See https://gist.github.com/sgillies/2217756
:param geo_attr: (optional) name of the Unify attribute to use for the feature's geometry
:param geo_attr: (optional) name of the Tamr attribute to use for the feature's geometry
:type geo_attr: str
:return: stream of features
:rtype: Python generator yielding :py:class:`dict[str, object]`
Expand Down Expand Up @@ -330,9 +330,9 @@ def _geo_attr(self):

@staticmethod
def _record_to_feature(record, key_value, key_attrs, geo_attr):
"""Convert a Unify record to a Python Geo Interface Feature
"""Convert a Tamr record to a Python Geo Interface Feature
:param record: Unify record
:param record: Tamr record
:param key_value: Function to extract the value of the primary key from the record
:param key_attrs: Set of attributes that comprise the primary key for the record
:param geo_attr: The singular attribute to use as the geometry
Expand Down Expand Up @@ -364,7 +364,7 @@ def _record_to_feature(record, key_value, key_attrs, geo_attr):

@staticmethod
def _feature_to_record(feature, key_attrs, geo_attr):
"""Convert a Python Geo Interface Feature to a Unify record
"""Convert a Python Geo Interface Feature to a Tamr record
feature can be a dict representing a Geospatial Feature, or a Feature object
that implements the __geo_interface__ property.
Expand Down
2 changes: 1 addition & 1 deletion tamr_unify_client/dataset/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class DatasetStatus(BaseResource):
"""Streamability status of a Unify dataset."""
"""Streamability status of a Tamr dataset."""

@classmethod
def from_json(cls, client, resource_json, api_path=None) -> "DatasetStatus":
Expand Down
2 changes: 1 addition & 1 deletion tamr_unify_client/dataset/uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def uri(self):
def dataset(self):
"""Fetch the dataset that this identifier points to.
:return: A Unify dataset.
:return: A Tamr dataset.
:rtype: :class: `~tamr_unify_client.dataset.resource.Dataset`
"""
return self.client.datasets.by_resource_id(self.resource_id)
Expand Down

0 comments on commit ef6cfce

Please sign in to comment.