Comments (10)
Note that our current release protocol has an issue when objects have the same name, but different paths. See below code for what should fix it:
if DriveReleaseFiles != '':
env.Alias('drive', local_release)
DrivePath = DriveReleaseFiles
for i in range(len(DriveReleaseFiles)):
env.Install(os.path.join(local_release, os.path.dirname(DriveReleaseFiles[i])), DriveReleaseFiles[i])
path = DriveReleaseFiles[i]
DrivePath[i] = 'release/%s/%s/%s' % (dir_name, vers, path)
with open('gdrive_assets.txt', 'w') as f:
f.write('\n'.join(['Google Drive:'] + DrivePath))
upload_asset(token, org, repo, release_id, 'gdrive_assets.txt')
os.system('rm gdrive_assets.txt')
from gslab_python.
From gslab-econ/template#19 (comment), we also want a tool that checks the size of files that will be versioned in release.
I do think we should impose a cap as a default, though we can decide to break it in special cases. Maybe 2 MB? That should give us room to store PDFs but not let us store anything that's going to impose a significant cost. We may also want to impose a separate cap on the total size of the /release/ directory that can be versioned. Maybe 500 MB?
If we impose a cap, we should think about if there's a way to enforce it with code. One possibility is to write a little python script that walks the release directory skipping things in .gitignore, then outputs a warning if you're over the cap. A second is to use some kind of commit hook in Git. I think I like the warning version better since it's less likely to be a source of bugs and it will be easy to override if we want to.
from gslab_python.
I am going to start working on this.
from gslab_python.
Per conversation today at noodles, we probably want some functionality that allows for zipping files in the release.
from gslab_python.
Update: this task is under peer review at #36.
from gslab_python.
Update: this task is under peer review at #36.
from gslab_python.
With #36 pulled in, is this issue completed?
from gslab_python.
@stanfordquan - No, as I still need to look into an error that @arosenbe encountered in this issue's /template/ pull request. If the completion of this issue is a prerequisite for a priority of yours, I can focus on resolving this error in coming work hours.
from gslab_python.
Not at all, don't worry. I looked over the commit history and looks like unit tests are done and dusted, so I don't need to work on that! Thanks.
from gslab_python.
This issue has passed peer review at #36 and gslab-econ/template#21. So I am closing it now.
Summary
- I released GSLab Tools 3.0.0, which adds functionality for making releases from SCons/GitHub repositories to GitHub and to Google Drive to
gslab_scons
. This functionality is described in gslab_scons/README.md. - The
release.py
scriptgslab_scons
checks that versioned files are not overly large and that the repository from which the user is making a release is up-to-date (i.e. that SCons has built all of the repository's targets and that changes have been committed with git). - I revised code in the large template to be compatible with
gslab_scons
's new release functionality.
from gslab_python.
Related Issues (20)
- JMS: Review 4.1.0 HOT 6
- Single file state of inputs HOT 2
- Fix order of operations in release HOT 4
- Allow parallelization in MATLAB builder HOT 2
- Do gslab_python side of MG review for 4.1.0 HOT 2
- make_list_if_string-related bug HOT 2
- Logging breaks if a folder has space in its name HOT 1
- Anything builder changes SCons env in place HOT 1
- Add PyTest runner dependency HOT 1
- #154 Installation is unsuccessful every other time HOT 3
- Missing import in matlab builder? HOT 2
- Remove unused argument in start_log HOT 2
- git-lfs command deprecated? HOT 6
- reading windows paths HOT 12
- Error parsing gslab_tools version HOT 4
- Fix hanging matlab errors HOT 27
- Remove mmh3 dependency HOT 1
- Create Mathematica builder HOT 13
- `cl_args` incorrectly passed to LaTeX builder
- SaveData for Python HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gslab_python.