Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-1308: Fix Metron Documentation #836

Closed
wants to merge 5 commits into from

Conversation

JonZeolla
Copy link
Member

Contributor Comments

More documentation fixes - work in progress but looking to get a review of some findings (see comments)

Pull Request Checklist

Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.

In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:

For all changes:

  • Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
  • Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
  • Has your PR been rebased against the latest commit within the target branch (typically master)?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via site-book/target/site/index.html:

    cd site-book
    mvn site
    

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

Copy link
Member Author

@JonZeolla JonZeolla left a comment

Choose a reason for hiding this comment

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

Comments

@@ -257,7 +258,7 @@ In the core language functions, we support basic functional programming primitiv
* Description: Adds an element to the bloom filter passed in
* Input:
* bloom - The bloom filter
* value* - The values to add
* value\*? - The values to add
Copy link
Member Author

Choose a reason for hiding this comment

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

Why does this have an *?

Copy link
Member

Choose a reason for hiding this comment

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

It's a repetition symbol, so it implies you can have any number of values.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, I get your intent now. It was being suppressed before because it wasn't escaped, I will try to make it more obvious.

@@ -748,7 +728,7 @@ In the core language functions, we support basic functional programming primitiv
### `MULTISET_INIT`
* Description: Creates an empty multiset, which is a map associating objects to their instance counts.
* Input:
* input? - An initialization of the multiset
* input?? - An initialization of the multiset
Copy link
Member Author

Choose a reason for hiding this comment

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

Why does this have a ??

Copy link
Member

Choose a reason for hiding this comment

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

? implies it may be included or not, like regex

Copy link
Member Author

Choose a reason for hiding this comment

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

Gotcha, okay. I think I would prefer something like (optional), what do you think?

@@ -849,7 +829,7 @@ In the core language functions, we support basic functional programming primitiv
### `SET_INIT`
* Description: Creates an new set
* Input:
* input? - An initialization of the set
* input?? - An initialization of the set
Copy link
Member Author

Choose a reason for hiding this comment

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

Why does this have a ??

@@ -1034,15 +1035,15 @@ In the core language functions, we support basic functional programming primitiv
See [python](https://docs.python.org/3/library/functions.html#zip)
and [wikipedia](https://en.wikipedia.org/wiki/Convolution_(computer_science)) for more context.
* Input:
* list* - Lists to zip.
* list\*? - Lists to zip.
Copy link
Member Author

Choose a reason for hiding this comment

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

Why does this have an *?

* Returns: The zip of the lists. The returned list is the min size of all the lists. e.g. `ZIP( [ 1, 2 ], [ 3, 4, 5] ) == [ [1, 3], [2, 4] ]`

### `ZIP_LONGEST`
* Description: Zips lists into a single list where the ith element is an list containing the ith items from the constituent lists.
See [python](https://docs.python.org/3/library/itertools.html#itertools.zip_longest)
and [wikipedia](https://en.wikipedia.org/wiki/Convolution_(computer_science)) for more context.
* Input:
* list* - Lists to zip.
* list\*? - Lists to zip.
Copy link
Member Author

Choose a reason for hiding this comment

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

Why does this have an *?

@cestella
Copy link
Member

cestella commented Nov 8, 2017

So, answering your questions en-masse we use the following similar to how they exist in regex:

  • * - 0 or n instances
  • ? - 0 or 1 instance
  • + - 1 or n instances

In retrospect, this may not be as obvious as it seemed at the time. Think we need a key that indicates this? ;)

@JonZeolla
Copy link
Member Author

I think I'm more of a fan of being explicit than providing a key, given this only happens a few times through the whole doc. Also, like I mentioned, the *s are being suppressed, so they're not actually in either form of the documentation (here and here) which we've seen bite us numerous times in the past in our docs.

@JonZeolla
Copy link
Member Author

I just took a stab at an update, @cestella can you take a look when you get a second

@JonZeolla JonZeolla changed the title DO NOT MERGE METRON-1308: Fix Metron Documentation METRON-1308: Fix Metron Documentation Nov 17, 2017
@JonZeolla
Copy link
Member Author

JonZeolla commented Nov 17, 2017

Since we have a release coming up, I won't have time to do any additional documentation review past what I've already done, so I'm game to merge this in as it currently sits. @cestella have you had a chance to review?

@JonZeolla
Copy link
Member Author

@cestella I know you were out recently, just wanted to bring this one to the top of your inbox. Would like to have this in the upcoming release, but also want to get your input.

@nickwallen
Copy link
Contributor

+1 I like this @JonZeolla. This reads more clearly IMHO.

@JonZeolla
Copy link
Member Author

Merged master, ran tests successfully, built site-books and did some clicking around. Going to merge.

@asfgit asfgit closed this in 2521422 Dec 5, 2017
iraghumitra pushed a commit to iraghumitra/incubator-metron that referenced this pull request Feb 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants