From 578d4dc9962d15149a579cfe5658b15cfdce28a1 Mon Sep 17 00:00:00 2001 From: d45 <3d.hagen@gmail.com> Date: Wed, 25 Apr 2018 13:58:54 -0700 Subject: [PATCH 1/3] Updating dev guide with gh-pages info for docs --- _layouts/docs.html | 2 +- docs/dev-guide.md | 37 +++++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/_layouts/docs.html b/_layouts/docs.html index 5355f63df..d40bafbdf 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -17,7 +17,7 @@

{{ page.title }}

- Edit this page + Edit this page   Submit an issue
diff --git a/docs/dev-guide.md b/docs/dev-guide.md index 8b47609ce..a9765651b 100644 --- a/docs/dev-guide.md +++ b/docs/dev-guide.md @@ -8,8 +8,15 @@ This topic describes how to contribute to the Tableau Server Client (Python) pro * TOC {:toc} +--- + ## Submit your first patch + +This section will get you started with the basic workflow, describing how to create your own fork of the repository and how to open a pull request (PR) to add your contributions to the **development** branch. + +### Get the source code and set up your branch + 1. Make sure you have [signed the CLA](http://tableau.github.io/#contributor-license-agreement-cla) 1. Fork the repository. @@ -36,45 +43,47 @@ This topic describes how to contribute to the Tableau Server Client (Python) pro git checkout -b 13-feature-new-stuff ``` -1. Code and commit! +### Code and commit - Here's a quick checklist for ensuring a good pull request: + Here's a quick checklist to follow when coding to ensure a good pull request (PR): - - Only touch the minimal amount of files possible while still accomplishing the goal. + - Only touch the fewest number of files possible while still accomplishing the goal. - Ensure all indentation is done as 4-spaces and your editor is set to unix line endings. - The code matches PEP8 style guides. If you cloned the repo you can run `pycodestyle .` - Keep commit messages clean and descriptive. If the PR is accepted it will get 'Squashed' into a single commit before merging, the commit messages will be used to generate the Merge commit message. -1. Add tests. +### Add tests All of our tests live under the `test/` folder in the repository. - We use `unittest` and the built-in test runner `python setup.py test`. - If a test needs a static file, like a twb/twbx, it should live under `test/assets/` + We use `pytest` and the built-in test runner `python setup.py test`. + If a test needs a static file, like a .twb/.twbx, it should live under `test/assets/` -1. Update the documentation. - - Our documentation is written in markdown and built with Jekyll on Github Pages. All of the documentation source files can be found in `docs/docs`. +### Update the documentation When adding a new feature or improving existing functionality we may ask that you update the documentation along with your code. - If you are just making a PR for documentation updates (adding new docs, fixing typos, improving wording) the easiest method is to use the built in `Edit this file` in the Github UI + Our documentation is written in markdown and built with Jekyll on GitHub Pages. All of the documentation source files can be found in `/docs` folder in the **gh-pages** branch. The docs are hosted on the following URL: [https://tableau.github.io/server-client-python](https://tableau.github.io/server-client-python) + + If you are just making documentation updates (adding new docs, fixing typos, improving wording) the easiest method is to use the built-in `Edit this file` feature right in GitHub (click the pencil icon). If you are viewing one of the pages on [https://tableau.github.io/server-client-python](https://tableau.github.io/server-client-python), clicking the **Edit this page** link at the top of the page will take you to the same place. -1. Submit to your fork. +### Commit changes to your fork and open a PR -1. Make a PR as described [here](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) against the 'development' branch. +1. Make a PR as described [here](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) against the **development** branch for code changes, or against **gh-pages** for documentation updates. 1. Wait for a review and address any feedback. While we try and stay on top of all issues and PRs it might take a few days for someone to respond. Politely pinging the PR after a few days with no response is OK, we'll try and respond with a timeline as soon as we are able. -1. That's it! When the PR has received :rocket:'s from members of the core team they will merge the PR +1. That's it! When the PR has received ![](https://assets-cdn.github.com/images/icons/emoji/unicode/1f680.png){:height="5%" width="5%"} (:rocket:'s) from members of the core team they will merge the PR + +--- ## Add new features 1. Create an endpoint class for the new feature, following the structure of the other endpoints. Each endpoint usually - has `get`, `post`, `update`, and `delete` operations that require making the url, creating the XML request if necesssary, + has `get`, `post`, `update`, and `delete` operations that require making the url, creating the XML request if necessary, sending the request, and creating the target item object based on the server response. 1. Create an item class for the new feature, following the structure of the other item classes. Each item has properties From 81ec64779aa35cbb51ea0d2bc3e54a9348052a61 Mon Sep 17 00:00:00 2001 From: d45 <3d.hagen@gmail.com> Date: Wed, 25 Apr 2018 15:08:31 -0700 Subject: [PATCH 2/3] Moving the Dev Guide up in the TOC pane --- _includes/docs_menu.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/_includes/docs_menu.html b/_includes/docs_menu.html index 104a1f5b3..2f5ab1b04 100644 --- a/_includes/docs_menu.html +++ b/_includes/docs_menu.html @@ -22,6 +22,9 @@
  • Samples
  • +
  • + Developer Guide +
  • API Reference
  • -
  • - Developer Guide -
  • From 47d87f0194fe4c0c8fd492bec20f9ca28de14ceb Mon Sep 17 00:00:00 2001 From: Dave Hagen Date: Wed, 25 Apr 2018 17:03:28 -0700 Subject: [PATCH 3/3] Update dev-guide.md Added Tyler's correction for pycodestyle. --- docs/dev-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev-guide.md b/docs/dev-guide.md index a9765651b..3a51e86c6 100644 --- a/docs/dev-guide.md +++ b/docs/dev-guide.md @@ -49,7 +49,7 @@ This section will get you started with the basic workflow, describing how to cre - Only touch the fewest number of files possible while still accomplishing the goal. - Ensure all indentation is done as 4-spaces and your editor is set to unix line endings. - - The code matches PEP8 style guides. If you cloned the repo you can run `pycodestyle .` + - The code matches PEP8 style guides. If you cloned the repo you can run `pycodestyle server-client-python test samples` - Keep commit messages clean and descriptive. If the PR is accepted it will get 'Squashed' into a single commit before merging, the commit messages will be used to generate the Merge commit message.