Skip to main content
54 votes
Accepted

How to distribute Mathematica packages as paclets?

The following answer is not complete, but does give one possible solution. There's a lot more to learn about the paclet manager, so please contribute another answer if you can, or correct this answer ...
Szabolcs's user avatar
  • 236k
44 votes
Accepted

PacletInfo.m documentation project

This is a community project to produce useful documentation for PacletInfo.m. Feel free to edit and improve this answer. While the Paclet Manager is loaded from <...
39 votes

Declaring Package with dependencies in multiples files?

Preamble I will interpret your question as a general question on how one can organize multi-file projects in Mathematica / WL. There are two main axes in this problem, and they are Loading procedure ...
Leonid Shifrin's user avatar
33 votes
Accepted

What to be aware when using new-style package?

I will give a FAQ-style presentation of some things I became aware of while transitioning one of my packages to this format. Leonid's description of the new package format is required reading before ...
31 votes
Accepted

Computational Bayesian analysis in Mathematica: Any plans to develop MCMC?

Update: 2/7/2019 I have just released a new version of the package: MathematicaStan v2.0 I just have released a beta version of MathematicaStan, a package to interact with CmdStan. https://github....
Picaud Vincent's user avatar
30 votes
Accepted

3D rigid body physics engine

Since this answer was originally posted, the Blender software package has undergone significant revision causing the Python scripts to break. I have modified the scripts so that they should work from ...
Tim Laska's user avatar
  • 16.4k
28 votes

Computational Bayesian analysis in Mathematica: Any plans to develop MCMC?

For the sake of completeness let me advertise someone else's code which implements MCMC in mathematica. Josh Burkart has implemented Mathematica Markov Chain Monte Carlo which is available on github....
chris's user avatar
  • 23.1k
28 votes

Pop-up appeared and then disappeared during first documentation search in 11.2

Version 11.2 features a completely rewritten documentation search system. This version is incompatible with the search indices created by previous versions, nor can previous versions read the new ...
Itai Seggev's user avatar
  • 14.2k
25 votes

How to distribute Mathematica packages as paclets?

Szabolcs answer shows how we can build a .paclet, but the PacletManager also contains the possibility to serve packages from an own site. As I realized after writing this, most of the information here ...
Albert Retey's user avatar
  • 23.6k
25 votes
Accepted

How to download "ResourceFunction" packages onto a notebook, so I can place it in a USB and access it on a different computer

Putting my comment into an answer, since it seems to have solved the question You can use ResourceFunction["PacletizeResourceFunction"] to package a ...
Lukas Lang's user avatar
  • 34.4k
23 votes

What are the recommended settings for git when using with Mathematica projects?

The solution I am currently using is to work with *.wls script files. You can do nearly all the things you do with usual *.nb notebooks files (as shown in my screen shot). The big advantage is ...
Picaud Vincent's user avatar
22 votes
Accepted

How can I install packages distributed as .paclet files?

Update: The paclet-related functionality is documented in Mathematica 12.1. See PacletInstall. This answer is for people who are not interested in package ...
21 votes
Accepted

Package organization

The key point is not to set the usage message between BeginPackage and Begin["`Private`"], but just to mention the symbol. A ...
Szabolcs's user avatar
  • 236k
18 votes

Package organization

It is possible, your code works. I don't see any downsides which aren't a matter of taste. I like to keep usages next to definitions too. But I hate using full names, you can just mention symbols in ...
Kuba's user avatar
  • 137k
17 votes
Accepted

Import package with correct symbol contexts

...
Kuba's user avatar
  • 137k
17 votes

Mathematica Syntax Coloring in GitHub README

It seems to have been possible at least since March 16th 2016 and probably earlier (thanks to jkuczm) I found it here (cannot remember how I ended up there). Here's another example using it. If we ...
b3m2a1's user avatar
  • 47k
16 votes

What are the recommended settings for git when using with Mathematica projects?

A new possibility is to use mathematica-notebook-filter which parses Mathematica notebooks and strips all output cells and metadata so that these are not committed ...
JP-Ellis's user avatar
  • 1,037
16 votes

Creating Mathematica packages

Quick start tutorial This is a quick start guide on how to set up a package following the typical structure. It does not explain why it is usually done that way, and it does not discuss other ...
16 votes
Accepted

How to remove a paclet downloaded from Wolfram Research Server?

Use PacletFind to find the installed versions, of the paclet, for exmaple: ...
Itai Seggev's user avatar
  • 14.2k
16 votes
Accepted

Attempts at backwards compatibility

If you just want backwards compatibility, there is no need to create any symbols in the System context. It seems like a bad idea to do such things. A package should create symbols only within its ...
Szabolcs's user avatar
  • 236k
15 votes
Accepted

Why SciDraw can not handle the StreamPlot?

In short, this is due to a behaviour in Mathematica's graphics rendering that seems intentional, but it is very strange in this particular context: Scaled ...
Szabolcs's user avatar
  • 236k
15 votes
Accepted

Bulletproofing packages against SetOptions of built-ins

The approach This seems to be a good case for applying some run-time metaprogramming / introspection. The idea would be to patch the already constructed definitions after they have been created, at ...
Leonid Shifrin's user avatar
15 votes

Making a website with Mathematica

In my opinion, Mathematica's XML template feature makes this quite easy. You'd write your HTML code for each page using XML templates, and then populate the templates with data as necessary using <...
C. E.'s user avatar
  • 71k
15 votes

Why do people split packages in different files?

Because I really don't like working on code where the file has more than about 2,000 lines. It's terribly distracting and makes it hard to find that bit of code I'm looking for.
Jason B.'s user avatar
  • 69.6k
14 votes

Computational Bayesian analysis in Mathematica: Any plans to develop MCMC?

This answer gives explicitly a (parallel) MCMC implementation in mathematica following closely this Wolfram Demonstrations Project. This basically involves only a few lines: ...
chris's user avatar
  • 23.1k
14 votes

Package MathWorld

Yes, unfortunately, it has proved not feasible to keep the 5000+ MathWorld notebooks as well as the packages you refer to up-to-date with the latest Mathematica functionality. As a result, I wouldn't ...
Eric W's user avatar
  • 381
14 votes

Sharing small code snippets

Gists API Snippets My first version of this involves the Gists API for GitHub. As Leonid notes, the Gists API makes sharing small pieces of code pretty easy. I also cooked this into my general ...
b3m2a1's user avatar
  • 47k
14 votes

Best practices for using the Testing Framework

Testing notebooks or .wlt test files? I use both. I create the tests in a notebook, but keep a .wlt file for automated test runs. This is my workflow: I start by creating a new "Testing Notebook" ...
Jason B.'s user avatar
  • 69.6k
14 votes

Best practices for using the Testing Framework

After I have spent some time developing my package MeshTools and experimenting with testing workflows I am coming back to report my experience. I have put tests (...
Pinti's user avatar
  • 6,523
14 votes

How to unload a Mathematica package?

Depending on your definition of "unload", it may be enough to remove the package's contexts from $ContextPath. The symbols will still exist in your kernel, but you'...
Brett Champion's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible