Conversation
Move over content from https://github.com/batfish/batfish/wiki/Developer-notes
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9186 +/- ##
==========================================
- Coverage 72.72% 72.70% -0.02%
==========================================
Files 3313 3313
Lines 169946 169930 -16
Branches 20018 20039 +21
==========================================
- Hits 123586 123551 -35
- Misses 37197 37210 +13
- Partials 9163 9169 +6 |
dhalperi
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @arifogel and @ratulm)
docs/question_development/README.md line 5 at r1 (raw file):
The high-level architecture of questions is as follows. What is called via pybtafish (bf.q.<foo>) is a JSON template. See example templates inside the subfolders of [questions in the Batfish repository](https://github.com/batfish/batfish/tree/master/questions).
Suggestion:
pybatfish docs/question_development/README.md line 5 at r1 (raw file):
The high-level architecture of questions is as follows. What is called via pybtafish (bf.q.<foo>) is a JSON template. See example templates inside the subfolders of [questions in the Batfish repository](https://github.com/batfish/batfish/tree/master/questions).
Suggestion:
`bf.q.<foo>`docs/question_development/README.md line 11 at r1 (raw file):
### Adding a new Java question See an existing question (e.g., `CompareFiltersQuestionPlugin`) for the various classes that are needed, as well as the structure of each class and their relationships among one another.
consider adding a link to the question module
docs/question_development/README.md line 13 at r1 (raw file):
See an existing question (e.g., `CompareFiltersQuestionPlugin`) for the various classes that are needed, as well as the structure of each class and their relationships among one another. Small but important note: the getName() method in your subclass of Question must return a String that is all lowercase. Otherwise clients will not be able to find your question when looking for it on the classpath.
and code font throughout?
Suggestion:
`getName()` docs/question_development/README.md line 13 at r1 (raw file):
See an existing question (e.g., `CompareFiltersQuestionPlugin`) for the various classes that are needed, as well as the structure of each class and their relationships among one another. Small but important note: the getName() method in your subclass of Question must return a String that is all lowercase. Otherwise clients will not be able to find your question when looking for it on the classpath.
do you know more about this? A bunch that I spot checked don't have names that are all lowercase. https://github.com/batfish/batfish/blob/master/projects/question/src/main/java/org/batfish/question/initialization/FileParseStatusQuestion.java#L14
Code quote:
ust return a String that is all lowercasedocs/question_development/README.md line 17 at r1 (raw file):
### Adding a new template Follow examples in the existing templates.
consider adding a link direct into the templates folder.
ratulm
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @arifogel and @dhalperi)
docs/question_development/README.md line 5 at r1 (raw file):
The high-level architecture of questions is as follows. What is called via pybtafish (bf.q.<foo>) is a JSON template. See example templates inside the subfolders of [questions in the Batfish repository](https://github.com/batfish/batfish/tree/master/questions).
done
dhalperi
left a comment
There was a problem hiding this comment.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @arifogel and @ratulm)
docs/question_development/README.md line 11 at r2 (raw file):
See existing questions (e.g., [CompareFilters](https://github.com/batfish/batfish/tree/master/projects/question/src/main/java/org/batfish/question/comparefilters)) for example of how to extend these classes. NB: the `getName()` method in your subclass of Question must return a String that is unique across all questions. Batfish finds questions using this name. The names are case-insensitive (so, `FooBar` is the same name as `fooBar` and `foobar`).
I bet pybatfish generated names are sourced from it, too.
So fileParseStatus -> bf.q.fileParseStatus.
If you can confirm, consider updating again :p. Sorry.
Code quote:
Batfish finds questions using this name
ratulm
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @arifogel and @dhalperi)
docs/question_development/README.md line 11 at r2 (raw file):
Previously, dhalperi (Dan Halperin) wrote…
I bet
pybatfishgenerated names are sourced from it, too.So
fileParseStatus->bf.q.fileParseStatus.If you can confirm, consider updating again :p. Sorry.
Updated with my understanding.
dhalperi
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @arifogel)
Move over content from https://github.com/batfish/batfish/wiki/Developer-notes. Something is better than nothing.