OpenCDMS test databases
See data/opencdms/ for the initial shared test database.
Installation guide
This test data is mearnt to be installed into your pyopencdms for development purposes. To install this package add it to the requirements_dev.txt file in the pyopencdms project like so:
requirements_dev.txt
opencdms-test-databases@git+https://github.com/opencdms/opencdms-test-databases.git@main
Prerequisites
To be able to launch the different databases, it requires that you have:
- Docker and docker-compose installed in your machine.
- Service ports of the different database available.
CLI commands
This project exposes cli commands for launching the different databases.
opencdms-test-data startdb: Starts all the database containers.opencdms-test-data stopdb: Stops all containersopencdms-test-data startdb --containers containerName,AnotherContainerName: Starts one or more number of specified containers
Available containers and service ports
"postgres": 5432,
"mariadb": 3306,
"opencdmsdb": 35432,
"postgresql": 25432,
"mysql": 23306,
"oracle": 21521,
"clide": 35433,
"climsoft-4.1.1": 33308,
"mch-english": 33306,
"midas": 31521,
"wmdr": 35434,
"surface": 45432
OpenCDMS supported systems
This repository contains data and information for testing OpenCDMS and supported systems.
There are three ways to test OpenCDMS with a database:
-
Testing with original database technologies (complex)
This involves installing a database system like MariaDB, MySQL, Oracle or PostgreSQL and installing the CDMSs original database schema (see SQL DDL files in the
schemasdirectory).To simplify this approach, we have created a
docker-compose.ymlfile in the root of the project. Thisdocker-compose.ymlfile includes a few different types of containers/services for different use cases.There are following services in the
docker-compose.ymlfile:
- opencdms-db: This is an empty TimescaleDB/PostGIS instance for deploying schemas for multiple supported CDMSs. This is currently empty.
- postgresql: This is a PostgreSQL instance containing schemas for CDMSs that use PostgreSQL. Among the supported CDMSs, CliDE and WMDR use PostgreSQL.
- mysql: This is a MySQL instance containing schemas for CDMSs that use MySQL. Among supported CDMSs, Climsoft and MCH use MySQL.
- oracle: This is an Oracle Express Edition instance containing schemas from CDMSs that use Oracle. Among supported CDMSs, Midas uses Oracle.
- clide: This is a PostgreSQL 13 instance containing the CliDE schema which is comparable to how CliDE is used in production.
- climsoft-4.1.1: This is a MariaDB 10.1 instance containing the Climsoft schema for version 4.1.1 which is comparable to how Climsoft is used in production.
- mch-english: This is a MySQL 5.1.17 instance containing the MCH (English) schema which is comparable to how MCH is used in production.
- midas: This is an Oracle Express Edition instance containing schemas from Midas which is comparable to how Midas is used in production.
- wmdr: This is a TimescaleDB/PostGIS instance containing WMDR schema which is comparable to how WMDR is used in production.
Service Groups
These services are divided into 3 groups depending on how they are used:
- Group 1 - An OpenCDMS database -
opencdms-dbis meant to be used for any CDMS that is supported by OpenCDMS. A public release ofpyopencdmspackage should be able to handle any operation for any supported CDMS using this instance only. - Group 2 - A Postgres/MySQL/Oracle-specific database -
postgresql,mysql,oracleshould be used when you want to use the same database technology that is used by respective CDMS in production. We have createdDockerfiles for these services indocker/groupswith instructions to create the same table structure for respective CDMSs as used in production. - Group 3 - A CDMS-specific database -
clide,climsoft-4.1.1,mch-english,midas,wmdrare the dedicated instances for respective CDMS. If you want to instantiate a specific CDMS, you should use one of these services.
Port Mapping
Port numbers have a group number (see above) prepended to the default port number. This allows developers to quickly identify which group the database server belongs to and also avoids clashes with any existing database servers running on the default ports.
Service Port opencdms-db 15432 postgresql 25432 mysql 23306 oracle 21521 clide 35432 climsoft-4.1.1 33308 mch-english 33306 midas 31521 wmdr 35433 -
Testing with a single database technology (standard)
The
pyopencdmslibrary allows developers to initialise data models for any of the supported systems in any of the supported database systems (allowing developers to install and use a single database system). Using a different underlying database technology will most likely prevent you from using SQL to perform operations like restore commands, but otherwise interaction can be achieved through thepyopencdmsPython API. -
Testing with SQLite / SpatiaLite (easy)
The final option does not require you to install any database system and instead uses the lightweight SQLite option. By default, when automated unit tests run a temporary in-memory SQLite database is used. Developers do not need to install any database software.
Data sets
See individual directories with the data directory for data license information.
Metadata
Release files for opencdms-test-databases 0.1.10
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 |
|---|---|---|---|---|
| opencdms_test_databases-0.1.10.tar.gz | 10.0 MB | Without provenance | Details for opencdms_test_databases-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opencdms_test_databases-0.1.10-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for opencdms_test_databases-0.1.10-py2.py3-none-any.whl |
Total release size: 20.1 MB
Release files / opencdms_test_databases-0.1.10.tar.gz
| Download URL | opencdms_test_databases-0.1.10.tar.gz |
|---|---|
| Size | 10.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db8cdc11816b1c71995878f34221995c1c01dd3d0b7f7cd703802c6758882d13
|
|
BLAKE2b-256 checksum How to use checksums |
2da2fd8a08bcf7fc0b1b11ba98dc092d1c19dd1e4b45b7c56ee30fe23b3b6a56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / opencdms_test_databases-0.1.10-py2.py3-none-any.whl
| Download URL | opencdms_test_databases-0.1.10-py2.py3-none-any.whl |
|---|---|
| Size | 10.1 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
da9108a32e16f9da672cdd411235f80c35ada9a0351eda389ce4e426f91ebee6
|
|
BLAKE2b-256 checksum How to use checksums |
ffa3c48667d0ff3c40870a7a018dc89187ef33b19a168d13fc1b2fa404fef4b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for opencdms-test-databases 0.1.10
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.