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

Split test code from library and merge with test data #87

Closed
GoogleCodeExporter opened this issue Apr 4, 2015 · 5 comments
Closed

Split test code from library and merge with test data #87

GoogleCodeExporter opened this issue Apr 4, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

In order to reduce the number of binary packages (Issue #83) it makes more sense to merge test cases with the test data. At the same time we still want test cases to be committed together with the code changes.

Therefore we will reorganise the layout of the repository to look something like this:

   /mdanalysis
              /package
              /tests

where package will contain the current trunk without MDAnalysis/tests and tests will contain MDAnalysis/tests together with the test data.

Because git is much better at handling these kind of splitting/merging operations we will do this once the repository has been gittified (Issue #86).


Original issue reported on code.google.com by `orbeckst` on 19 Nov 2011 at 4:00
* Blocked on: #86
@GoogleCodeExporter
Copy link
Author

(If anyone else feels they would like to do this please grab the ticket!)

Original comment by orbeckst on 19 Nov 2011 at 4:06

  • Changed state: New

@GoogleCodeExporter
Copy link
Author

Original comment by orbeckst on 6 Dec 2011 at 6:18

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

I'm looking for suggestions on some git magic to create the new layout as per 
the first comment.

My idea was to
1. somehow merge testdata back into master
2. git mv files into separate directories

The plan is flawed, though: Just merging replays all the deletions that were 
used to split the test data from the code in the first place.

What I have at the moment strikes me as rather un-elegant (and it looses 
history):
1. git mv master-stuff package
2. git checkout testdata MDAnalysisTestData  # just gets the files but they 
appear as "new" -- looses history
3. git mv stuff around...


Any suggestions how to use git to merge the testdata back into master? 
Cherry-picking?

Thanks,
Oli




Original comment by orbeckst on 19 Dec 2011 at 2:03

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Ok, I just played a little with git (and google) and here is what I think 
should work as needed:

Prepare the master branch:
1. git checkout master
2. git mv stuff into package dir
3. git commit

Prepare the testdata branch
1'. git checkout testdata
2'. git mv stuff into tests dir
3'. git commit

And then do the merge:
4. git checkout master
5. git merge --squash -s resolve testdata
6. Check that everything is OK
7. git commit

The "--squash" if just to stop the merge process before committing.
The trick is using "-s resolve" when performing the merge: I tried this locally 
and everything went smoothly without any conflict nor history loss.
Git is really awesome!

Original comment by sebastie...@gmail.com on 20 Dec 2011 at 10:34

@GoogleCodeExporter
Copy link
Author

Thanks, Séb, that was some good git-voodoo.

I renamed the tests directory to testsuite and did various adjustments. See 
comments for commit 30e21da161. Seems to work but feedback is most welcome.

The wiki and other docs needs to be updated. If anyone finds anything that is 
obviously wrong please correct as needed. Thanks.

Oli

Original comment by orbeckst on 21 Dec 2011 at 10:20

  • Changed state: Fixed

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

No branches or pull requests

1 participant