Skip to content

Conversation

@allieychen
Copy link
Contributor

Update the development guide doc.

  • Add IntelliJ IDE setup.
  • Add more details.

@coveralls
Copy link

coveralls commented Feb 27, 2018

Pull Request Test Coverage Report for Build 367

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.335%

Totals Coverage Status
Change from base Build 359: 0.0%
Covered Lines: 3075
Relevant Lines: 3404

💛 - Coveralls

Copy link
Contributor

@arostamianfar arostamianfar left a 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."?

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/)
Copy link
Contributor

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).

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
Copy link
Contributor

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).

Copy link
Contributor Author

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.

@allieychen allieychen changed the title Allieychen guide doc Update the development guide doc Feb 27, 2018
Copy link
Contributor

@arostamianfar arostamianfar left a 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 :)

Visit the
[gcp-variant-transforms repository](https://github.com/googlegenomics/gcp-variant-transforms)
to create your own fork of the repository. See
Visit the
Copy link
Contributor

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.
Copy link
Member

@bashir2 bashir2 left a 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.

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.
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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).

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

```
Then run:
```bash
pylint gcp_variant_transforms
Copy link
Member

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/

Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


Before pushing changes, make sure the pylint checks pass. To install pylint:
```bash
sudo apt-get install pylint
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

@allieychen allieychen Mar 1, 2018

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


#### Setup IntelliJ SDK

1. Choose File | Project Structure on the main menu, and then go to Project.
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

File | Settings | Editor | Inspections.

Code inspections can be run from the Analyze menu. The result window can be
accessed from View > Tool Windows.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you add any comments about code inclusion/exclusion? I have excluded everything other than gcp_variant_transforms (see screenshot) and IIRC this was important to trim the long list of inspection warnings.
project_structure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@allieychen
Copy link
Contributor Author

PTAL :)

Add create project section and details on code inspection.
@allieychen allieychen force-pushed the allieychen-guide-doc branch from 264b7ba to 492f06e Compare March 1, 2018 20:04
@allieychen
Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.


Before pushing changes, make sure the pylint checks pass. To install pylint:
```bash
sudo apt-get install pylint
Copy link
Member

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.

```
Then run:
```bash
pylint gcp_variant_transforms
Copy link
Member

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

Copy link
Member

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.

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:
Copy link
Member

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."

Copy link
Contributor Author

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.
Copy link
Member

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 ...

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see.

@allieychen allieychen force-pushed the allieychen-guide-doc branch from a40b872 to 7dc37b6 Compare March 1, 2018 21:53
@allieychen
Copy link
Contributor Author

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see.

bashir2
bashir2 previously approved these changes Mar 2, 2018
Copy link
Member

@bashir2 bashir2 left a 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.


Before pushing changes, make sure the pylint checks pass. To install pylint:
```bash
.[PATH_TO_VENV]/bin/activate
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

Before pushing changes, make sure the pylint checks pass. To install pylint:
```bash
.[PATH_TO_VENV]/bin/activate
pip install pylint
Copy link
Member

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.

Copy link
Contributor Author

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
@allieychen
Copy link
Contributor Author

Thanks, PTAL :)

Copy link
Contributor

@arostamianfar arostamianfar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@allieychen allieychen merged commit 877eee8 into googlegenomics:master Mar 2, 2018
@allieychen allieychen deleted the allieychen-guide-doc branch March 2, 2018 20:37
nmousavi pushed a commit to nmousavi/gcp-variant-transforms that referenced this pull request Mar 9, 2018
* 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
mhsaul pushed a commit to mhsaul/gcp-variant-transforms that referenced this pull request Mar 29, 2018
Update the development guide doc.

Add IntelliJ IDE setup.
Add more details.
mhsaul pushed a commit to mhsaul/gcp-variant-transforms that referenced this pull request Mar 29, 2018
Update the development guide doc.

Add IntelliJ IDE setup.
Add more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants