Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardcoded specifics #4

Open
jonatanmindroad opened this issue Oct 15, 2024 · 1 comment
Open

Remove hardcoded specifics #4

jonatanmindroad opened this issue Oct 15, 2024 · 1 comment
Assignees

Comments

@jonatanmindroad
Copy link
Contributor

jonatanmindroad commented Oct 15, 2024

Hardcoded logic for specific values should be replaced (where possible) with general code working using specific data from yaml-files.

Examples:

  • dwca_generator/dwca_data_shark.py
@mikaelhedblom
Copy link
Member

mikaelhedblom commented Oct 15, 2024

In dwca_format_standard.py:

  • # IFCB sample vol unit fix litres to millilitres

  • # Seal Pathology area fix using obis.org/maptool moving position from county capital to position in water and with individual uncertainty radius m (dwca_seal_pathology.yaml, SealPathology)

  • #Greyseal fix fix using obis.org/maptool moving position from county capital to position in water and with individual uncertainty radius m (dwca_greyseal_nat.yaml, GreySeal)

  • # Phytoplankton fix (dwca_phytoplankton_nat.yaml, Phytoplankton)

  • # Measurement identifiers. NERC vocabular. # nerc codes found at https://vocab.nerc.ac.uk/collection/P01/current/ (generellt, dessa 50 ish fixar gäller parameter-namn i samtliga datapaket)

  • #nerc codes found at https://vocab.nerc.ac.uk/collection/P06/current/ (generellt, samma som ovan punkt. dessa fixar gäller dock unit-namn.)

  • #Phytoplankton (dessa följer på ovan punkt men generellt för dwca_phytoplankton_nat.yaml, Phytoplankton)

  • #IFCB (dessa följer på ovan punkt men generellt för dwca_phytoplankton_ifcb.yaml, IFCB)

In dwca_data_shark.py:

  • # For empty observations use "absent" in occurrenceStatus. (dwca_ringedseal_nat.yaml, dwca_picoplankton_nat.yaml, dwca_harbour_porpoise_nat.yaml, RingedSeal, Picoplankton, HarbourPorpoise)
  • # Use coordinate_uncertainty_m for some data. # County AB or A or B. and so on..... (detta är första funktionaliteten för att fixa positioner för sälar. punkten under är vidarebyggen för att förbättra delar av detta, i dwca_format_standard. men den här gäller alla säl, dwca_greyseal_nat.yaml, dwca_harbourseal_nat.yaml, dwca_ringedseal_nat.yaml, dwca_seal_pathology.yaml, GreySeal, HarbourSeal, RingedSeal, SealPathology)

In dwca_format_standard.py:

  • # Seal Pathology area fix using obis.org/maptool moving position from county capital to position in water and with individual uncertainty radius m (skriver över vissa värden definierade i ovan punkt. dwca_seal_pathology.yaml, dwca_greyseal_nat.yaml, SealPathology, GreySeal)

@jonatanmindroad jonatanmindroad self-assigned this Nov 26, 2024
jonatanmindroad added a commit that referenced this issue Dec 2, 2024
Introduces a mechanism for having alternate fields that will be chosen
based on a configured prefix. This could be used to solve most (all?)
similar issues.

Part of #4
jonatanmindroad added a commit that referenced this issue Dec 2, 2024
Introduces a mechanism for having alternate fields that will be chosen
based on a configured prefix. This could be used to solve most (all?)
similar issues.

Part of #4
jonatanmindroad added a commit that referenced this issue Dec 2, 2024
Introduces a mechanism for having alternate fields that will be chosen
based on a configured prefix. This could be used to solve most (all?)
similar issues.

Part of #4
jonatanmindroad added a commit that referenced this issue Dec 9, 2024
Remove the need for hard-coded fix.

Part of #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants