Please keep in mind that doing this review is an experiment, and I am hoping to have a positive outcome. I do not mean to intrude, or hijack Martijn's package, and I do respect his choices, whatever those may be.
I am making these comments in the hope to benefit both the developer and the user community.
I also hope that others will spontaneously comment on my own work in a similar manner!
Due to lack of time, the below observations will be a bit superficial. I might try to dive deeper later.
init.m
Kernel/init.m
is run when $Context
is still Global`
. Any non-System symbols you use in this file will pollute the Global namespace. Try to avoid this. When the package gets loaded, it should not create any symbols in Global.
I have seen the following update of the context path multiple times:
$ContextPath = Union[$ContextPath, System`$UNETContextPaths];
Note that this reorders the context path!! That includes not having System and Global at the very end, where they should be.
Please don't do this. It will cause unexpected and hard to track down problems for your users.
I noticed that all symbol names are Remove
d at the start. Maybe I am missing something, but such drastic measures are not usually necessary. ClearAll
will do fine.
Note that constructs like ClearAll["foo`*"]
or Protect["foo`*"]
do work. SetAttributes["foo`*", ReadProtected]
does not work, but SetAttributes[Evaluate@Names["foo`*"], ReadProtected]
does. Note that none of these constructs introduce any new symbols, thus they are convenient to use in init.m
.
Consider not printing anything during package loading without good reason. Note that people might load the package as part of another package. They might even load it on subkernels.
(I do believe that sometimes there is a practical reason. I do it with my IGraph/M package, though I suppress printing when I can detect that IGraph/M is loaded as part of another package. I keep the printed message as small as possible, yet some users still complain about it. It can be suppressed with Block[{Print}, Needs["..."]]
)
Usage messages
I wanted to note that it's great that you took care to make them work well with auto-completion.
Miscellaneous
size
is not localized in VisualizeUNET2D
.
AddLossLyaer
is misspelt in the doc guide page.
UNET
symbol link doesn't work in the docs. Was this renamed to MakeUNET
?
Cosmetic
Make the version shown in PacletInfo match the actual version. It's show in the doc browser.
Compatibility
Indicate in the README which Mathematica version is required and try to test with that version. The IDEA WL plugin is capable of highlighting symbols not present in the WL version you set. It's useful for detecting certain compatibility problems early. http://wlplugin.halirutan.de