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
Moves sample data to ${INSTALL}/share/ #1363
Conversation
@remram44 did you run ctest on this? All vcs test look for the sample data in vcs.prefix+"/sample_data" You will probably need to edit these as well. |
This is annoying because sys.prefix gets weird values on Mac OS. Will need to configure() a Python file for that. |
It makes more sense, and is not completely impossible to find on OSX anymore.
70abd16
to
376dfb4
Compare
that's why we use vcs.prefix (not sys.prefix in case you installed somewhere else than your python root) |
7d0af58
to
887685a
Compare
@remram44 can you squash "Replace sample_data path" into single commit? It looks like they have the same commit message so seeing them in git history is kind of odd if that's Okay. |
They are different regexes... I'll squash once the tests pass. |
Thanks, I understand, appreciate it. |
887685a
to
d84ca01
Compare
Somehow geos5-sample.nc doesn't end up in the right place (but still in the old install/sample_data/ location), making 7 tests fail. |
find Packages testing -type f -name '*.py' | xargs sed -i 's/vcs.prefix+"\/sample_data\//vcs.sample_data+"\//' find Packages testing -type f -name '*.py' | xargs sed -i 's/os.path.join(vcs.prefix,"sample_data",/os.path.join(vcs.sample_data,/' find Packages testing -type f -name '*.py' | xargs sed -i 's/os.path.join( vcs.prefix, "sample_data",/os.path.join( vcs.sample_data,/' find Packages testing -type f -name '*.py' | xargs sed -i "s/os.path.join(vcs.prefix,'sample_data',/os.path.join(vcs.sample_data,/" find Packages testing -type f -name '*.py' | xargs sed -i "s/os.path.join(vcs.prefix, 'sample_data\//os.path.join(vcs.sample_data, '/" find Packages testing -type f -name '*.py' | xargs sed -i 's/os.path.join(vcs.prefix, "sample_data\//os.path.join(vcs.sample_data, "/' find Packages testing -type f -name '*.py' | xargs sed -i "s/cdat_info.get_prefix()+'\/sample_data\//cdat_info.get_sampledata_path()+'\//" find Packages testing -type f -name '*.py' | xargs sed -i 's/cdat_info.get_prefix()+"\/sample_data\//cdat_info.get_sampledata_path()+"\//' find Packages testing -type f -name '*.py' | xargs sed -i "s/cdat_info.get_prefix() + '\/sample_data\//cdat_info.get_sampledata_path() + '\//" find Packages testing -type f -name '*.py' | xargs sed -i "s/os.path.join (cdat_info.get_prefix(),'sample_data\/' +/os.path.join (cdat_info.get_sampledata_path(),/" find Packages testing -type f -name '*.py' | xargs sed -i "s/cdms.__path__\[0\],'..','..','..','..','sample_data',/vcs.sample_data,/" find Packages testing -type f -name '*.py' | xargs sed -i "s/cdms2.__path__\[0\],'..','..','..','..','sample_data',/vcs.sample_data,/"
d84ca01
to
549b722
Compare
I am going to push a fix for it with a new updated branch and therefore closing it. |
why closing BEFORE the work is done? |
@aashish24 Note that you can just update pull requests if the branch is from UV-CDAT/uvcdat |
Thanks @remram44. The only reason I did because I appended _updated in the branch name and didn't want to loose the original branch just in case if I messed up something but i will remember next time. |
Fixes #1362
Moves sample_data to share/uvcdat/sample_data
Moves uvcmetrics data to share/uvcmetrics/test_data
It seems to me that we might want
CDAT_DOWNLOAD_UVCMETRICS_TESTDATA
to default to off; it is over 1.3GB in size.