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

Sample data location updated #1390

Merged
merged 11 commits into from
Jun 18, 2015
Merged

Sample data location updated #1390

merged 11 commits into from
Jun 18, 2015

Conversation

aashish24
Copy link
Contributor

Updated branch for #1363.

remram44 and others added 10 commits June 4, 2015 00:57
It makes more sense, and is not completely impossible to find on OSX
anymore.
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
Copy link
Contributor

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

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
Copy link
Contributor

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

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

@doutriaux1
Copy link
Contributor

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

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

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
@doutriaux1 doutriaux1 deleted the sample-data-location-updated branch June 18, 2015 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants