Skip to content

Latest commit

 

History

History

publish

PhyloPic: Publisher

Publishing scripts for PhyloPic builds.

Setting up

See instructions in the PhyloPic project README for setting up the monorepo project.

Prerequisites

Make sure you have the following installed on your system and reachable via the system path:

Environment variables

The following environment variables are required. They may be stored in .env in the root of this project.

Variable Name Description
API_CLOUDFRONT_DISTRIBUTION_ID Distribution ID of the Amazon Web Services CloudFront distribution that serves as a CDN for the API
PGHOST Postgres host
PGPASSWORD Postgres password
PGUSER Postgres user
REVALIDATE_KEY Key for revalidating the main website pages
S3_ACCESS_KEY_ID Amazon Web Services S3 access key ID
S3_REGION Amazon Web Services S3 region
S3_SECRET_ACCESS_KEY Amazon Web Services S3 secret access key
WWW_URL Root URL of the main website (https://www.phylopic.org)

The following environment variables are optional:

Variable Name Description
EOL_API_KEY Encyclopedia of Life API key
PGPORT Postgres port (default: 5432)

Running scripts

Release a new build

This will build and release a new build of the website, created from the files in the source-images.phylopic.org bucket and data in the phylopic-source database.

yarn make

Autolink externals

These commands will pull data from external APIs and try to match them to nodes in the phylopic-source database.

yarn autolink eol
yarn autolink gbif
yarn autolink otol
yarn autolink pbdb

Normalize names

Node names should be normalized already, but to ensure nothing got missed, they can all be normalized by running:

yarn normalize

Report silhouette coverage

This command will report coverage statistics for nodes (number of silhouettes per number of terminal nodes, as reported by the Open Tree of Life).

yarn coverage <UUID> <UUID> ...