-
Notifications
You must be signed in to change notification settings - Fork 35
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
Update linking format and functionalities #10
Comments
Progress update: I've implemented all of the to-dos above on this branch. One note: I wrote the code such that targets in I'm going to test the code some more just to make sure I haven't introduced any bugs. After that, I'll start a new issue to work on documentation and user guides. |
@z-y-huang When I do a clean checkout of this repo and try to check out the issue 10 branch I get this error
My understanding is that this indicates files that should be tracked by git lfs were somehow committed directly (see e.g. here). Any idea what happened? This is perhaps a good point at which to make sure our git-lfs safeguards are working properly. |
Note: The commit above re-commits those output files as pointers to correct the issue. So to reproduce it you'll want to roll back to the previous commit. |
I don't seem to be able to install the Python library
I can install GitPython just fine. On quick googling it wasn't obvious to me what library we're trying to install. |
|
Debugging setup_repository.py
I went ahead and pushed fixes to the first two issues above. Feel free to change these if you think I did it wrong. |
On my clean checkout of the branch (following instructions in /setup/README.md to check out the submodule)
Does this mean that we've updated gslab_make to a newer version than was committed before? |
When I try to add a link to an external directory to the external object in config_user.yaml I get an error from setup_repository.py
It works fine if I add a file rather than a directory, like |
I'm getting an error when I try to add an external file to /data/externals.txt. I updated config_user.yaml to have
And then I update data/externals.txt to have
I also tried just
Both of these produce the error
|
|
(1) OK. That makes sense. But then there is some problem because it raises a warning for Matlab not being installed for me even though config.yaml says matlab is not required. (4) OK. That fixed the immediate issue. Thanks! Some additional
|
Something in the run_program directives is still not playing nicely with spaces in filenames. When I run /data/make.py I get an error because when it tries to create the Stata log file at |
I pushed a commit fixing the bugs in In terms of the path bugs, I'm going to research more into how software engineers usually handle paths for Python. Our current implementation is probably more hacky than ideal. Compiling changes we want to make:
|
Thanks. Looks good! |
I implemented the changes listed in this comment and fixed the issue with using For the error involving spaces in paths, it looks like that was actually specific to Stata. Apparently, when you run Stata in batch mode and the path you call has a space (e.g., I've found a workaround, but thought it would be worth documenting this quirk. |
Great. Thanks @z-y-huang. Just to be clear, you've implemented the workaround for the Stata paths issue? Or not yet? |
Small to dos:
|
I'm still getting frequent pointer errors. Is it possible something's wrong with your git LFS? The output below is after a clean checkout of the issue 10 branch.
|
|
@z-y-huang One other question. I just added /input as well to .gitignore thinking we would not want the /input/ directories to be committed. But I see that in the current version you have committed them. Is this intentional? Are we confident that git will play nice with committing simlinks? We've run into problems in the past where git can end up trying to operate on the link targets instead of the links themselves for some operations. |
Sorry for the continuing hassle on this, but I still seem to be getting the error related to the space in the paths for the stata logs. See below.
|
My understanding was that |
Just to double-check, what version Stata do you have? When you run |
Stata 14.2. We probably don't want to do anything that's incompatible with recent Stata versions. Running that command at the command line the log file in the cwd is called Dropbox.log. |
Hm, it looks like Stata is naming the log file as I would expect ( The error message indicates that the code can't find file I'll try to see if I can reproduce the error. |
Just to make sure, could you actually run the command: If that is indeed the case, a potential solution is that for I also just pushed a commit to reorder the priority in error checking for |
Yup. Your hypothesis seems correct and your fix looks like it works. See below. Can we escape the space character as well? I tested that and it seemed to work fine. If the only thing we're adding to the code is one regex in run_stata that escapes all special characters that doesn't seem too hacky at all. Note: The only reason this comes up is that Dropbox has this insane rule that once you connect to a business account you must name your directories "Dropbox (BusinessName)" and "Dropbox (Personal)". All kinds of people on forums complaining about it but seems to be no fix at the moment.
|
Escaping the space works, though Stata still saves the I also pushed a commit to escape special characters in the path for |
On the symlinks question here: I agree that we should add this to .gitignore. |
I went ahead and updated .gitignore and deleted the previously committed /input/ directories from the Repo. Tested the new Stata code and paths now work great! As far as I can see, we have now finished all the outstanding to dos. I would propose that you open a separate task to clean up the README.md. I think we should migrate what is currently in /setup/README.md/ to the top level README.md. It needs to be updated to correspond to the current setup (e.g., deleting the submodule stuff). Once that's done, we can go ahead and release beta v0.1! |
Oooh, sorry, one more issue I just noticed. When I add some things to /data/externals.txt and run /data/make.py the /external/ directory w/ links is created correctly, but it doesn't look like these files are getting logged in the link_*.log files. I had thought we'd said we'd include in those files info on both the /input/ and /external/ files. |
Hm, that should be the case and isn't an issue with my version. Do you mind committing your current setup to a test branch? |
Sorry! Looks like it was my mistake. I think the last time I'd re-run make.py I had reset the externals.txt file. When I try it now it works fine. |
Yay! I opened a task to update documentation and release. I'll close this task and merge in the branch to master. |
Summary:
|
…emplate accordingly (#12) * Begin updating config and analysis make.py for #8 * Update make.py scrips for #8 * Add functionalities to config for #8 * Clean up config for #8 * Change to requirements.txt for #8 * Add gslab_make submodule for #9 * Update gslab_make submodule to track issue8_update_template * Test git submodule * Test git submodule * Test git submodule * Change config to setup for #9 * Separate input and external folders for #9 * Implement linking changes for #10 * Clean up code * Add to setup documentation * Make local import more robust * #10 Correct files inadvertenly committed directly instead of as LFS pointers * #10 Bug fixes in setup_repository.py * Bugfix setup_repository.py for #10 * Removed submodule for #10 * Commit gslab_make, update template for new external.txt formatting * Bugfix gslab_make commit * Fix formatting for input.txt and external.txt for #10 * Add *external/ to .gitignore and organize lib directory for #10 * #10 Update .gitignore * #10 Fix LFS pointer error for gslab_make/tests/input/zip_test_file.zip * #10 Fix LFS pointer errors for paper_slides PDFs * #10 Add input directories to .gitignore * Update path to look for gslab_make for #10 * Reorder error checking for bugfixing * Escape special characters in path for run_stata for #10 * #10 Remove input directories -- will be ignored by git going forward * #10 Correct format of external and input in .gitignore * Fix typo * Update documentation for #10
Continuation of to-dos discussed in #9.
link_map.log
link_map.log
should be printed relative to the module rootinput.txt
should be communicated relative to the repository rootexternal.txt
should be communicated using keys forconfig_local.yaml
The text was updated successfully, but these errors were encountered: