-
Notifications
You must be signed in to change notification settings - Fork 311
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
Cleaning up formatting and spacing of docs. #1640
Conversation
Test PASSed. |
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.
Few small nits. Thanks @devin-petersohn!
docs/source/60_building_apps.md
Outdated
.scala source file for each CLI action (e.g. [Transform.scala](https://github.com/bigdatagenomics/adam/blob/master/adam-cli/src/main/scala/org/bdgenomics/adam/cli/Transform.scala) | ||
for the [transform](#transform) action), and a main class ([ADAMMain.scala](https://github.com/bigdatagenomics/adam/blob/master/adam-cli/src/main/scala/org/bdgenomics/adam/cli/ADAMMain.scala)) | ||
.scala source file for each CLI action (e.g. | ||
[Transform.scala](https://github.com/bigdatagenomics/adam/blob/master/adam-cli/src/main/scala/org/bdgenomics/adam/cli/Transform.scala) |
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.
Update to TransformAlignments
.
docs/source/60_building_apps.md
Outdated
The `MyCommandArgs` class defined above is provided in the constructor and | ||
specifies the generic type for `BDGSparkCommand`. The companion object defined | ||
above is declared as a field. For access to an [slf4j](http://www.slf4j.org/) | ||
Logger via the `log` field, specify `with Logging`. |
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.
Suggest:
"...log field, mix in the org.bdgenomics.utils.misc.Logging trait by adding with Logging
to the class definition."
docs/source/60_building_apps.md
Outdated
[slf4j](http://www.slf4j.org/) Logger via the `log` field, specify `with Logging`. | ||
Extend `BDGSparkCommand` class and implement the `run(SparkContext)` method. | ||
The `MyCommandArgs` class defined above is provided in the constructor and | ||
specifies the generic type for `BDGSparkCommand`. The companion object defined |
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.
"specifies the generic type" is weird phrasing.
docs/source/60_building_apps.md
Outdated
Extend `BDGSparkCommand` class and implement the `run(SparkContext)` method. | ||
The `MyCommandArgs` class defined above is provided in the constructor and | ||
specifies the generic type for `BDGSparkCommand`. The companion object defined | ||
above is declared as a field. For access to an [slf4j](http://www.slf4j.org/) |
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.
Can you add docs explaining why we define the companion object? In general, prefer "why" to "what".
@@ -77,7 +83,7 @@ Add the new command to the default list of commands in `ADAMMain`. | |||
|
|||
Build ADAM and run the new command via `adam-submit`. | |||
|
|||
```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.
Please revert deletion of 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.
I deleted the bash
specification here because it caused non-bash text to render with text highlighting. Removing bash
does not affect anything except the incorrectly highlighted text. In the rendered version of this PR, you can see an example of both bash
tagged and not.
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.
Ah, I see. Thanks for the clarification; I thought it was an incidental deletion, but you are right, this should not be bash
formatted.
docs/source/60_building_apps.md
Outdated
@@ -103,15 +109,16 @@ ADAM ACTIONS | |||
$ ./bin/adam-submit myCommand input.foo | |||
``` | |||
|
|||
Then consider making a pull request to include the new command in ADAM! | |||
Then consider making a | |||
[pull request](https://github.com/bigdatagenomics/adam/pulls) to include 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.
Correct link for opening a PR would be https://github.com/bigdatagenomics/adam/compare?expand=1
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.
As an aside, I might add docs asking people to give us a heads up by opening an issue prior to opening a PR.
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 add a section somewhere about contributing to the repo? Should this be a new doc, or does it belong in the into section?
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.
We have a detailed CONTRIBUTING.md with info for people contributing. Just add a heads up that they should float the issue first, because the way we've written it here makes it sound like we'll merge any and all PRs against ADAM. We've tried to bias towards accepting contributions, but we can't accept everything, and we're probably more hesitant to accept CLI additions relative to API additions.
docs/source/60_building_apps.md
Outdated
instead of editing `ADAMMain` to add new commands as above, create a new | ||
object with a `main(args: Array[String])` method that delegates to `ADAMMain` | ||
and provides additional command(s) via its constructor. | ||
To extend the ADAM CLI by adding new commands in an *external* repository, |
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 drop italics; in general, avoid italics
docs/source/60_building_apps.md
Outdated
application to improve performance. | ||
Create an Apache Spark configuration `SparkConf` and use it to create a new | ||
`SparkContext`. The following serialization configuration needs to be present | ||
o register ADAM classes. If any additional |
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.
o
-> to
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.
Couple of small last fixes we should get in. Thanks @devin-petersohn!
docs/source/60_building_apps.md
Outdated
ADAM is packaged so that it can be used interatively via the ADAM shell, called from | ||
the command line interface (CLI), or included as a library when building downstream | ||
applications. | ||
ADAM is packaged so that it can be used interatively via the ADAM shell, called |
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.
interatively
-> interactively
docs/source/60_building_apps.md
Outdated
for the [transform](#transform) action), and a main class ([ADAMMain.scala](https://github.com/bigdatagenomics/adam/blob/master/adam-cli/src/main/scala/org/bdgenomics/adam/cli/ADAMMain.scala)) | ||
.scala source file for each CLI action (e.g. | ||
[TransformAlignments.scala](https://github.com/bigdatagenomics/adam/blob/master/adam-cli/src/main/scala/org/bdgenomics/adam/cli/TransformAlignments.scala) | ||
for the [transform](#transform) action), and a main class |
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.
transform
-> transformAlignments
docs/source/60_building_apps.md
Outdated
Extend `Args4jBase` class to specify arguments to the command. Arguments are defined using | ||
the [args4j library](http://args4j.kohsuke.org/). If reading from or writing to Parquet, | ||
consider including Parquet arguments via `with ParquetArgs`. | ||
Extend `Args4jBase` class to specify arguments to the command. Arguments are |
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.
While we're updating this section, thoughts on making this a numbered list?
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.
Alternatively, numbered list under To add a new command:
and add subsection headings? e.g.,
To add a new command:
1. [Extend Args4jBase to specify arguments](#extend-arguments)
2. [Extend BDGCommandCompanion](#extend-companion)
...
#### Extend Args4jBase to specify arguments {#extend-arguments}
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 the second strategy would be a bit easier to follow.
docs/source/60_building_apps.md
Outdated
to register ADAM classes. If any additional | ||
[Kyro serializers](https://github.com/EsotericSoftware/kryo) need to be | ||
registered, | ||
[create a registrator that delegates to the ADAM registrator](#registrator). |
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.
From a word wrap perspective, you shouldn't need the whole link text to be on a single line, no?
Test FAILed. |
Extend `Args4jBase` class to specify arguments to the command. Arguments are defined using | ||
the [args4j library](http://args4j.kohsuke.org/). If reading from or writing to Parquet, | ||
consider including Parquet arguments via `with ParquetArgs`. | ||
1. [Extend Args4jBase to specify arguments](#extend-arguments) |
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.
How does this look @fnothaft?
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 this looks great, thanks @devin-petersohn!
* Use ADAM as a [library in new applications](#library) | ||
|
||
|
||
## Extend the ADAM CLI by adding new commands {#commands} | ||
|
||
ADAM's CLI is implemented in the adam-cli Apache Maven module of the | ||
[bdgenomics/adam](https://github.com/bigdatagenomics/adam) repository, one | ||
.scala source file for each CLI action (e.g. [Transform.scala](https://github.com/bigdatagenomics/adam/blob/master/adam-cli/src/main/scala/org/bdgenomics/adam/cli/Transform.scala) | ||
for the [transform](#transform) action), and a main class ([ADAMMain.scala](https://github.com/bigdatagenomics/adam/blob/master/adam-cli/src/main/scala/org/bdgenomics/adam/cli/ADAMMain.scala)) | ||
.scala source file for each CLI action (e.g. |
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 thought about rephrasing this a little bit because the flow gets broken by each example. Thoughts?
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 this is fine as is, but if you'd like to make a pass at touching it up, that's a-OK with me.
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.
Let's go with the "if it's not broken, don't fix it" principle here. We can leave as-is.
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.
SGTM!
Thanks for your patience. I have a couple of comments I'd like feedback on. |
Merged! Thanks @devin-petersohn! |
Resolves #1638.
Wrapped lines at 80 if possible, also addressed formatting and spacing issues from rendering of the doc.