oceanobservatories / asset-management Goto Github PK
View Code? Open in Web Editor NEWThis project forked from timothyahahn-rtn/asset-management
Asset Management
This project forked from timothyahahn-rtn/asset-management
Asset Management
asset-management/test/unit/test_cal.py
Line 43 in 160735e
I get this warning when running nosetests. The .as_matrix part of the code should be removed and the associated code edited to account for this change.
FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
return pandas.read_csv(sheetref_name, header=None).as_matrix()
The aforementioned Reference Designator from the Deployment csv did not have an associated Reference Designator from the vocab.csv.
Please add Reference Designator CP03ISSM-RID27-07-SPKIRB000 to the vocab/vocab.csv.
When I ran unit tests locally, 3 errors/failures were thrown because a new ADCPAM calibration filename had 1 underscore in it instead of 2 before the calibration date. The error messages printed did not point to the exact problem and suggested that there was a cascading failure that was not caught.
The problem is that within the method:
asset-management/test/test_base.py > class: AssetManagementUnitTest
> method: parse_cal_filename
a split statement that tries to split the filename by the double underscore within a try except block does not throw an exception when there aren't 2 underscores. It normally would return a list with 2 elements split by the 2 underscores, but instead, if the split function does not see the delimiter in a string, it returns the same string in a 1 element list. So instead of failing at the parse_cal_filename
method, it fails outside of the method in the CalibrationFileUnitTest
subclass when the method is called (here, here, and here). Instead it fails for ValueError
where the output expects 2 items returned from the function but only one is returned. This then escapes the FileNameException
exception clause and therefore does not accurately report the problem. Since the base function failed in 3 separate test functions, the single failure appears as 3.
Although it was relatively quick to figure out what the problem was, I recommend updating the parse_cal_filename
method (and perhaps similar methods) to catch badly formed filenames by either checking that it splits the filename as expected, or perhaps using a regex to truly make sure a filename follows the intended format.
-Stuart
asset-management/test/test_base.py
Line 61 in 160735e
when running nosetests I get the warning:
asset-management\test\test_base.py:61: FutureWarning: Sorting
because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.
To accept the future behavior, pass 'sort=False'.
To retain the current behavior and silence the warning, pass 'sort=True'.
cls.bulk_data = pd.concat(bulk_dataframes)
This should be changed to adjust for the future behavior.
I added a cruise ID to the cruise sheet EK201807B and my pull request was merged (546), but as of the current commit, the EK201807B cruise ID is missing. Since it should have been a simple fast-forward merge, someone was careless and overwrote my changes. Please be more careful of your merges.
@najascutellatus, the OPTAA shown in the path below is incorrectly classified as OPTAA-D. This unit, serial number 266, is a deep OPTAA (titanium pressure housing) and needs to be renamed as OPTAA-C. This applies to the associated (*.ext) data files as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.