Skip to main content

grian-ui - telemetry visualization dashboard

Making Changes & Contributing

This project uses pre-commit, and tox please make sure to install them before making any changes:

cd grian_ui
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install pre-commit tox git-review
pre-commit install --install-hooks

It is a good practice for maintainers to update the hooks to the latest version every few months. this can be done with:

pre-commit autoupdate

and submitting a commit. when updating the hooks it may be necessary to address new issues found. To make ci pass these issues should be fixed in the same commit that makes the change however you should avoid making unrelated fixes in the same patch.

This project uses tox to execute tests, build docs and automate other development task that are not suitable for automation via pre-commit.

Running Tests

This repo currently has 3 type of tests but more may follow

First unit tests can be run with your envs default python like this

``tox -e py3``  or  ``tox -e unit``

it also possible to you a non default python version by specifying a version sufix

tox -e py312

The second type of testing is functional testing. Where as unit tests should be short and test individual functions. Functional tests should avoid mocking code in the plugin but can use fixtures or other fakes/proxy to replace external systems like a fake datasoures that returns static data or emulates an openstack service like keystone.

functional tests can be run in a similar way to unit tests

``tox -e functional`` or ``tox -e functional-py312``

The third type of testing we have today are style/lint checks. there are 3 ways to run these checks first with tox

``tox -e pep8`` or ``tox -e lint``

by convention in openstack we use a pep8 tox env to execute all our style and linting checks not just pep8. in many other communities this is often called lint so we support both.

internally both targets are identical and call pre-commit to run the style checks. So the third way to run the style checks is with pre-commit directly:

``pre-commit run -a``

or if you have the hooks installed they will run automatically when you commit a change. If you ever want to override that behavior you can do:

 #skip all checks
 git commit --no-verify

 or

 # skip a single check
 SKIP=hacking git commit

.. NOTE::

   unit, functional and style checks are enforced by our zuul
   CI system so if they don't pass your code cant merge.
   CI just run the tox command the same as you can do locally
   so its encouraged to run them locally first.

DOCS

docs are built via tox envs that wrap a tool called sphinx. At present we have two types of docs, general docs are stored in the doc folder and release notes that are generated by the reno tool are stored in the releasenotes directory. As can be seen form this README we use a format called reStructuredText to write all our docs.

The main docs can be built with either tox -e docs or tox -e pdf-docs depending on the desired format. Note that to be able to build PDF docs in particular you may need to install binary depencies on your system. These can be found in bindep.txt in the doc and pdf-docs profiles.

The second type of docs we have are the release notes. New release-notes can be added by executing tox -e venv -- reno new your-note-name-here and built with tox -e releasenotes

Running Grian-UI for development

Work in progress.

This will evolve overtime but as of this moment its possible to run Grian-UI in horizon by running tox -e runserver. This can also be done manually via tox -e venv -- ./manage.py runserver

For this to be useful you will need to have openstack which can be deployed with devstack or any other tool. A sample local.conf <devstack/local.conf-all-in-one> is provided in the devstack plugin.

This local.conf expect the following file at /opt/stack/prometheus.yml

global:
  scrape_interval: 10s
scrape_configs:
  - job_name: "node"
    static_configs:
      - targets: ["localhost:3000"]

if you are running devstack on a remote vm you can forward the development server endpoint locally using the following command

ssh -N -L 8000:localhost:8000 <user@host>

This will create an ssh session and forward localhost:8000 on the remote system to localhost:8000 on your local system. -N prevents allocating a shell for the ssh session while not required it recommended to use a dedicated ssh command to forward ports.

Metadata

Release files for grian-ui 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grian-ui 0.1.0
File Size Uploaded Provenance
grian_ui-0.1.0.tar.gz 36.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for grian-ui 0.1.0
File Interpreter ABI Platform
grian_ui-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 59.5 kB

Release files / grian_ui-0.1.0.tar.gz

Download URL grian_ui-0.1.0.tar.gz
Size 36.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cf49745a547bfc29f3482bd1f8fbbee2d81cce3f1abdf76eff45d8c96de595ec
BLAKE2b-256 checksum
How to use checksums
9603281d6d2c0ece682ee07c8172ab96061ad2ed2f6993cb0d4b7d5b1ba55697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / grian_ui-0.1.0-py3-none-any.whl

Download URL grian_ui-0.1.0-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee85004149fe1e077cc099824a91a63de8672f94531183f9ec362c7c6dfa4d9b
BLAKE2b-256 checksum
How to use checksums
6683c4282de9fea57c8ff9cdfb36c4325e1103485e938bb86e59d9c172caf2f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Security for grian-ui 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page