This is a package intended to help support both bulk and individual taxon insertion in Neotoma.
What the package does:
- Connects to the Neotoma Paleoecology Database (both main and tank).
- Takes a taxon name and checks the name with GBIF and NCBI.
- Finds the appropriate insertion point within Neotoma for insertion.
- Returns a set of rows to be inserted into Neotoma to support the new taxonname.
- Inserts new rows into Neotoma.
- Supports rollback and commit features.
- Simon Goring: University of Wisconsin - Madison
Secrets to connect to the database are in an "ignored" file named .env
. It should have the format:
DBAUTH={"host":"localhost","port":5432,"user":"postgres","password":"postgres","dbname":"neotoma"}
The repository uses the uv
package manager to help manage dependencies and ensure a stable development platform. To use this repository, first clone the repository locally, and then, run uv init
to install all neccessary packages. Once the packages are installed, the script testing_beetles.py
can be run using uv run testing_beetles.py
.
The script may be slow to run because it must interact with the Neotoma database (and could interact with GBIF and NCBI if wanted).
The script in this repository is designed to work with a CSV file provided by the BUGSCep research data group. That CSV has the format:
CODE,FAMILY,GENUS,SPECIES,AUTHORITY,epithet,neotoma_path,gbifid,ncbi_id,taxonRank,taxonomicStatus,ncbi_lineage_names
The testing_beetles.py
file parses this document row by row and returns a similar CSV, with the additional columns familyid
, genusid
, and speciesid
, with the associated Neotoma taxon IDs.