Closed simonrp84 closed 1 year ago
Hi @simonrp84,
These are the following steps I did to make the unit testing work.
conda create --name pypromice-test python=3.8
conda activate pypromice-test
pip install --upgrade git+http://github.com/GEUS-Glaciology-and-Climate/pypromice.git
python -m unittest discover pypromice
And this should be the output of those unit tests:
.
AWS object initialising...
-----> No msg_lat or msg_lon for test_raw1.txt
L0 data successfully loaded from test_raw1.txt
-----> No msg_lat or msg_lon for test_raw_SlimTableMem1.txt
L0 data successfully loaded from test_raw_SlimTableMem1.txt
L0 data successfully loaded from test_raw_transmitted1.txt
Commencing 1-boom processing...
Level 1 processing...
Level 2 processing...
Unable to download flag file, using local file: local/flags/TEST1.csv
No flag file to read.
Unable to download adjustment file, using local file: local/adjustments/TEST1.csv
No adjustment file to read.
Level 3 processing...
Resampling to 10 minute
....300234061165160-36820 (binary) Promice 2015 summer message
..
----------------------------------------------------------------------
Ran 7 tests in 3.866s
OK
This is as documented in the installation guide. Can you walk us through specifically how you are getting your error? Are you performing the unit testing with the pypromice package installed in the Python environment or from source?
Hi, I can confirm that the commands you list here are working OK.
conda create --name pypromice-test python=3.8
conda activate pypromice-test
pip install --upgrade git+http://github.com/GEUS-Glaciology-and-Climate/pypromice.git
python -m unittest discover pypromice
But those are slightly different from what's written in the installguide, which are:
conda create --name pypromice python=3.8
conda activate pypromice
conda install xarray pandas pathlib
conda install -c conda-forge netCDF4
git clone git@github.com:GEUS-Glaciology-and-Climate/pypromice.git
cd pypromice/
pip install .
python -m unittest discover pypromice
These commands do not work unless I'm in the pypromice source directory. Perhaps you could edit the installguide to mirror your commands in the comment above? This may be some operating system specific issue, as I'm only able to test on Windows at the moment.
Yes, editing the installation guide is a good idea - saves confusion. We can do that no problem.
Looks good to me, thanks for the rapid modifications!
Hello, In the quick install guide the command given to run the unittests (
python -m unittest discover pypromice
) throws an error:Could you please investigate what's happening there? I tried a few different combinations and haven't had any luck working around the error.