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 ...
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 <...
Community wiki
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 ...
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 ...
Community wiki
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....
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
17
votes
Accepted
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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
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 <...
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.
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:
...
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 ...
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 ...
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" ...
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 (...
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'...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
packages × 886contexts × 84
documentation × 31
paclets × 31
front-end × 30
plotting × 27
functions × 27
physics × 27
differential-equations × 23
compatibility × 23
feyncalc × 23
scoping × 22
programming × 21
notebooks × 21
development × 21
import × 19
tensors × 17
symbols × 16
workbench × 16
graphs-and-networks × 15
interoperability × 14
function-construction × 13
symbolic × 13
parallelization × 13
files-and-directories × 13