-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate step 2 #44
Integrate step 2 #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good! We can do some cleanups later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be an install problem here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't seem to be able to install this using the description in the README any more – I'm getting the following error:
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
/var/folders/n5/6b48sz2j3yldl4mnglvsr6mh0000gq/T/H5closem9scgpzm.c:1:10: fatal error: 'H5public.h' file not found
#include "H5public.h"
^~~~~~~~~~~~
1 error generated.
cpuinfo failed, assuming no CPU features: 'flags'
* Using Python 3.9.18 (main, Oct 4 2023, 15:25:11)
* Found cython 3.0.6
* USE_PKGCONFIG: True
.. ERROR:: Could not find a local HDF5 installation.
You may need to explicitly state where your local HDF5 headers and
library can be found by setting the ``HDF5_DIR`` environment
variable or by using the ``--hdf5`` command-line option.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Is there something special I need to do to make this work? On main it still builds fine. It looks like a problem with tables
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kmilo9999 check when tables is being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hollandjg This error is because it's not finding HDF5 in your macos. I created a workflow that checks the installation in that system and they seem to work. Have you set the HDF5_DIR
environmental variable?
@cpaniaguam @hollandjg This is the stack trace of the throw error when the pytables
dependency is missed.
Traceback (most recent call last):
File "/mnt/c/Projects/Github/icesat2-tracks/src/icesat2_tracks/analysis_db/B02_make_spectra_gFT.py", line 439, in <module>
MT.save_pandas_table(Pars_optm, save_name+'_params', save_path )
File "/mnt/c/Projects/Github/icesat2-tracks/src/icesat2_tracks/local_modules/m_tools_ph3.py", line 282, in save_pandas_table
with HDFStore(save_path+'/'+ID+'.h5') as store:
File "/mnt/c/Projects/Github/icesat2-tracks/venv39/lib/python3.9/site-packages/pandas/io/pytables.py", line 566, in __init__
tables = import_optional_dependency("tables")
File "/mnt/c/Projects/Github/icesat2-tracks/venv39/lib/python3.9/site-packages/pandas/compat/_optional.py", line 135, in import_optional_dependency
raise ImportError(msg)
ImportError: Missing optional dependency 'pytables'. Use pip or conda to install pytables.
Basically, when the analysis results are being save to a pandas table, pandas
calls the function :
import_optional_dependency("tables")
and that producess the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solves it, but I think it needs to be in the README. I've put in a suggestion in #49 which can be merged into this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested a couple more cleanups before approving and merging.
Also added some comments for future development items.
"sliderule==4.1.0", | ||
"ipyleaflet", | ||
"lmfit", | ||
"tables" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might be able to remove this dep if the I/O is optimized in step 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be nice.
@@ -50,7 +58,7 @@ def linear_gap_fill(F, key_lead, key_int): | |||
return y_g | |||
|
|||
|
|||
# %% | |||
|
|||
track_name, batch_key, test_flag = io.init_from_input(sys.argv) # loads standard experiment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might change after the cli is implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely!
Co-authored-by: Carlos Paniagua <cpaniaguam@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pointed out a few more lines that can also be deleted.
Co-authored-by: Carlos Paniagua <cpaniaguam@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am requesting one more deletion of commented code. Other than that I think this is ready to merge!
# h.heap() | ||
#import s3fs | ||
#from memory_profiler import profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not delete these too?
#track_name, batch_key, test_flag = '20190601094826_09790312_004_01', 'SH_batch01', False | ||
#track_name, batch_key, test_flag = '20190207111114_06260210_004_01', 'SH_batch02', False | ||
#track_name, batch_key, test_flag = '20190208152826_06440210_004_01', 'SH_batch01', False | ||
#track_name, batch_key, test_flag = '20190213133330_07190212_004_01', 'SH_batch02', False | ||
#track_name, batch_key, test_flag = '20190205231558_06030212_004_01', 'SH_batch02', False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might have missed suggesting removing other commented code, but lines 61-76, 78, 106 could be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed all the commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean as a whistle!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Just one suggested change in #49
m_spectrum_ph3.py
andICEsat2_SI_tools/generalized_FT.py
to integrate the pipeline's step 2 to the current folder structure and packaging configuration