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

Sample data location updated #1390

Merged
merged 11 commits into from Jun 18, 2015

Conversation

Projects
None yet
3 participants
@aashish24
Contributor

aashish24 commented Jun 14, 2015

Updated branch for #1363.

remram44 and others added some commits Jun 4, 2015

Moves sample_data to share/uvcdat/sample_data
It makes more sense, and is not completely impossible to find on OSX
anymore.
Replace sample_data path
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,/"
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Jun 15, 2015

@aashish24 I would not stick the path into vcs.sample_data
While most of the sample_Data are being used by vcs, some are also used by cdms2 and other packages.
There is a "cdat_info" module (I know @remram44 it is created by the horrible install.py.in and I need to change this!) but that seems like the logical place for this sort of things.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Jun 15, 2015

I see you actually have such function in cdat_info. Perfect! Can you please use it accross the whole repo? So it is consistent.

@remram44

This comment has been minimized.

Contributor

remram44 commented Jun 15, 2015

@doutriaux1 The path is cdat_info.get_sampledata_path(), I also added it to vcs as vcs.sample_data because it already had vcs.prefix = cdat_info.get_prefix().

Changing vcs.sample_data to cdat_info... would require importing cdat_info everywhere.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Jun 15, 2015

also the changes in vcs_legacy are going to create a merge conflcit with PR #1369 which removes this directory all together.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Jun 15, 2015

@remram44 I guess it's ok, I don't really mind it, just thinking about a new user trying to create a new test and copying from these, they would never know about the "proper" way. I can live with it though. Should I merge then (after I ran ctest on this of course).

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Jun 15, 2015

@doutriaux1 that is a good point. I think it would be better down the road to have something other than vcs managing the data path but for now I think vcs is Okay. One think I should mention that importing vcs (before build) is not ideal since it seems that it needs vtk and other modules imported as well which won't be found until build.

turn off vcs tests when CDAT_BUILD_GRAPHICS=OFF
fixed other tests to NOT use vcs to detect path of sample_data

doutriaux1 added a commit that referenced this pull request Jun 18, 2015

@doutriaux1 doutriaux1 merged commit ef6b26c into master Jun 18, 2015

3 of 4 checks passed

continuous-integration/kitware-buildbot/uvcdat-test-laptop-linux-release/ Build done.
Details
continuous-integration/kitware-buildbot/uvcdat-garant-linux-release/ Build done.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@doutriaux1 doutriaux1 deleted the sample-data-location-updated branch Jun 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment