Skip to content

Commit

Permalink
Merge pull request #266 from juliamcclellan/purge_unify
Browse files Browse the repository at this point in the history
Removing unify from docs
  • Loading branch information
pcattori committed Aug 15, 2019
2 parents ae34775 + 0440445 commit b8410c3
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 50 deletions.
12 changes: 6 additions & 6 deletions docs/contributor-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Contributor Guide
Code of Conduct
---------------

See `CODE_OF_CONDUCT.md <https://github.com/Datatamer/unify-client-python/blob/master/CODE_OF_CONDUCT.md>`_
See `CODE_OF_CONDUCT.md <https://github.com/Datatamer/tamr-client/blob/master/CODE_OF_CONDUCT.md>`_

.. _bug-reports-feature-requests:

🐛 Bug Reports / 🙋 Feature Requests
------------------------------------

Please leave bug reports and feature requests as `Github issues <https://github.com/Datatamer/unify-client-python/issues/new/choose>`_ .
Please leave bug reports and feature requests as `Github issues <https://github.com/Datatamer/tamr-client/issues/new/choose>`_ .

----

Expand All @@ -26,7 +26,7 @@ should be avoided as much as possible.

For larger, new features:

`Open an RFC issue <https://github.com/Datatamer/unify-client-python/issues/new/choose>`_ .
`Open an RFC issue <https://github.com/Datatamer/tamr-client/issues/new/choose>`_ .
Discuss the feature with project maintainers to be sure that your change fits with the project
vision and that you won't be wasting effort going in the wrong direction.

Expand All @@ -35,7 +35,7 @@ For larger, new features:
Contributions / PRs should follow the
`Forking Workflow <https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow>`_ :

1. Fork it: https://github.com/[your-github-username]/unify-client-python/fork
1. Fork it: https://github.com/[your-github-username]/tamr-client/fork
2. Create your feature branch::

git checkout -b my-new-feature
Expand Down Expand Up @@ -69,8 +69,8 @@ see the `official documentation <https://poetry.eustace.io/>`_ .

2. Clone your fork and ``cd`` into the project::

git clone https://github.com/<your-github-username>/unify-client-python
cd unify-client-python
git clone https://github.com/<your-github-username>/tamr-client
cd tamr-client

3. Use ``pyenv`` to install a compatible Python version (``3.6`` or newer; e.g. ``3.7.3``)::

Expand Down
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ Example
import os

# grab credentials from environment variables
username = os.environ['UNIFY_USERNAME']
password = os.environ['UNIFY_PASSWORD']
username = os.environ['TAMR_USERNAME']
password = os.environ['TAMR_PASSWORD']
auth = UsernamePasswordAuth(username, password)

host = 'localhost' # replace with your Tamr Unify host
unify = Client(auth, host=host)
host = 'localhost' # replace with your Tamr host
tamr = Client(auth, host=host)

# programmatically interace with Tamr Unify!
# programmatically interace with Tamr!
# e.g. refresh your project's Unified Dataset
project = unify.projects.by_resource_id('3')
project = tamr.projects.by_resource_id('3')
ud = project.unified_dataset()
op = ud.refresh()
assert op.succeeded()
Expand Down
30 changes: 15 additions & 15 deletions docs/user-guide/advanced-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ You can set up HTTP-API-call logging on any client via
standard `Python logging mechanisms <https://docs.python.org/3/library/logging.html>`_ ::

from tamr_unify_client import Client
from unify_api_v1.auth import UsernamePasswordAuth
from tamr_unify_client import UsernamePasswordAuth
import logging

auth = UsernamePasswordAuth("username", "password")
unify = Client(auth)
tamr = Client(auth)

