Skip to main content

Utility to clean Freshness Database

Build Status Coverage Status Code style: black Imports: isort

DEPRECATED - code moved to https://github.com/OCHA-DAP/hdx-data-freshness

This script cleans the freshness database.

Usage

python -m hdx.freshness.dbactions [-db/--db_uri=] [-dp/--db_params=] [action]

Either db_uri or db_params must be provided or the environment variable DB_URI must be set. db_uri or DB_URI are of form: postgresql+psycopg://user:password@host:port/database

db_params is of form: database=XXX,host=X.X.X.X,username=XXX,password=XXX,port=1234, ssh_host=X.X.X.X,ssh_port=1234,ssh_username=XXX, ssh_private_key=/home/XXX/.ssh/keyfile

action:

  • "clone" which creates a shallow clone of the database which only has all the runs and one dataset and its resources per run for testing purposes.

  • "clean" (the default) cleans the database by removing runs according to these rules:

    1. Keep a handful of runs around the end of each quarter all the way back to the first run in 2017
    2. Keep daily runs going back 2 years
    3. Keep weekly runs from 2 to 4 years back
    4. Keep monthly runs for 4 years back and earlier

Metadata

Release files for hdx-data-freshness-dbclean 1.0.2

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

Source distribution (sdist)

Source distribution for hdx-data-freshness-dbclean 1.0.2
File Size Uploaded Provenance Actions
hdx-data-freshness-dbclean-1.0.2.tar.gz 301.2 kB Without provenance Details for hdx-data-freshness-dbclean-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hdx-data-freshness-dbclean 1.0.2
File Interpreter ABI Platform Actions
hdx_data_freshness_dbclean-1.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for hdx_data_freshness_dbclean-1.0.2-py2.py3-none-any.whl

Total release size: 309.1 kB

Release files / hdx-data-freshness-dbclean-1.0.2.tar.gz

Download URL hdx-data-freshness-dbclean-1.0.2.tar.gz
Size 301.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cacbd61897f2ec7dc30491339ffb26ae66c3c43a1691900f0809afa6088ff9f6
BLAKE2b-256 checksum
How to use checksums
07828ec84882ec36153451c06c98bc33aaf54b4b93e3d2de410683e0cf5299cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / hdx_data_freshness_dbclean-1.0.2-py2.py3-none-any.whl

Download URL hdx_data_freshness_dbclean-1.0.2-py2.py3-none-any.whl
Size 7.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8532ce3ba26ac5ba3d463acd4979b597eef199ec2918154da94fd0d1c5580d48
BLAKE2b-256 checksum
How to use checksums
dbdf9acb94f034d07eec97225a4eace02c5c9bcab566f10a081d176df75fb2e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for hdx-data-freshness-dbclean 1.0.2

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.

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