-
Notifications
You must be signed in to change notification settings - Fork 11
Update and fill out documentation #13
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
Conversation
docs/configuration.rst
Outdated
|
|
||
| ``coverage_target`` | ||
| A number from 0 - 100 that represents the percentage of Django models in the project that should have annotations. | ||
| The Django Search tool will fail if run with the ``--coverage`` option if the covered percentage is below 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.
Nit: ...will fail when run with...
docs/configuration.rst
Outdated
| choice_annotation: | ||
| ".. annotation_token::": | ||
| ".. annotation_token2::": | ||
| "".. choice_annotation::"": |
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.
Why does this annotation have double quotes?
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.
No idea, will fix.
docs/configuration.rst
Outdated
| free-form text following the annotation itself. At this time the comment must be all on one line to be included | ||
| - Basic, or comment, annotations such as ``annotation_token`` and ``first_group_token`` above, allow for | ||
| free-form text following the annotation itself. Note the colon after the annotation token! In configuration this | ||
| type is a mapping type, mapping to a null value. At this time the comment must be all on one line to be included |
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.
Maybe separate this single-line note into a NOTE: At this time,....?
| in some way. If you do not need this functionality and simply want to find annotations and create a report, the static | ||
| search tool is much easier to configure and can search all of your code (instead of just model docstrings). | ||
|
|
||
| .. important:: |
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.
This important should be bolded/capitalized? It seems strange as it is now.
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.
This is a Sphinx admonition. In the processed docs it will highlight the text and put a border around it: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#rst-directives
docs/django_search.rst
Outdated
| search tool is much easier to configure and can search all of your code (instead of just model docstrings). | ||
|
|
||
| .. important:: | ||
| In order to use the Django tool you must first set the ``DJANGO_SETTINGS_MODULE`` environment variable to point 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.
Nit: To use the Django tool, you must...
docs/django_search.rst
Outdated
| .. code-block:: yaml | ||
| social_django.Association: | ||
| social_django.Code: |
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.
Actually, freshly-created looks like this:
social_django.Association: {}
social_django.Code: {}
docs/django_search.rst
Outdated
| second ``.. no_pii::`` annotation to ``social_django.Association``. | ||
|
|
||
| .. important:: | ||
| Some types of "local" models are procedurally generated and do not have files in code, for instance those created by |
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.
in code, e.g. models created by django-simple-history.
docs/extensions.rst
Outdated
| language searches, even the ones that come by default, are implemented as extensions. A language extension is | ||
| responsible for finding all comments in files of the given type. | ||
| responsible for finding all comments in files of the given type. Note that extensions are only used in the Static Search | ||
| and not in Django search, as Django models are obviously all written in Python. |
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.
Django Search to mirror Static Search?
| ``_add_annotation_group`` - On construction this will be called once for each annotation group that is configured, | ||
| allowing you to do any setup necessary to find these tokens in your search. Note that annotations in a group are | ||
| *not* also sent to ``_add_annotation_token``, though you can do that yourself. | ||
|
|
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.
👍
docs/static_search.rst
Outdated
|
|
||
| Overview | ||
| ======== | ||
| The Static Search Tool, or Static Tool, is written as an extensible way to find annotations in code. It does this by |
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 tool performs static...
pwnage101
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.
You already merged, but better late than never! I should have mentioned it was on my TODO list for today.
| source_path: ../path/to/be/searched/ | ||
| # Path that you wish to static search, can be passed on the command line | ||
| # Directories will be searched recursively, but this can also point to a single file | ||
| source_path: ../ |
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.
should this example use ./ or ../? Julia once copied this verbatim into the edx-notes-api pii config, and so we had to change it to ./ to only search the local source checkout.
|
|
||
| Group members can be be comment or choice types. The only limitation on ordering is that the group member listed first | ||
| in the configuration must also appear first in the comment. | ||
| that all group members are consecutively, though ordering does not matter. |
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.
typo: "consecutive"
Description: Adds documentation for the search tools, cleans up some things which have grown inaccurate.
JIRA: PLAT-2402