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

Pull request for gslab_python#99: Add cache reconfiguration code #83

Merged
merged 10 commits into from
Sep 1, 2017

Conversation

arosenbe
Copy link
Contributor

Original issue gslab-econ/gslab_python#99

@yuchuan2016, can you please PR?

README.md Outdated
scons
2. Unzip `scons.zip` to `scons`.
```bash
unzip scons.zip -d scons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Windows does not support unzip command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, and I was torn on whether to include code for this step. I like the code because it shows exactly where we unzip to. Maybe a comment that says not windows? I'd also get rid of the code entirely if you think that's smarter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to have the code. Just make a note perhaps.

@yuchuan2016
Copy link
Contributor

@arosenbe , great! I only have one minor issue about unzip command above.

Another question, should we put scons files in config, or make it a separate directory? If a separate directory, we would have four top-level directories (analysis/paper_slides/config/scons), which does not look very nice...

@arosenbe
Copy link
Contributor Author

That's a good point about the directory structure @yuchuan2016. I think config could be a logical place for the scons directory. My worry with putting it there is the length of the command needed to run scons

python ../config/scons/scons.py

What do you think?

@arosenbe
Copy link
Contributor Author

@yuchuan2016,

Another option would be to edit the paths in scons.py to point to a scons-local directory stored in config. Let me show you what that looks like.

@yuchuan2016
Copy link
Contributor

@arosenbe , yes I agree that the command would become longer. Can we store the scons.py directly in config/, and everything else in config/scons?

@arosenbe
Copy link
Contributor Author

@yuchuan2016, I can do that. We could also keep separate scons.py scripts in analysis and paper_slides to cut down on notation even more. Which do you prefer?

@yuchuan2016
Copy link
Contributor

I'm fine either way.

@arosenbe
Copy link
Contributor Author

@yuchuan2016, can you take a look at the new commit? I wrote python scripts called scons.py to call the scons.py included in the scons-local distribution.

Copy link
Contributor

@yuchuan2016 yuchuan2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arosenbe , I have just tried another way. We can create a symlink in /analysis/ by typing ln -s ../config/scons/scons.py scons.py. This can prevent keeping duplicated files. What do you think?

cl_args = ' '.join(sys.argv)

# Create call
call = 'python ../config/scons/scons.py %s' % cl_args
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we make the path an argument?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not relevent, switching to symlink, but a good suggestion if it stayed relevant.

@arosenbe
Copy link
Contributor Author

@yuchuan2016 I really like the symlink idea. Will implement.

@qlquanle
Copy link
Contributor

Are symlinks platform-independent?

@arosenbe
Copy link
Contributor Author

arosenbe commented Sep 1, 2017

Symlinks are not platform independent 😿

@arosenbe
Copy link
Contributor Author

arosenbe commented Sep 1, 2017

@yuchuan2016, since symlinks are not platform independent, I switched back to the wrappers around scons.py. The difference is that these are called run.py. I also put information about how to use a global scons installation in the readme. Can you take a look?

Copy link
Contributor

@yuchuan2016 yuchuan2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have one comment below. After that feel free to merge

analysis/run.py Outdated
# Execute
subprocess.call(call, shell = True)

main()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be an argument in the main function. Same for the other.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱 You're right!

@arosenbe arosenbe merged commit 8c91db5 into 4.1.0 Sep 1, 2017
@arosenbe arosenbe deleted the gslab_python#99_cache branch September 1, 2017 15:22
qlquanle pushed a commit that referenced this pull request Mar 3, 2018
* Pull request for #62: Separate sub-directory for analysis and paper/slides (#72)

* #62 reorganize repo

* #62 add provenance

* #62 allow provenance to check missing files

* #72 response to PR and comments

* #72 small name change

* Pull request for #67: Create release/lg for large files (#73)

* #67 add code to fake lg dataset, add lg to gitignore

* #67 add lg protocol to readme.md

* Update constants.yaml

* #67 blow up data file to do large release

* #67 change hist in default stata code to limit number of pins

* #67 delete old logs

* #67 readme change

* #67 manually copy new analysis files to paper input

* rerun paper-slides

* Pull request: move top level logs to release (#75)

* #61 first pass

* #61 second pass

* #61 switch to single quote

* #93 aux first pass

* #93 first pass

* #93 second pass

* Pull request for #61: restructure YAML in template  (#74)

* #61 first pass

* #61 second pass

* #61 switch to single quote

* #61 rm config_template

* add instruction on switching required softwares

* rm unused config_user_template

* #97 testing anything template

* gslab-python#97 demonstration scripts

* Pull Request for #66: Force integration with gslab_stata (#77)

* #66 revise stata scripts

* #66 modify README

* #66 small change in readme

* #66 add note in README

* gslab-python#97 change generator syntax

* gslab-python#97 respond to PR

* Pull Request for #64: Port example scripts to multiple languages (#76)

* #64 add examples for python stata matlab R, mute everything except python

* #64 add example of latex

* #64 modify dependencies

* #64 turn on git-lfs

* #64 response to PR

* #64 update readme and modify sample code

* solve conflict after merge

* rm accidental commit of local scripts

* Pull Request for #63: Make current dependencies optional (#78)

* #63 add builder check

* #63 add autimatic config scripts

* #63 response to PR

* #63 change the default to not upgrade

* #63 force installing of gslab_python

* #63 small change per PR

* #63 small change

* Pull request for creating size warning when git-lfs not presented (#79)

* first pass on template

* add in size warning for paper dir

* fix bugs

* add in option for git attributes

* add in paper dir

* Pull request for documenting and organizing debrief  (#81)

* #69 first pass

* implement PR

* small edits

* small edits

* Pull request for gslab_python#99: Add cache reconfiguration code (#83)

* gslab-econ/gslab_python#99 switch to scons local

* gslab-econ/gslab_python#99 delete scons local, lfs track .zip

* gslab-econ/gslab_python#99 commit scons-local-2.5.1

* gslab-econ/gslab_python#99 scons python scripts for each sub

* gslab-econ/gslab_python#99 remove top-level scons.zip

* #83 gslab-econ/gslab_python#99 update commands in readme.

* 83 gslab-econ/gslab_python#99 symlink to scons.py

* #83 gslab-econ/gslab_python#83 scons.py -> run.py, mention global scons in readme

* #83 gslab-econ/gslab_python#99 arg in main call

* Pull request for #82: Update docs for 4.1.0  (#84)

* #82 readme for 4.1.0, fix scons in paper_slides, build_anything in analysis

* #82 update data download procedure

* #82 add jupyter notebooks to .gitignore

* #82 build_anything demonstration

* #82 output

* #82 uncomment builder

* #84 #82 instructions to connect analysis and paper_slides

* #84 #82 respond to PR

* #84 #82 more PR

* change template

* Pull request for #86: Integrate make_provenance into SConstruct (#87)

* #86 incorporate external logging from gslab-econ/gslab_python#131

* #87 #86 PR

* #132 #131 delete stray file

* #87 #86 comment out some builders in analysis/SConstruct

* Pull request for #88: Grab all paths when recording inputs (#89)

* #88 allow inputs specificed as str or dict

* #88 fix sconscript after flatten input in config_global

* pep8 e713 change

* Pull request for #90: Load PYTHONPATH in SCons ENV (#91)

* #90 store pythonpath

* #90 remove stray pythonpath definition

* Fix location of sconstruct.log.

* Capitalization in readme

* Pull request for #92: Turn off default logging during SCons dry-run (#93)

* #92 turn off logging on dry run, uses gslab-econ/gslab_python#141

* #93 #92 move dry-run checking for logs into gslab_python

* Fix typo in readme

* #95 switch to scons 3 (#97)

* Update SCons local version in README

* practice task

* realized my mistake and reverting

* Pull request for #96: Complete MG points 1-5  (#98)

* #95 switch to scons 3

* .#96 update to new builders and config and rerun

* #96 drop _ before anything builder

* #98 #96 rerun with new builders

* #98 #96 typo in README

* #98 #96 better advertise package dependencies in config scripts

* #98 #96 mention reset config_user in README FAQ
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