6
$\begingroup$

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 http:// instead of 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 PacletSiteUpdate to 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 PacletSiteRegister?
  • How is a paclet site checked for consistency by PacletSiteUpdate and upon what conditions PacletSiteUpdate find 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.

| improve this question | | | | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.