# Reload the `logging` library since other libraries (like `requests`) already
# configure logging differently. See: https://stackoverflow.com/a/53553516/1490091
Expand All @@ -38,7 +38,7 @@ standard `Python logging mechanisms <https://docs.python.org/3/library/logging.h
logging.basicConfig(
level=logging.INFO, format="%(message)s", filename=log_path, filemode="w"
)
unify.logger = logging.getLogger(name)
tamr.logger = logging.getLogger(name)

By default, when logging is set up, the client will log ``{method} {url} :
{response_status}`` for each API call.
Expand All @@ -56,8 +56,8 @@ You can customize this by passing in a value for ``log_entry``::
"json": response.json(),
})

# after configuring `unify.logger`
unify.log_entry = log_entry
# after configuring `tamr.logger`
tamr.log_entry = log_entry

.. _custom-http-requests-and-unversioned-api-access:

Expand All @@ -81,28 +81,28 @@ The client exposes a ``request`` method with the same interface as

# import Python Client library and configure your client

unify = Client(auth)
# do stuff with the `unify` client
tamr = Client(auth)
# do stuff with the `tamr` client

# now I NEED to send a request to a specific endpoint
response = unify.request('GET', 'relative/path/to/resource')
response = tamr.request('GET', 'relative/path/to/resource')

This will send a request relative to the base_path registered with the client.
If you provide an absolute path to the resource, the base_path will be ignored
when composing the request::

# import Python Client library and configure your client

unify = Client(auth)
tamr = Client(auth)

# request a resource outside the configured base_path
response = unify.request('GET', '/absolute/path/to/resource')
response = tamr.request('GET', '/absolute/path/to/resource')

You can also use the ``get``, ``post``, ``put``, ``delete`` convenience
methods::

# e.g. `get` convenience method
response = unify.get('relative/path/to/resource')
response = tamr.get('relative/path/to/resource')

Custom Host / Port / Base API path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -114,8 +114,8 @@ Then just call ``request`` as described above::

# import Python Client library and configure your client

unify = api.Client(auth)
# do stuff with the `unify` client
tamr = api.Client(auth)
# do stuff with the `tamr` client

# now I NEED to send requests to a different host/port/base API path etc..
# NOTE: in this example, we reuse `auth` from the first client, but we could
Expand All @@ -141,8 +141,8 @@ Authentication provider directly to the ``requests`` library::
import os
import requests

username = os.environ['UNIFY_USERNAME']
password = os.environ['UNIFY_PASSWORD']
username = os.environ['TAMR_USERNAME']
password = os.environ['TAMR_PASSWORD']
auth = UsernamePasswordAuth(username, password)

response = requests.request('GET', 'some/specific/endpoint', auth=auth)
2 changes: 1 addition & 1 deletion docs/user-guide/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ API docs to see if the feature you want is even possible.

**2.** If this feature already exists, you can try it out!

E.g. ``unify.datasets.by_name(some_dataset_name)``
E.g. ``tamr.datasets.by_name(some_dataset_name)``

**2.a** It works! 🎉

Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Latest (unstable)

To install the bleeding edge::

git clone https://github.com/Datatamer/unify-client-python
cd unify-client-python
git clone https://github.com/Datatamer/tamr-client
cd tamr-client
pip install .

Offline installs
Expand Down
14 changes: 7 additions & 7 deletions docs/user-guide/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Next, create an authentication provider and use that to create an authenticated

import os

username = os.environ['UNIFY_USERNAME']
password = os.environ['UNIFY_PASSWORD']
username = os.environ['TAMR_USERNAME']
password = os.environ['TAMR_PASSWORD']

auth = UsernamePasswordAuth(username, password)
unify = Client(auth)
tamr = Client(auth)

.. warning::
For security, it's best to read your credentials in from environment variables
Expand All @@ -30,7 +30,7 @@ To point to a different host, set the host argument when instantiating the Clien

For example, to connect to ``10.20.0.1``::

unify = Client(auth, host='10.20.0.1')
tamr = Client(auth, host='10.20.0.1')

Top-level collections
---------------------
Expand All @@ -42,10 +42,10 @@ with simple ``for``-loops.

E.g.::

for project in unify.projects:
for project in tamr.projects:
print(project.name)

for dataset in unify.datasets:
for dataset in tamr.datasets:
print(dataset.name)

Fetch a specific resource
Expand All @@ -56,7 +56,7 @@ via the ``by_resource_id`` methods exposed by collections.

E.g. To fetch the project with ID ``'1'``::

project = unify.projects.by_resource_id('1')
project = tamr.projects.by_resource_id('1')

Resource relationships
----------------------
Expand Down
10 changes: 5 additions & 5 deletions docs/user-guide/secure-credentials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ You can use ``os.environ`` to read in your credentials from environment variable

from tamr_unify_client.auth import UsernamePasswordAuth

username = os.environ['UNIFY_USERNAME'] # replace with your username environment variable name
password = os.environ['UNIFY_PASSWORD'] # replace with your password environment variable name
username = os.environ['TAMR_USERNAME'] # replace with your username environment variable name
password = os.environ['TAMR_PASSWORD'] # replace with your password environment variable name

auth = UsernamePasswordAuth(username, password)


You can pass in the environment variables from the terminal by including them
before your command::

UNIFY_USERNAME="my Unify username" UNIFY_PASSWORD="my Unify password" python my_script.py
TAMR_USERNAME="my Tamr username" TAMR_PASSWORD="my Tamr password" python my_script.py

You can also create an ``.sh`` file to store your environment variables and
simply ``source`` that file before running your script.
Expand All @@ -39,8 +39,8 @@ You can also store your credentials in a secure credentials file::

# credentials.yaml
---
username: "my unify username"
password: "my unify password"
username: "my tamr username"
password: "my tamr password"

Then ``pip install pyyaml`` read the credentials in your Python code::

Expand Down
16 changes: 8 additions & 8 deletions docs/user-guide/workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Continuous Categorization
from tamr_unify_client.auth import UsernamePasswordAuth
import os

username = os.environ['UNIFY_USERNAME']
password = os.environ['UNIFY_PASSWORD']
username = os.environ['TAMR_USERNAME']
password = os.environ['TAMR_PASSWORD']
auth = UsernamePasswordAuth(username, password)

host = 'localhost' # replace with your host
unify = Client(auth)
tamr = Client(auth)

project_id = "1" # replace with your project ID
project = unify.projects.by_resource_id(project_id)
project = tamr.projects.by_resource_id(project_id)
project = project.as_categorization()

unified_dataset = project.unified_dataset()
Expand All @@ -41,15 +41,15 @@ Continuous Mastering
from tamr_unify_client.auth import UsernamePasswordAuth
import os

username = os.environ['UNIFY_USERNAME']
password = os.environ['UNIFY_PASSWORD']
username = os.environ['TAMR_USERNAME']
password = os.environ['TAMR_PASSWORD']
auth = UsernamePasswordAuth(username, password)

host = 'localhost' # replace with your host
unify = Client(auth)
tamr = Client(auth)

project_id = "1" # replace with your project ID
project = unify.projects.by_resource_id(project_id)
project = tamr.projects.by_resource_id(project_id)
project = project.as_mastering()

unified_dataset = project.unified_dataset()
Expand Down

0 comments on commit b8410c3

Please sign in to comment.