Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Add horizontal lines to DAG doc for better visual separation (#4162)
Madison Swain-Bowdenb9d08141a3ff
diff --git a/.prettierignore b/.prettierignoreindex ed30bc228..f28be96ec 100644--- a/.prettierignore+++ b/.prettierignore@@ -3,8 +3,9 @@.github/CODEOWNERS# Documentation-# This file is linted when created, but the hr elements are replaced for correct rendering.+# These files are linted when created, but the hr elements are replaced for correct rendering.documentation/meta/media_properties/catalog.md+documentation/catalog/reference/DAGs.md# Frontendfrontend/test/unit/coveragediff --git a/catalog/justfile b/catalog/justfileindex f1054d56f..4343505ca 100644--- a/catalog/justfile+++ b/catalog/justfile@@ -152,12 +152,11 @@ generate-docs doc="dag" fail_on_diff="false":just ../lint prettier $TEMP.md &>/dev/null || trueecho "Linting done!"- if [ "{{ doc }}" == "media-props" ]; then- echo -n "Replacing linted md <hr> '---' with '----' required by sphinx..."- sed 's/^---$/----/' "../$TEMP.md" > "../$TEMP.tmp"- mv "../$TEMP.tmp" "../$TEMP.md"- echo "Replacements done!"- fi+ echo -n "Replacing linted md <hr> '---' with '----' required by sphinx..."+ sed 's/^---$/----/' "../$TEMP.md" > "../$TEMP.tmp"+ mv "../$TEMP.tmp" "../$TEMP.md"+ echo "Replacements done!"+mv ../$TEMP.md ../$FINAL_FILEecho "Moved the generated file to ../$FINAL_FILE"if {{ fail_on_diff }}; thendiff --git a/catalog/utilities/dag_doc_gen/dag_doc_generation.py b/catalog/utilities/dag_doc_gen/dag_doc_generation.pyindex 190bf1abd..cfc9a9836 100644--- a/catalog/utilities/dag_doc_gen/dag_doc_generation.py+++ b/catalog/utilities/dag_doc_gen/dag_doc_generation.py@@ -286,7 +286,7 @@ def generate_dag_doc(dag_folder: Path = DAG_FOLDER) -> str:text += f" 1. [`{dag.dag_id}`](#{dag_by_doc_md[dag.doc]})\n"dag_docs.add(generate_single_documentation(dag))- text += "\n" + "".join(sorted(dag_docs))+ text += "\n" + "\n----\n\n".join(sorted(dag_docs))# Normalize the newlines at the end of the file and add one more to make sure# our pre-commit checks are happy!diff --git a/documentation/catalog/reference/DAGs.md b/documentation/catalog/reference/DAGs.mdindex fa2ca5fbf..6d924eb29 100644--- a/documentation/catalog/reference/DAGs.md+++ b/documentation/catalog/reference/DAGs.md@@ -192,6 +192,8 @@ This is a maintenance DAG that should be run once. If all the null values in the`meta_data` column are updated, the DAG will only run the first and the laststep, logging the statistics.+----+### `airflow_log_cleanup`#### Clean up airflow logs@@ -217,6 +219,8 @@ airflow dags trigger --conf- maxLogAgeInDays:<INT> - Optional- enableDelete:<BOOLEAN> - Optional+----+### `auckland_museum_workflow`Content Provider: Auckland War Memorial Museum Tāmaki Paenga Hira@@ -235,6 +239,8 @@ https://github.com/AucklandMuseum/API/wiki/Tutorial| /search, /id | 10 | 1000 || /id/media | 10 | 1000 |+----+### `batched_update`#### Batched Update DAG@@ -312,6 +318,8 @@ already created: for example, if there was a problem with the `update_query`which caused DAG failures during the `update_batches` step. In this case, verifythat the `BATCH_START` var is set appropriately for your needs.+----+### `cc_mixter_workflow`Content Provider: ccMixter@@ -324,6 +332,8 @@ Notes: Documentation: https://ccmixter.org/query-api ccMixter sends bad JSON andextremely huge headers, both of which need workarounds that are handled by thisDAG.+----+### `check_silenced_dags`#### Silenced DAGs check@@ -349,6 +359,8 @@ issue has been resolved.The DAG runs weekly.+----+### `create_filtered_{media_type}_index`#### Create filtered index DAG factory@@ -405,6 +417,8 @@ There are two mechanisms that prevent this from happening:This ensures that neither are depending on or modifying the origin indexescritical for the creation of the filtered indexes.+----+### `create_new_{environment}_es_index`#### Create New ES Index DAG@@ -516,6 +530,8 @@ es-concurrency group for the DAG's environment is running. (E.g., the`create_new_staging_es_index` DAG fails immediately if any DAGs tagged with`staging-es-concurrency` are running.)+----+### `create_proportional_by_source_staging_index`#### Create Proportional By Source Staging Index DAG@@ -549,6 +565,8 @@ interfere with the production `data_refresh` or `create_filtered_index` DAGs.However, it will fail immediately if any of the DAGs tagged as part of the`staging-es-concurrency` group are running.+----+### `delete_records`#### Delete Records DAG@@ -604,6 +622,8 @@ that records selected for deletion in this DAG are not also being written to bya provider DAG, for instance. The simplest way to do this is to ensure that anyaffected provider DAGs are not currently running.+----+### `europeana_workflow`Content Provider: Europeana@@ -614,6 +634,8 @@ Output: TSV file containing the images and the respective meta-data.Notes: https://pro.europeana.eu/page/search+----+### `finnish_museums_workflow`Content Provider: Finnish Museums@@ -628,6 +650,8 @@ script is a dated DAG that ingests all records that were last updated in theprevious day. Because of this, it is not necessary to run a separate reingestionDAG, as updated data will be processed during regular ingestion.+----+### `flickr_audit_sub_provider_workflow`#### Flickr Sub Provider Audit@@ -636,6 +660,8 @@ Check the list of member institutions of the Flickr Commons for institutionsthat have cc-licensed images and are not already configured as sub-providers forthe Flickr DAG. Report suggestions for new sub-providers to Slack.+----+### `flickr_workflow`Content Provider: Flickr@@ -646,6 +672,8 @@ Output: TSV file containing the images and the respective meta-data.Notes: https://www.flickr.com/help/terms/api Rate limit: 3600 requests per hour.+----+### `freesound_workflow`Content Provider: Freesound@@ -657,6 +685,8 @@ Output: TSV file containing the image, the respective meta-data.Notes: https://freesound.org/docs/api/ Rate limit: No limit for our API key.This script can be run either to ingest the full dataset or as a dated DAG.+----+### `inaturalist_workflow`Provider: iNaturalist@@ -675,6 +705,8 @@ We use the table structure defined here,https://github.com/inaturalist/inaturalist-open-data/blob/main/Metadata/structure.sqlexcept for adding ancestry tags to the taxa table.+----+### `jamendo_workflow`Content Provider: Jamendo@@ -688,6 +720,8 @@ non-commercial apps Jamendo Music has more than 500,000 tracks shared by 40,000artists from over 150 countries all over the world. Audio quality: uploaded asWAV/ FLAC/ AIFF bit depth: 16/24 sample rate: 44.1 or 48 kHz channels: 1/2+----+### `justtakeitfree_workflow`Content Provider: Justtakeitfree@@ -699,6 +733,8 @@ Output: TSV file containing the media and the respective meta-data.Notes: https://justtakeitfree.com/api/api.php This API requires an API key. Formore details, see https://github.com/WordPress/openverse/pull/2793+----+### `metropolitan_museum_workflow`Content Provider: Metropolitan Museum of Art@@ -723,6 +759,8 @@ blocking during local development testing.connect with just date and license.https://collectionapi.metmuseum.org/public/collection/v1/search?isPublicDomain=true&metadataDate=2022-08-07+----+### `nappy_workflow`Content Provider: Nappy@@ -734,6 +772,8 @@ Output: TSV file containing the image meta-data.Notes: This api was written specially for Openverse. There are no known limitsor restrictions. https://nappy.co/+----+### `oauth2_authorization`#### OAuth Provider Authorization@@ -748,6 +788,8 @@ authorization will create an access/refresh token pair in the- Freesound+----+### `oauth2_token_refresh`#### OAuth Provider Token Refresh@@ -760,6 +802,8 @@ will update the tokens stored in the Variable upon successful refresh.- Freesound+----+### `phylopic_workflow`Content Provider: PhyloPic@@ -770,6 +814,8 @@ Output: TSV file containing the image, their respective meta-data.Notes: http://api-docs.phylopic.org/v2/ No rate limit specified.+----+### `point_{environment}_es_alias`#### Point ES Alias DAG@@ -793,6 +839,8 @@ es-concurrency group for the DAG's environment is running. (E.g., the`point_staging_alias` DAG fails immediately if any DAGs tagged with`staging-es-concurrency` are running.)+----+### `pr_review_reminders`#### PR Review Reminders@@ -816,6 +864,8 @@ Unfortunately the DAG does not know when someone is on vacation. It is up to theauthor of the PR to re-assign review if one of the randomly selected reviewersis unavailable for the time period during which the PR should be reviewed.+----+### `rawpixel_workflow`Content Provider: Rawpixel@@ -830,6 +880,8 @@ issues. The public API max results range is limited to 100,000 results, althoughthe API key we've been given can circumvent this limit.https://www.rawpixel.com/api/v1/search?tags=$publicdomain&page=1&pagesize=100+----+### `recreate_full_staging_index`#### Recreate Full Staging Index DAG@@ -871,6 +923,8 @@ However, as the DAG operates on the staging API database and ES cluster it willexit immediately if any of the DAGs tagged as part of the`staging_es_concurrency` group are already running.+----+### `recreate_{media_type}_popularity_calculation`This file generates Apache Airflow DAGs that, for the given media type,@@ -885,6 +939,8 @@ popularity constants and standardized popularity scores using the new functions.These DAGs are not on a schedule, and should only be run manually when new SQLcode is deployed for the calculation.+----+### `report_pending_reported_media`#### Report Pending Reported Media DAG@@ -898,6 +954,8 @@ whether further action (such as deindexing the record) needs to be taken. If arecord has been reported multiple times, it only needs to be reviewed once andso is only counted once in the reporting by this DAG.+----+### `rotate_db_snapshots`Manages weekly database snapshots.@@ -915,6 +973,8 @@ Requires two variables:`CATALOG_RDS_DB_IDENTIFIER`: The "DBIdentifier" of the RDS DB instance.`CATALOG_RDS_SNAPSHOTS_TO_RETAIN`: How many historical snapshots to retain.+----+### `science_museum_workflow`Content Provider: Science Museum@@ -927,6 +987,8 @@ Notes:https://github.com/TheScienceMuseum/collectionsonline/wiki/Collections-Online-APIRate limited, no specific rate given.+----+### `smithsonian_workflow`Content Provider: Smithsonian@@ -937,6 +999,8 @@ Output: TSV file containing the images and the respective meta-data.Notes: https://api.si.edu/openaccess/api/v1.0/search+----+### `smk_workflow`Content Provider: Statens Museum for Kunst (National Gallery of Denmark)@@ -947,6 +1011,8 @@ Output: TSV file containing the media metadata.Notes: https://www.smk.dk/en/article/smk-api/+----+### `staging_database_restore`#### Staging Database Restore DAG@@ -971,6 +1037,8 @@ the RDS operations run using a different hook:- `AIRFLOW_CONN_<ID>`: The connection string to use for RDS operations (per theabove example, it might be `AIRFLOW_CONN_AWS_RDS`)+----+### `stocksnap_workflow`Content Provider: StockSnap@@ -983,6 +1051,8 @@ Notes: https://stocksnap.io/api/load-photos/date/desc/1 https://stocksnap.io/faqAll images are licensed under CC0. No rate limits or authorization required. APIis undocumented.+----+### `wikimedia_commons_workflow`**Content Provider:** Wikimedia Commons@@ -1102,6 +1172,8 @@ parameter to avoid this issue on subsequent iterations.For these requests, we can remove the `globalusage` property from the `prop`parameter entirely and eschew the popularity data for these items.+----+### `wordpress_workflow`Content Provider: WordPress Photo Directory@@ -1113,6 +1185,8 @@ Output: TSV file containing the media metadata.Notes: https://wordpress.org/photos/wp-json/wp/v2 Provide photos, media, usersand more related resources. No rate limit specified.+----+### `{environment}_elasticsearch_cluster_healthcheck`Monitor staging and production Elasticsearch cluster health endpoint.@@ -1130,6 +1204,8 @@ it is expected, and occurs whenever shards and replicas are being relocatedassurance, but we could choose to add logic that ignores yellow cluster healthduring data refresh or other similar operations.+----+### `{media_type}_data_refresh`#### Data Refresh DAG Factory@@ -1154,6 +1230,8 @@ and related PRs:- [[Feature] Data refresh orchestration DAG](https://github.com/WordPress/openverse-catalog/issues/353)- [[Feature] Merge popularity calculations and data refresh into a single DAG](https://github.com/WordPress/openverse-catalog/issues/453)+----+### `{media_type}_popularity_refresh`#### Popularity Refresh DAG Factory