Skip to content

Commit

Permalink
Merge pull request #1350 from opendatacube/db-relation
Browse files Browse the repository at this point in the history
add db relationship diagram to doc
  • Loading branch information
omad committed Nov 24, 2022
2 parents 54491c4 + 30a258a commit 1f505d6
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 1 deletion.
18 changes: 17 additions & 1 deletion CONTRIBUTING.md
@@ -1,6 +1,6 @@
# Contributing

Firstly, thank you for contributing! We are very grateful for your assistance in improving the Open Data Cube.
Firstly, thank you for contributing! We are very grateful for your assistance in improving the Open Data Cube.

When contributing to this repository, please first discuss the change you wish to make via an issue,
Slack, or any other method with the owners of this repository before proposing a change.
Expand All @@ -11,6 +11,22 @@ We have a [code of conduct](code-of-conduct.md), so please follow it in all your

When you create a Pull Request, there is a template defined that has required information. Please complete this template to ensure that we can review the PR easily.

### Updating database table diagrams

##### Run SchemaSpy to generate database table diagrams

**Using Docker**
```
docker run -it --rm -v "$PWD:/output" --network="host" schemaspy/schemaspy -u dra547 -host localhost -port 15432 -db datacube -t pgsql -schemas agdc,cubedash -norows -noviews -pfp -imageformat svg
```

**If SchemaSpy is downloaded Locally**
```
java -jar schemaspy-6.1.0.jar -o . -u dra547 -host localhost -port 15432 -db datacube -t pgsql -dp postgresql-42.5.0.jar -s agdc -norows -noviews
```

Grab the relationship diagram from ./diagrams/summary/relationships.real.large.svg

## Enhancement proposals

We have a [Steering Council](https://github.com/opendatacube/datacube-core/wiki/steering-council) who discuss
Expand Down
13 changes: 13 additions & 0 deletions docs/about-core-concepts/architecture-guide.rst
Expand Up @@ -26,3 +26,16 @@ components that make up an implementation, as well as the ecosystem around it.
.. _`SpatioTemporal Asset Catalog`: https://stacspec.org/
.. _`Sentinel-2 Indexing notes`: https://github.com/opendatacube/datacube-dataset-config/blob/master/sentinel-2-l2a-cogs.md
.. _`Datacube Explorer`: https://github.com/opendatacube/datacube-explorer


Database Diagram
----------------

.. figure:: ../diagrams/db-relationship-diagram.svg
:target: /_images/db-relationship-diagram.svg

Current database relationship diagram

.. note::

To update the diagram please refer to instruction in CONTRIBUTE.md
1 change: 1 addition & 0 deletions docs/about/whats_new.rst
Expand Up @@ -9,6 +9,7 @@ v1.8.next
=========

- Add `grid_spec` to `list_products` (:pull:`1357`)
- Add database relationship diagram to doc (:pull:`1350`)

v1.8.9 (17 November 2022)
=========================
Expand Down

0 comments on commit 1f505d6

Please sign in to comment.