Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/upsonp/dart into biochem_…
Browse files Browse the repository at this point in the history
…validation

merging master updates for dfo-mar-odis#164
  • Loading branch information
upsonp committed Jun 25, 2024
2 parents 4aa8986 + 86ccc0c commit 303e5f0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions core/parsers/andes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from django.db.models import QuerySet
from django.utils.translation import gettext_lazy as _

import core.models
from settingsdb.models import FileConfiguration

from core import models as core_models
Expand All @@ -20,7 +21,7 @@ def get_or_create_file_config() -> QuerySet[FileConfiguration]:
# These are all things the Elog parser requires, so we should probably figure out how to tackle them when reading
# an Andes Report
fields = [
("lead_scientists", "chief_scientist", _("Label identifying the cheif scientists for the mission")),
("lead_scientists", "chief_scientist", _("Label identifying the chief scientists for the mission")),
("platform", "name", _("Label identifying the ship name used for the mission")),

("instrument_name", "name", _("Label identifying an instrument name")),
Expand Down Expand Up @@ -142,7 +143,17 @@ def parse_events(mission: core_models.Mission, file_name: str, samples: list[dic
for event in events:
event_id = event[config.get(required_field='event_id').mapped_field]
instrument_name = event[config.get(required_field='event_instrument_name').mapped_field]
instrument = instruments.get(name__iexact=instrument_name)
type_name = event[config.get(required_field='instrument_type').mapped_field]

if type_name.lower() == 'plankton net':
type_name = 'net'

type = core_models.InstrumentType.other
if core_models.InstrumentType.has_value(type_name):
type = core_models.InstrumentType.get(type_name)

instrument = instruments.get(name__iexact=instrument_name, type=type)

sample_id = None
end_sample_id = None
if instrument.type == core_models.InstrumentType.ctd:
Expand Down
2 changes: 1 addition & 1 deletion start_dart.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if not exist ".\logs\" (
mkdir logs
)

set dart_version=3.9.0.1
set dart_version=3.9.0.2

REM if this is not a git repo, and the application was installed from zip file we just want to run update
REM if this is a cloned version of the git repo we want to pull from master, then run the update
Expand Down
2 changes: 1 addition & 1 deletion update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if not exist ".\logs\" (
REM If this was run from a clone repo we can force an update of the python libraries, collectstatic or a
REM migration on the database by changing the update version

set update_version=3.9.0.1
set update_version=3.9.0.2

set first_run=0
set server_path=.\dart_env\Scripts\activate.bat
Expand Down

0 comments on commit 303e5f0

Please sign in to comment.