-
Notifications
You must be signed in to change notification settings - Fork 59
Update the development guide doc #124
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
Update the development guide doc #124
Conversation
Pull Request Test Coverage Report for Build 367
💛 - Coveralls |
arostamianfar
left a comment
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.
Thanks, Allie! Added a few comments. I'm excited to try it out on my own machine when I get back :)
Also, could you please edit the title of the pull request to something like "Update the development guide doc."?
docs/development_guide.md
Outdated
| to create your own fork of the repository. See | ||
| [https://guides.github.com/activities/forking/](https://guides.github.com/activities/forking/) | ||
| for more information. | ||
| Visit the [gcp-variant-transforms repository](https://github.com/googlegenomics/gcp-variant-transforms) to create your own fork of the repository. See [https://guides.github.com/activities/forking/](https://guides.github.com/activities/forking/) |
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.
Please keep each line <80 chars. Links that are longer than 80chars should be in separate lines.
There is a google style guide on .md docs somewhere as well (i'll ping you when I've found it).
docs/development_guide.md
Outdated
| If you want to pull in changes from the target branch (i.e. googlegenomic:master), | ||
| run: | ||
| To update the forked repository, you may follow instructions on [syncing a fork](https://help.github.com/articles/syncing-a-fork/), or simply set upstream to the main repository and do: | ||
| ```bash |
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.
Do you need this section? This is the same as the instructions below except it doesn't have --rebase (and I think we needed to always pull with rebase for things to work smoothly).
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 am thinking there are two scenarios.
Before checking out a new branch from the forked master branch, we would like to keep the forked master branch to be synced with the remote master branch, so that the commits from other people will apply. In that case, we update the forked master repository.
The second portion is after we made changes to local branch, we pull in the latest commits, then replay our local changes.
But you are right, the second portion is sufficient for the sync. I will remove this part.
Keep each line <=80 chars.
arostamianfar
left a comment
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.
Thanks! Looks good! I'll let Bashir comment on the IntelliJ setup :)
docs/development_guide.md
Outdated
| Visit the | ||
| [gcp-variant-transforms repository](https://github.com/googlegenomics/gcp-variant-transforms) | ||
| to create your own fork of the repository. See | ||
| Visit the |
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.
nit: please remove trailing space from here and elsewhere.
1. Remove trailing whitespace. 2. Add newline before and after headings.
Remove one more trailing whitespace.
bashir2
left a comment
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.
Thanks for documenting how to use IntelliJ.
docs/development_guide.md
Outdated
| environment, and specify the location of the new virtual environment. Note that | ||
| the folder where the new virtual environment should be located must be empty! | ||
| For the Base interpreter, add the python path | ||
| gcp-variant-transforms/venv/bin/python under the created virtualenv. |
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 put my venv under gcp-variant-transforms but I think some people don't (@arostamianfar do you do this?). So maybe replace "gcp-variant-transforms" with [PATH_TO_VENV] and mention that this 'venv' directory is what we created in "Setup virtualenv" above.
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.
Done.
|
|
||
| To comply with pylint coding style, you may change the default line length in | ||
| File | Settings | Editor | Code Style. Set the hard wrap at 80 columns and | ||
| check Wrap on typing. Further, go to Python in the dropdown list, you can |
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 have not done this, how annoying is it when you want to have a line over 80? (e.g., some of our "# pylint" comments for imports are like this).
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 am not aware of a better solution other than manually adjust the line <= 80 without setting this. I would say it would be more annoying without it since it happens more often than the other case.
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.
Agreed.
docs/development_guide.md
Outdated
| ``` | ||
| Then run: | ||
| ```bash | ||
| pylint gcp_variant_transforms |
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.
Hmm, I think you should use the .pylintrc file that is checked into the git repo not the default RC file. I usually run pylint --rcfile=.pylintrc gcp_variant_transforms/
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.
Sorry, I tried both and it seems that they are doing the same checking. Does it mean that the default file is .pylintrc?
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
docs/development_guide.md
Outdated
|
|
||
| Before pushing changes, make sure the pylint checks pass. To install pylint: | ||
| ```bash | ||
| sudo apt-get install pylint |
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.
Did you successfully use the pylint that comes with your linux distribution? I had problems with mine originally (Trusty at the time) and I tried again on Rodete but it gives me a lot of warnings (it is an older version). I use a local pylint in my venv: pip install --upgrade pylint
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.
Yes. I tried pip install --upgrade pylint in the first place and somehow it did not work.
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.
So please update as we discussed.
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.
Done.
| To commit and push those changes to your branch. | ||
|
|
||
| ### Syncing your branch | ||
|
|
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.
Are these blank lines needed? If not, consider removing them here and elsewhere.
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 referred to g3doc style guide, and it suggests newlines before and after the heading. If we do differently, I can remove it.
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.
Oh, I see, then maybe consider updating it for every section in this doc.
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.
Done.
docs/development_guide.md
Outdated
|
|
||
| #### Setup IntelliJ SDK | ||
|
|
||
| 1. Choose File | Project Structure on the main menu, and then go to Project. |
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.
Please add an initial step on how the project is created. IIRC, the project could have been created in the default location but then there was somewhere that sources were being set, correct?
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.
Done. Thanks.
docs/development_guide.md
Outdated
| File | Settings | Editor | Inspections. | ||
|
|
||
| Code inspections can be run from the Analyze menu. The result window can be | ||
| accessed from View > Tool Windows. |
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.
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.
Done.
|
PTAL :) |
Add create project section and details on code inspection.
264b7ba to
492f06e
Compare
|
I edited the --amend part. |
|
|
||
| To comply with pylint coding style, you may change the default line length in | ||
| File | Settings | Editor | Code Style. Set the hard wrap at 80 columns and | ||
| check Wrap on typing. Further, go to Python in the dropdown list, you can |
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.
Agreed.
docs/development_guide.md
Outdated
|
|
||
| Before pushing changes, make sure the pylint checks pass. To install pylint: | ||
| ```bash | ||
| sudo apt-get install pylint |
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.
So please update as we discussed.
docs/development_guide.md
Outdated
| ``` | ||
| Then run: | ||
| ```bash | ||
| pylint gcp_variant_transforms |
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
| To commit and push those changes to your branch. | ||
|
|
||
| ### Syncing your branch | ||
|
|
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.
Oh, I see, then maybe consider updating it for every section in this doc.
docs/development_guide.md
Outdated
| After making changes, you must again add, commit, and push those changes. | ||
| If you are making changes after a review process, you may create new commits for | ||
| related changes by following the steps stated in "Pushing changes to your fork's | ||
| branch". Otherwise, please run the following: |
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.
Please add a note like: "Prefer to have one commit per each review round such that your reviewers can easily check what you have changed since last 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.
Done.
| #### Create Project | ||
|
|
||
| Choose File | New | Project on the main menu, and create a new Python project | ||
| in the dialog that opens. To setup the Project SDK, follow the following steps. |
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.
Please add a step before this which says where Project SDK is, i.e., from File | Project Structure go to the Project sub-menu ...
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.
That is one way to setup the SDK. Also, we can setup it directly in the new project dialog.
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.
Oh, I see.
a40b872 to
7dc37b6
Compare
|
PTAL :) |
| #### Create Project | ||
|
|
||
| Choose File | New | Project on the main menu, and create a new Python project | ||
| in the dialog that opens. To setup the Project SDK, follow the following steps. |
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.
Oh, I see.
bashir2
left a comment
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.
The following comments are minor, please feel free to submit once you have addressed them.
docs/development_guide.md
Outdated
|
|
||
| Before pushing changes, make sure the pylint checks pass. To install pylint: | ||
| ```bash | ||
| .[PATH_TO_VENV]/bin/activate |
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.
You need a space after '.'; also in general I prefer source to using '.', i.e.,
source [PATH_TO_VENV]/bin/activate
as it is more clear what is being done.
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.
Thanks. Done.
docs/development_guide.md
Outdated
| Before pushing changes, make sure the pylint checks pass. To install pylint: | ||
| ```bash | ||
| .[PATH_TO_VENV]/bin/activate | ||
| pip install pylint |
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.
nit: consider adding --upgrade to be consistent with elsewhere.
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.
Done.
1. replace . with source 2. add --upgrade for pylint installation
|
Thanks, PTAL :) |
arostamianfar
left a comment
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.
Thanks!
* Add multiple query support to integration tests googlegenomics#120. update all tests in integration small_tests to support multiple query. update the validate_table in run_tests, add a loop for all test cases in the test file. changed the required keys for the .json file. Remove "validation_query" and "expected_query_result", and add "test_cases". Ran ./deploy_and_run_tests.sh and all integration tests passed. Update the development guide doc (googlegenomics#124) Update the development guide doc. Add IntelliJ IDE setup. Add more details. Added an INFO message for the full command. Tested: Ran manually and checked the new log message. Uses the macros to replace the common queries. (googlegenomics#127) Define NUM_ROWS, SUM_START, SUM_END in QueryFormatter, and replaces them in the query to avoid duplicate code. TESTED: deploy_and_run_tests. Define SchemaDescriptor class. Provides serialization and lookup API for type/mode of schema fields. Tested: unit test
Update the development guide doc. Add IntelliJ IDE setup. Add more details.
Update the development guide doc. Add IntelliJ IDE setup. Add more details.

Update the development guide doc.