Skip to content

Commit

Permalink
Adding wigos id as attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
MireyaMMO committed May 2, 2024
1 parent 41dc9c8 commit c295368
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Dockerfile_MOS
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM metocean/ops-qc:v0.4.7
FROM metocean/ops-qc:v0.5.1

ADD . $SOURCE/moana-qc

ARG GIT_TOKEN

RUN pip install -r $SOURCE/moana-qc/requirements/default.txt &&\
pip install -I -r $SOURCE/moana-qc/requirements/opslibs.txt &&\
pip install -r $SOURCE/moana-qc/requirements/tests.txt &&\
pip install $SOURCE/moana-qc &&\
#RUN pip install -r $SOURCE/moana-qc/requirements/default.txt &&\
# pip install -I -r $SOURCE/moana-qc/requirements/opslibs.txt &&\
# RUN pip install -r $SOURCE/moana-qc/requirements/tests.txt &&\
RUN pip install $SOURCE/moana-qc &&\
sudo pip uninstall -y cloudpickle &&\
sudo pip uninstall -y ops-mds &&\
sudo pip uninstall -y snowflake-sqlalchemy &&\
Expand Down
2 changes: 1 addition & 1 deletion ops_qc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5.0'
__version__ = '0.6.0'
Binary file removed ops_qc/__pycache__/qc_apply.cpython-36.pyc
Binary file not shown.
Binary file removed ops_qc/__pycache__/qc_apply.cpython-37.pyc
Binary file not shown.
Binary file removed ops_qc/__pycache__/qc_preprocess.cpython-36.pyc
Binary file not shown.
Binary file removed ops_qc/__pycache__/qc_readers.cpython-36.pyc
Binary file not shown.
Binary file removed ops_qc/__pycache__/qc_utils.cpython-36.pyc
Binary file not shown.
Binary file removed ops_qc/__pycache__/qc_utils.cpython-37.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions ops_qc/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(
"deployment_method": "Fishing method",
"programme_name": "Programme",
"public": "Public",
"wigos_ID": "WIGOS ID",
"publication_date": "Publication Date",
},
add_sitename=True,
Expand Down Expand Up @@ -118,6 +119,15 @@ def _classify_gear(self):
self.ds.attrs["public"] = str(row["Public"])
except:
pass
try:
self.ds.attrs["wigos_id"] = str(row["WIGOS ID"])
except:
self.ds.attrs["wigos_id"] = "NA"
try:
self.ds.attrs["internal_id"] = str(row[0])
except:
pass

time_check += 1
self.status_dict.update(self.ds.attrs)
if time_check < 1:
Expand Down

0 comments on commit c295368

Please sign in to comment.