Repository navigation
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Origin/python 311
7287 flag values convert to bytes
There was a problem hiding this comment.
I had to merge in the v2 branch, resulting in some of the changes below.
There was a problem hiding this comment.
Ignore changes here. Due to merge of V2 branch
There was a problem hiding this comment.
Ignore changes here. Due to merge of V2 branch
| def current_utc_timestamp(format=TIMESTAMP_FORMAT): | ||
| return datetime.now(timezone.utc).strftime(format) | ||
|
|
||
|
|
There was a problem hiding this comment.
Changes above due to merge of V2 branch only
There was a problem hiding this comment.
Ignore changes here. Due to merge of V2 branch
There was a problem hiding this comment.
Ignore changes here. Due to merge of V2 branch
There was a problem hiding this comment.
Ignore changes here. Due to merge of V2 branch
There was a problem hiding this comment.
Ignore changes here. Due to merge of V2 branch
As with all recent PR's in this repository (e.g. #180, #180), please
Basically, think of |
See Unidata/netcdf4-python#1464 |
Thanks Marty, I tried this and tested locally. Seems to be working. I created a new branch based on the v2 branch: #189 |
This PR has been closed. Refer to #189 instead.
V2 branch has been merged into this one - see comments indicating which code can be ignored as changes are only due to this.
Description
netCDF4.stringtochar raises an AttributeError when converting fixed-width byte strings when using netcdf4==1.7.4 (pinned in
dataflow-orchestration). This broke mooring product generation and required a monkeypatch.I investigated whether we could downgrade netcdf4 in
dataflow-orchestrationbut constraining versions is not ideal there.Instead we can use a helper function for numpy byte-to-character conversion, covering source_file and instrument_id in the products. This removes the need for a monkeypatch and doesn't effect ncwriter used by ingestion and moorings NRT pipelines.
I tested
update_mooring_products_flow.pylocally while importing this branchaodntoolsand removing the monkeypatch and is working.