Skip to content
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

Document the event and alert type hierarchy #2297

Merged
merged 6 commits into from
Sep 9, 2021

Conversation

lunkwill42
Copy link
Member

The only complete "documentation" of NAV's event and alert type hierarchy exists in the SQL schema definitions (and this once-generated Wiki page ).

This information needs to be out there in the Sphinx-based user documentation, as part of the reference material. The simplest way to get it there is to just generate this documentation source text as necessary, when the event and alert type hierarchy changes (which is a rare event).

This PR sets out to do that.

A more viable solution for the future might be to actually define the hierarchy as Python code and use that to both seed the initial SQL database and to generate documentation. Why? Because the generator introduced in this PR needs access to an operational PostgreSQL database with the NAV schema - which usually requires a fully integrated NAV environment.

Because:
- The event/alert hierarchy is only defined in the database, but the
  initial schema-defining SQL scripts.
- To get this information into human-redable Sphinx docs, the best
  strategy seems to be extracting the data from a running database and
  generate a reStructured Text document for Sphinx to consume when
  building the docs.
Because:
- It's easier to run the generator from a working dev environment, such
  as inside a docker container, than it is to use tox to set up a full
  integration environment just to extract data from the database.
@lunkwill42 lunkwill42 added the documentation Related to documentation of NAV label Sep 8, 2021
@lunkwill42 lunkwill42 added this to the 5.2.0 milestone Sep 8, 2021
@lunkwill42 lunkwill42 requested a review from hmpf September 8, 2021 10:14
@lunkwill42 lunkwill42 self-assigned this Sep 8, 2021
@github-actions
Copy link

github-actions bot commented Sep 8, 2021

Test results

       6 files         6 suites   7m 52s ⏱️
2 789 tests 2 693 ✔️   96 💤 0 ❌
5 578 runs  5 386 ✔️ 192 💤 0 ❌

Results for commit f20317f.

@lunkwill42 lunkwill42 merged commit b9a97e1 into Uninett:master Sep 9, 2021
@lunkwill42 lunkwill42 deleted the doc/event-and-alert-hierarchy branch September 9, 2021 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation of NAV
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants