Comments (3)
It is not at all clear though which release is the "latest".
Suppose I release version 2.0.0 in January, version 3.0.0 in June and version 2.0.1 in July. Which one is the latest?
I think GitHub does not know about version numbers, only tag names and dates.
Using the "created_at"
date is probably a good compromise.
json = Import["https://api.github.com/repos/szhorvat/IGraphM/releases", "JSON"];
json = Replace[json, x : {__Rule} :> Association[x], {0, Infinity}];
latest = SortBy[json, #"created_at" &] // Select[Not[#draft] &] // Last
from mpm.
Those are good points. I think "latest"
should be left as default/optional as it is now, and behave as GitHub defines it. I don't want 'latest' to mean something different than it means in context of the specific paclet repository, here GitHub.
It should probably not be advertised so much though. We can introduce e.g. "newest" version spec which will take the latest(by date) from those which are fetched.
And which are fetched should be affected by options "AllowDrafts" and "AllowPrereleases". By default both should be False, imo, because most of users will be interested in latest stable release.
Another option that comes to my mind is "Release", which should take "latest", "newes", or a specific version tag, but should also allow operators like MinimalBy[Key["created_at"]], what do you think? I guess that is the least important issue here.
from mpm.
@szhorvat as of v0.5.1 this should install the most recent release even if it is a prerelease:
MPMInstall[author, paclet, "AllowPrereleases" -> True]
see release notes and let me know if that works.
Drafts are not supported yet because you need to be authenticated by GH and have push rights to fetch them. Have to think how make that user friendly and robust.
from mpm.
Related Issues (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 mpm.