-
Notifications
You must be signed in to change notification settings - Fork 159
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
Refactor migrate.project() and fix version tests #162
Conversation
…roject() and test-version files
…d messages during migration
@KentonWhite, now that I've slept on it, I'm not happy how I've done this. It's very brittle to emit a warning at the end, and also very confusing for the user. Also, future migration tests might make this more confusing The only reason i did this was because existing tests broke without the warning in this function. What I'd rather do an explicit message in the right place and update the existing tests. What do you think? |
@connectedblue What tests broke without the warning function? It might be a faulty test (that happens). |
@KentonWhite , these are the tests that fail if there is no warning emitted:
I haven't investigated yet why they are. I'll have a look tonight to see if I can figure it out. |
@connectedblue I think what may be happening is that the I think the directory for this file should be renamed as it is confusing! |
@KentonWhite I'm not sure that's the cause - on this new branch Having investigated some more, this is the offending line:
So this is kind of what I expect - the test has failed because no warning is omitted. Let me make a couple of changes to the messages and I'll update this test to test for a message rather than a warning. I'm making a bit of a meal of this - it's actually a lot simpler than I'm making out .... |
…ted existing test to expect message rather than warning
…fig function and also moved the tidy_up() function into the run-all script so it can be accessed in different tests
…the travis checks on github
Phew ... that was more tricky than it should have been. Thank goodness for the regression tests. @KentonWhite this PR is ready for review now. The refactor of |
Sorry @KentonWhite, I got into a pickle with git to try and align with the latest master branch which I didn't need to do, so I rolled back those changes. Anyway, this PR is ready for review now ... |
cf11b4d
to
18eda90
Compare
@connectedblue Traveling this week. Will probably need to postpone the review until I'm back in the office. |
Thanks @KentonWhite, enjoy your travels. |
Have you heard about the DNS hack? I'm not sure, but it may be related... On Fri, Oct 21, 2016 at 16:32 connectedblue notifications@github.com
|
@connectedblue Changes look good. |
This PR is the first step of merging of #160.
This PR proposes a refactor of the
migrate.project()
logic to allow for more flexible handling in future migrations. There is no logic change in this PR, however the function now does the following:.load.config
is calledThis structure allows for config specific handling (as will be done in #160 ) and also other types of check can be performed such as checking for certain file extensions in the data directory if there has been a change to the way the reader handles the data import, for example.
This PR also contains a minor change to the
test-version
tests which incorrectly created atest_project
in the current working directory rather than in a tempfile like the other tests. The tests themselves were not altered.