Commit Graph
7 Commits
Author SHA1 Message Date
Suppai_Neko afa683b7e3 Add species_detail trait pipeline with static dataset imports
- Add trait_importer.py to populate species_detail from PanTHERIA
  (mammals), EltonTraits (birds/mammals), and AmphiBIO (amphibians)
- Add EOL_requester.py with Wikidata SPARQL trait fetcher as fallback
- Add source trait CSVs to wildlife/trait_data/
- Update wilddex.db with initial trait data
2026-03-26 16:54:21 -07:00
Suppai_Neko de8a7e7c66 completed the portland_wildlife_dex_entries.csv
added a method to skip species that don't have a wiki page
2026-03-26 15:45:28 -07:00
Suppai_Neko 8978130b7c Created boilerplate setup for wilddex.db file.
.db file as 5 tables: lookalike, sightings, species
species_detail and sqlite_sequence.
Example .db file added
2026-03-26 15:41:51 -07:00
SuppaiNeko b229f5816e Changed get_wikipedia_article to be more robust
Will now fall back to wiki if local copy isn't avail
2026-03-26 12:17:06 -07:00
SuppaiNeko f01728adb7 - Added dex_info_writer.py with a full pipeline for
generating Pokédex-style species descriptions
  - Loads species from portland_wildlife.csv (taxon_id,
  common_name, wikipedia_url)
  - Fetches Wikipedia articles from a self-hosted Kiwix mirror
  (WIKI_LINK env var); falls back to live Wikipedia if unset
  - Spaces in Wikipedia URLs are normalized to underscores
  before fetching
  - LiteLLM instance prompted via OpenAI-compatible client
  (LITELLM_URL, LITELLM_API_KEY, LITELLM_MODEL env vars)
  - LLM has tool-calling access to fetch_wikipedia_article with
   an agentic loop
  - Output descriptions are sanitized — only alphanumerics and
  . , ! ? ' - : allowed
  - Writes results to portland_wildlife_dex_entries.csv in
  append mode with resume support (skips already-processed
  taxon_ids)
  - Live [i/total] progress counter printed each iteration
  along with the generated description
2026-03-25 21:02:30 -07:00
SuppaiNeko 7a91a9bed4 Fix wikipedia_url population in INaturalist requester
- Fixed wikipedia_url being incorrectly looked up in the
    ancestors dict (which maps rank→name) — now reads directly
    from the taxon object
  - Updated enrich_with_ancestors to capture and store
  wikipedia_url per taxon alongside ancestor data
  - Merges wikipedia_url back into species during enrichment
  pass, with fallback to value captured in the first pass
2026-03-25 21:00:10 -07:00
SuppaiNeko f18c7859d0 Initial commit 2026-03-25 19:17:26 -07:00