Skip to content

Commit

Permalink
chore: move eflora tools from ca-tools (#22)
Browse files Browse the repository at this point in the history
* chore: move jepson-eflora tool from ca-tools

* chore: clean up TypeScript

* chore: clean up package.json
  • Loading branch information
johnkenny54 authored Dec 21, 2024
1 parent 8114cfa commit 6858faf
Show file tree
Hide file tree
Showing 10 changed files with 796 additions and 52 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ jobs:
node-version: latest
cache: "npm"
- run: npm update
- run: npx eslint
- run: npx tsc
- run: npm run check
8 changes: 0 additions & 8 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp/
2 changes: 1 addition & 1 deletion lib/taxa.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Taxa {
for (const row of taxaCSV) {
const name = row["taxon_name"];

/** @type {TaxonData|{status?:string}} */
/** @type {TaxonData|{status?:StatusCode}} */
let taxon_overrides = {};
if (inclusionList !== true) {
taxon_overrides = inclusionList[name];
Expand Down
10 changes: 8 additions & 2 deletions lib/taxon.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ class Taxon {
return name.replace(/ (subsp|var)\./, "").replace("×", "× ");
}

/**
* @returns {string|undefined}
*/
getINatSyn() {
return this.#iNatSyn;
}
Expand Down Expand Up @@ -308,13 +311,16 @@ class Taxon {
return link;
}

/**
* @returns {StatusCode}
*/
getStatus() {
return this.#status;
}

/**
* @param {*} config
* @returns
* @param {Config} config
* @returns {string}
*/
getStatusDescription(config) {
switch (this.#status) {
Expand Down
Loading

0 comments on commit 6858faf

Please sign in to comment.