# ckanext-metrics_dashboard
[](https://github.com/GSA/ckanext-metrics_dashboard/actions/workflows/publish.yml) [](https://badge.fury.io/py/ckanext-metrics_dashboard)
A CKAN extension to display metrics about harvest sources.
## Features
${CKAN_URL}/report/metrics_dashboard
Displays a summary report of number of datasets and harvest sources for each organization
${CKAN_URL}/report/metrics_dashboard/{org}
Displays a detailed report of each harvest source in an organization, where org is the ID of your organization
CSV Export: A comprehensive table of all harvest sources
JSON Export: CSV raw data plus a second key table_data_by_org that includes the same data grouped by organization
This extension is compatible with these versions of CKAN.
CKAN version | Compatibility ———— | ————- <=2.8 | ??? 2.9 | yes (with ckanext-datagovtheme==0.1.*) 2.10 | yes (with ckanext-datagovtheme>=0.2.1)
## Usage
### Requirements
These extensions are required for metrics_dashboard:
[ckanext-report](https://github.com/ckan/ckanext-report/)
## Development
### Requirements
GNU Make
Docker Compose
### Setup
Build the docker containers. You’ll want to do this anytime the dependencies change (requirements.txt, dev-requirements.txt).
$ make build
Start the containers.
$ make up
CKAN will start at [localhost:5000](http://localhost:5000).
Start the containers, but don’t start ckan. More debugging instructions [here](#Debugging)
$ make debug
Open a shell to run commands in the container.
$ docker-compose exec app bash
If you’re unfamiliar with docker-compose, see our [cheatsheet](https://github.com/GSA/datagov-deploy/wiki/Docker-Best-Practices#cheatsheet) and the [official docs](https://docs.docker.com/compose/reference/).
Clean the containers and remove the data.
$ make clean
For additional make targets, see the help.
$ make help
### Testing
They follow the guidelines for [testing CKAN extensions](https://docs.ckan.org/en/2.8/extensions/testing-extensions.html#testing-extensions).
To run the extension tests:
$ make test
Lint your code.
$ make lint
### Debugging
We have not determined a good way for most IDE native debugging, however you can use the built in Python pdb debugger. Simply run make debug, which will run docker with an interactive shell. Add import pdb; pdb.set_trace() anywhere you want to start debugging, and if the code is triggered you should see a command prompt waiting in the shell. Use a pdb cheat sheet when starting to learn like this.
When you edit/add/remove code, the server is smart enough to restart. If you are editing logic that is not part of the webserver (ckan command, etc) then you should be able to run the command after edits and get the same debugger prompt.
Launch the containers with make debug
Start the CKAN process by running ./start_ckan_development.sh
Add import ibdb; ipdb.set_trace() at the point you wish to debug.
Invoke that code to hit that breakpoint.
Metadata
Release files for ckanext-metrics-dashboard 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ckanext-metrics_dashboard-0.1.7.tar.gz | 10.3 kB | Without provenance | Details for ckanext-metrics_dashboard-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ckanext_metrics_dashboard-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for ckanext_metrics_dashboard-0.1.7-py3-none-any.whl |
Total release size: 21.4 kB
Release files / ckanext-metrics_dashboard-0.1.7.tar.gz
| Download URL | ckanext-metrics_dashboard-0.1.7.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a249da598d7d20ba628565c3cd8ec09d737594814014ebca5d83869fd429b492
|
|
BLAKE2b-256 checksum How to use checksums |
33b9092dc563d7b98042b90446eb4c775447f8d0d06290719ee32fa9514d8569
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / ckanext_metrics_dashboard-0.1.7-py3-none-any.whl
| Download URL | ckanext_metrics_dashboard-0.1.7-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a81bb847327cd362c8e7bc760dceae068dde52b670ded4569396357e79064a20
|
|
BLAKE2b-256 checksum How to use checksums |
80e8d17c4f3993a9ee307d517dc42b212f4ba2381157e60eee98bad76d37d03b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for ckanext-metrics-dashboard 0.1.7
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.