Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Conversation

remram44
Copy link
Contributor

@remram44 remram44 commented Jun 4, 2015

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.

@doutriaux1
Copy link
Contributor

@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.

@remram44
Copy link
Contributor Author

remram44 commented Jun 4, 2015

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.
@doutriaux1
Copy link
Contributor

that's why we use vcs.prefix (not sys.prefix in case you installed somewhere else than your python root)
Because that way it gets consistent between mac and not mac (su=ince sample_data is dumped currentlyat the same location so we don't need code for mac and non mac). But that is because sample_data was not installed under share as this issue points out. Thanks for being willing to take the time to fix this.

@remram44 remram44 force-pushed the sample-data-location branch 2 times, most recently from 7d0af58 to 887685a Compare June 4, 2015 20:20
@aashish24
Copy link
Contributor

@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.

@remram44
Copy link
Contributor Author

remram44 commented Jun 4, 2015

They are different regexes... I'll squash once the tests pass.

@aashish24
Copy link
Contributor

Thanks, I understand, appreciate it.

@remram44
Copy link
Contributor Author

remram44 commented Jun 4, 2015

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,/"
@aashish24
Copy link
Contributor

I am going to push a fix for it with a new updated branch and therefore closing it.

@doutriaux1
Copy link
Contributor

why closing BEFORE the work is done?

@remram44
Copy link
Contributor Author

@aashish24 Note that you can just update pull requests if the branch is from UV-CDAT/uvcdat

@remram44 remram44 deleted the sample-data-location branch June 22, 2015 18:38
@aashish24
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants