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

Flytte ansvar for oppdatering av fremmedartstatus og rødlistestatus hos taxonapi #1351

Open
9 tasks done
steinho opened this issue Sep 13, 2023 · 0 comments
Open
9 tasks done
Assignees

Comments

@steinho
Copy link
Member

steinho commented Sep 13, 2023

I dag publiseres rødliste og fremmedartkategori til taxon-apiet via ett annet prosjekt - som må kjøres manuelt

https://github.com/Artsdatabanken/Artsdatabanken.Legacy
i prosjektet https://github.com/Artsdatabanken/Artsdatabanken.Legacy/tree/Raven35/Databank.Data.Import
Ved å trykke på eksporter i assesments frontend
https://artsdatabanken.no/lister/rodlisteforarter/2021
og oppdatere csv filene i dette prosjektet - og etterpå kjøre koden for å dumpe DynamicProperties inn til databank1 ravendb instansen som ligger bak artsdatabanken.no/api/taxon

Siden risikovurderingene i dag må publiseres manuelt via assessments-frontend prosjektet - ønsker vi å flytte ansvaret hit slik at taxonapi'et på hjemmesiden oppdateres samtidig.

Logikken for å lage og publisere dynamicProperty for rødlista 21 og fremmeart23 - ligger i Databank.Data.Import - og kan mer eller mindre kopieres over - men må justeres til å hente risikovurderingene mer direkte fra assessment-frontend prosjektet og ikke via csv filene slik som nå.

NB! Potensiell hickup - ravendb 3.5 er egentlig .net framework ikke core - men støttes av .net standard.... og fungerer fint med .net core 5

Installer lokal-versjonen av StorageAccount for utvikling: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio

  • I Assessments:transformation og Frontend.web - legg til user-secret "ConnectionStrings:AzureBlobStorage": "UseDevelopmentStorage=true"

  • Hent siste fra develop - lag en ny feature branch fra denne - f.eks. feature/issue1351

I transformation prosjektet -

  • lag en classe PublishDynamicProperties for å ha en plass å putt business logikk fra det gamle prosjektet
  • Referer nuget pakke for ravendb client 3.5
  • legg til ett kommandovalg i program.cs - får å velge noe ala Publiser dynamicProperties til TaxonApi
  • i publishdynamicproperties - les ut respektive ferdig transformerte lister fra storageaccount og map de riktige verdiene inn i nye dynamicproperties. NB! bruk de ferditransformerte filene i storageaccount
  • sjekk at spesielt fremmedarts-dynamicproperty og alienstatuscategory blir likt - f.eks. http://it-webadb03.it.ntnu.no:8181/studio/index.html#databases/edit?&id=DynamicProperty%2FFremmedArt2023-1001&database=Databank1 . @AneMarlene bekreftet denne.
  • Lagre dynamicproperties til ravendb - ala det gamle prosjektet, men gjør ravendb connectionstring konfigurerbar...
  • Eventuelt - hent ut eksisterende dyneamicproperties - og sjekk undervegs om noen ikke er der lengre - kan slettes i ravendb. Eksempel på slik tilnærming ligger i hjemmesidekoden - data.artsdatabanken.no i consollapplikasjonen databank.taxon.loader - der lastes noen eldre dynamicproperties for FAB 2018 - der logikken også fjerner eventuelle ekstra som ligger der...
bolsson added a commit that referenced this issue Sep 13, 2023
…importerer fremmedarter 23- og rødliste 21 data fra Azure Storage Account
bolsson added a commit that referenced this issue Sep 13, 2023
bolsson added a commit that referenced this issue Sep 14, 2023
bolsson added a commit that referenced this issue Sep 25, 2023
bolsson added a commit that referenced this issue Sep 29, 2023
bolsson added a commit that referenced this issue Sep 29, 2023
…g access to the internal path of the Assessment.Frontend.Web project folders without using the IWebHostEnvironment environment object which will not be available when the host is not running
bolsson added a commit that referenced this issue Oct 2, 2023
bolsson added a commit that referenced this issue Oct 2, 2023
bolsson added a commit that referenced this issue Oct 3, 2023
bolsson added a commit that referenced this issue Oct 3, 2023
bolsson added a commit that referenced this issue Oct 4, 2023
bolsson added a commit that referenced this issue Oct 5, 2023
bolsson added a commit that referenced this issue Oct 6, 2023
bolsson added a commit that referenced this issue Oct 23, 2023
bolsson added a commit that referenced this issue Oct 26, 2023
bolsson added a commit that referenced this issue Oct 26, 2023
bolsson added a commit that referenced this issue Oct 31, 2023
bolsson added a commit that referenced this issue Oct 31, 2023
bolsson added a commit that referenced this issue Nov 28, 2023
bolsson added a commit that referenced this issue Nov 28, 2023
bolsson added a commit that referenced this issue Nov 29, 2023
bolsson added a commit that referenced this issue Dec 14, 2023
bolsson added a commit that referenced this issue Dec 21, 2023
…ect recurrency of the DynamicProperty.Property object
bolsson added a commit that referenced this issue Jan 2, 2024
bolsson added a commit that referenced this issue Jan 2, 2024
bolsson added a commit that referenced this issue Jan 9, 2024
bolsson added a commit that referenced this issue Jan 9, 2024
bolsson added a commit that referenced this issue Jan 11, 2024
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