New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial documentation for TSC #98
Conversation
Few quick notes before I dive into the text details:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Lots of minor comments, I don't think any are necessarily blocking, but please consider them all. Especially some comments I have around what's really necessary to document and some things that are kinda mis-truths
<div class="content .col-xs-12 .col-sm-8 .col-md-9"> | ||
<h1>{{ page.title }}</h1> | ||
<div class="edit-container"> | ||
<a href="https://github.com/tableau/server-client-python/edit/master/docs/docs/{{ page.path }}" class="edit-links"><span class="glyphicon glyphicon-pencil"></span> Edit this page</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it docs/docs/ {{path}} I think in document-api it's just docs/{{path}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Copypasta problem :) Should be fixed.
--- | ||
|
||
<div class="alert alert-info"> | ||
<b>Important:</b> More coming soon! This section is under active construction and might not reflect all the available functionality of the TSC library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the TSC library
?? Maybe or. I think in :)
|
||
### Create Site | ||
|
||
Creates a new site for the given site item object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big meta-question: Do we want to call them Item Objects, or just Objects? I vote latter. I know we call them SiteItem in the API but item object
sounds redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll follow up with you all on this post-TC. I expect I'll be reworking all the API ref stuff.
Gets all the sites on the server. | ||
|
||
```py | ||
Sites.get() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite, get's 100 sites by default, or up to 1000 sites at a time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Good call--I've added in that you need to use the pager.
Example: | ||
|
||
```py | ||
new_project = TSC.ProjectItem(name='Test Project', description='Project created for testing') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not set it when instantiating like name
and description
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled in most of the examples from the test suite in the interest of time--I expect I'll be rewriting more cogent examples afterward. :(
|
||
* `create_group.py`. Create a user group. | ||
|
||
* `create_schedules.py`. Create scheduled extract refresh tasks and subscription tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates schedules, not tasks (currently)
|
||
* `create_schedules.py`. Create scheduled extract refresh tasks and subscription tasks. | ||
|
||
* `explore_datasource.py`. Queries all datasources, selects a datasource, populates connections for the datasource, then updates the datasource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actualllllly, no, doesn't get them all, doesn't use Pager
|
||
* `explore_datasource.py`. Queries all datasources, selects a datasource, populates connections for the datasource, then updates the datasource. | ||
|
||
* `explore_workbook.py`. Queries all workbooks, selects a workbook, populates the connections and views for a workbook, then updates the workbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
|
||
This code does the following things: | ||
|
||
* Creates an authentication object that stores your user name and password. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honest question: Does anyone care that it does all these things?
sign_in signs you in, sign_out signs you out.
You might want to note that it's a normal session, so it's got a time limit (2 hours, 4 hours, I forget)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Added a note about session length and cut the details.
|
||
server = TSC.Server('http://SERVER_URL') | ||
|
||
print(server.version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's always 2.3 by default, unless you change it to 2.4.
We don't auto detect or anything like that, so running code to discover this feels unnecessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to leave this in. Yes, it's hardcoded to 2.3 right now, but how would you know that if you ran pip install? You'd have to look at the source or run this command. This will be more useful when we have multiple releases as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how you installed the library matters, this is about the Server API version not the library's version.
I just filed #99 that would make this example useful, it's fine to leave it in, but I think you should also just have the note for now that it defaults to 2.3?
@RussTheAerialist Tyler mentioned that pushing direct to master caused some problems earlier? Any concerns I should now about? |
It's better to do it against development, but since we just took development into master, I think right now the two branches are effectively the same, so if we get this checked in before EOD Friday, I can just pull this into development immediately. it's only a hassle when development has a bunch of changes in it that aren't in master |
@RussTheAerialist Thanks for the explanation. I'll keep that in mind next time for sure. |
* First cut at API docs * Update jquery version for bootstrap compatibility * Incorporate review feedback * Add pagination docs * Add dev guide * Add docs for populating views and connections * Continue adding to api ref * Edits for existing content * Update readme to point to docs * Incorporate edits from PR
No description provided.