With the paclet management framework made public in v12.1, I am eager to automate package distribution and update via paclets over the net. Stephen Wolfram mentioned in this post about v12.1 that they inted to make their paclet repository open to anyone in the near future.
However, I want to host a private server (for company policy reasons) to serve paclets for users who have minimal experience with Mathematica. Therefore I cannot expect them to do anything more complicated than
PacletInstall["MyPaclet"] any time I roll out a new version, assuming they have already registered the server (which is done only once as paclet sites are persistent). Paclet (
PacletObject) and paclet site (
PacletSiteObject) management is certainly more polished in v12.1 than before, but I fail to set up my own site (e.g. a GitHub repo) as a paclet server. I have a GitHub account and I've uploaded the generated
PacletSite.mz, but whatever I try, I get this error, which is not very informative. Did I use a wrong URL? Is the
PacletSite.mz file wrong? Or code could not find it?
PacletSiteUnregister["MyGitHub"]; PacletSiteRegister["http://raw.githubusercontent.com/IstvanZachar/[...]", "MyGitHub"]; PacletSiteUpdate["MyGitHub"] PacletSiteUpdate::err: An error occurred attempting to update paclet information from site http://raw.githubusercontent.com/IstvanZachar/[...]. Does not appear to be a valid paclet site
I have many questions, but here are the essential ones. This post (and answers) may serve as a knowledgebase for paclet server setup for a wide range of use cases.
- How to host a paclet server in an arbitrary location (i.e. other than the Wolfram Cloud or local)?
- What are the requirements for a site to qualify? Must use
https://? Should transparently provide path for (sub)directories and files (like GitHub and unlike Google Drive)?
- What are the minimum requirements for the paclet server for
PacletSiteUpdateto be able to successfully query an uploaded
PacletSite.mz? What other files needed to be there? I assume that actual paclet files are not needed for testing
PacletSiteUpdate, as it uses the descriptor
PacletSite.mz, but I may be wrong.
- What protocol to use and how to refer to site architecture when registering the site via
- How is a paclet site checked for consistency by
PacletSiteUpdateand upon what conditions
PacletSiteUpdatefind a site a
valid paclet site?
I am aware of these posts, but they are from 2-4 years before (using now obsolete functions) plus I could not create a working paclet server based on them.
- How to distribute Mathematica packages as paclets?
- How can I use GitHub as a paclet server?
- Finding paclets on a server
- Installing a Paclet from GitHub (or other non-paclet server site)
- How can I set up a local paclet server? (easy package sharing via shared DropBox)
- Hosting a curated data function / server in Google Drive
- Create your own Paclet Site