Skip to content

ScPo-CompEcon/InstantiateFromURL.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InstantiateFromURL

A way to bind dependency information to Julia assets without the need to pass around TOML files

Will download, unpack, and activate a tarball of the resources in pwd/.projects

Based on Valentin Churavy's idea in JuliaLang/IJulia.jl#673 (comment)

Overview

GitHub repositories are expected to include a Project.toml and Manifest.toml file in the root directory, and all other files are ignored. For ex: QuantEcon/QuantEconLecturePackages

All of the following are valid calls:

  • activate_github("QuantEcon/QuantEconLecturePackages"), which saves to .projects/QuantEconLecturePackages-master
  • activate_github("QuantEcon/QuantEconLecturePackages", tag = "master"), which gives us the same thing.
  • activate_github("QuantEcon/QuantEconLecturePackages", tag = "v0.1.0"), which saves that version to .projects/QuantEconLecturePackages-v0.1.0
  • activate_github("QuantEcon/QuantEconLecturePackages", sha = "0c2985"), which saves that commit to .projects/QuantEconLecturePackages-0c2985

You can also call any of the above with ; force = true, which will force a re-download of the source resources.

There's also a non-exported copy_env(reponame, oldprefix, newprefix) which will let you:

activate_github("QuantEcon/QuantEconLecturePackages")
copy_env("QuantEcon/QuantEconLecturePackages", "master", "mymaster")
activate_github("QuantEcon/QuantEconLecturePackages", tag = "mymaster") # Protected from future updates. 

No GitHub API calls are consumed, so rate-limiting is not an issue

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Julia 100.0%