Datatamer / tamr-client

Programmatically interact with Tamr
https://tamr-client.readthedocs.io
Apache License 2.0
11 stars 25 forks source link

TC: Fix mastering functions and conform to synchronous operations #442

Closed skalish closed 4 years ago

skalish commented 4 years ago

↪️ Pull Request

The merged #440 included several functions that used incorrect request urls for kicking off project operations. My fault 😬. This PR fixes this (it has been tested against a live Tamr instance). This underscores the need for end-to-end testing, but even basic request format tests would have caught this.

Additionally, this PR splits each of these functions into a hidden (_-prefixed) asynchronous version that returns the pending operation and a synchronous version exposed to the user, following the pattern of tc.dataset.unified._apply_changes and tc.dataset.unified.apply_changes.

💻 Examples

✔️ PR Todo

skalish commented 4 years ago

One last decision: the _-prefixed async versions of these functions are only accessible via e.g.tc.mastering._mastering._publish_clusters_async since they are not hoisted through imports into the tc.mastering namespace. Since these are hidden functions maybe this should be the case, or since powerusers may want easier access to the async functions should they be lifted?