MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Managing packages in the workbench

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108571] Re: Managing packages in the workbench
  • From: Hannes Kessler <HannesKessler at hushmail.com>
  • Date: Wed, 24 Mar 2010 04:40:33 -0500 (EST)
  • References: hoa1ao$fem$1@smc.vnet.net

Thanks David for your comments and the hint to the "Kernel"-extension.
The basic structure you mentioned works of course.

However, I have all my packages (many) in a logical hierarchical
directory structure in the private Applications folder. It works fine
in Mathematica. Rearranging this package system to a plain directory
structure requires a lot of package context editing and a lot of time.
That's my problem. In addition, much of the order is lost. For this
reason I was hoping that it is possible to add help files to the
package system in its present order.

Best regards,
Hannes Kessler

On 23 Mrz., 10:23, "David Park" <djmp... at comcast.net> wrote:
> Basically, I wouldn't mess around with the default settings. When deployi=
ng
> the application check the $UserBaseDirectory box to determine the locatio=
n
> and deploy to there, which should be your private Applications folder. I
> think you may have gotten an extra Math directory into your structure and
> then Mathematica won't find the documentation.
>
> When creating a new application, "MyApplication" (say):
>
> 1) Create an Application Project with name "MyApplicationProject" (say).
>
> 2) Give the application the name "MyApplication". This will also be the
> PacletName. The paclet name is the same as the application name. You can
> have more than one package but they will all be in the same application a=
nd
> all their routines be documented under the same single paclet.
>
> 3) WRI seems to concentrate on the case where there is only a single pack=
age
> and the package name is the same as the application name. In that case, y=
our
> package name would be MyApplication`MyApplication.m. The BeginPackage
> statement would be BeginPackage["MyApplication`MyApplication`"] and the
> entire application would be contained in a MyApplication folder directly
> within your $UserBaseDirectory/Applications folder. The init.m file would
> contain the statement Get["MyApplication`MyApplication`"] and the package
> could be loaded with <<MyApplication`, which will evaluate the init.m fil=
e.
>
> 4) But you might want to give the package a different name than the
> application, or you might have several packages. Suppose you have two
> packages: PackageA.m and PackageB.m, with
> BeginPackage["MyApplication`PackageA`"] etc. The init.m file would load b=
oth
> packages. All packages would still be loaded with <<MyApplication`.
>
> 5) But there is one caveat. To get all the usage message links you have t=
o
> add an undocumented specification to PacletInfo.m. Under Extensions -> ad=
d
> an item:
>
> {"Kernel", "Context"->
> {"MyApplication`PackageA`","MyApplication`PackageB`"}}
>
> Not only is this undocumented, but it will display warning messages in th=
e
> PacletInfo.m display. It will also display an "Unknown" folder in the
> Extensions tab. The warnings can be ignored. I assume this will be
> straightened up in the next release.
>
> That's the basic structure. I wouldn't experiment with putting things in =
out
> of the way places until you can get the basic structure working. You shou=
ld
> be able to go with the default settings for locations.
>
> David Park
> djmp... at comcast.nethttp://home.comcast.net/~djmpark/ 
>
> From: Hannes Kessler [mailto:HannesKess... at hushmail.com]
>
> Hello,
>
> the threadhttp://groups.google.de/group/comp.soft-sys.math.mathematica/br=
owse_t...
> hread/a67d924983da8c34#
> has several good recommendations for the transition to the workbench,
> thanks to John Fultz, Albert Retey, Adam Berry, David Park and others.
> Nevertheless, I was not successful to get my packages into workbench
> management and need som further advice. The Workbench help system
> wasn't really helpful as all concrete examples relate to the trivial
> standard case. Anyways, here is my problem with an example:
>
> I imported the NumericalAnalysis project from the Wolfram website
> (http://www.wolfram.com/products/workbench/examples/
> ExampleProjects.zip) to the Workbench. Next, I modified In
> NumericalAnalysis.m the BeginPackage statement to
> BeginPackage["Math`NumericalAnalysis`"] and in init.m the Get
> statement to Get["Math`NumericalAnalysis`NumericalAnalysis`"]. Then I
> built the documentation in the ApplicationTools and exported the
> application to the directory $UserBaseDirectory/Applications/Math/
> (instead to the standard $UserBaseDirectory/Applications). The
> resulting basic file structure is
>
> $UserBaseDirectory/Applications/Math/NumericalAnalysisDocumentation/..
> $UserBaseDirectory/Applications/Math/NumericalAnalysis/Kernel/init.m
> $UserBaseDirectory/Applications/Math/NumericalAnalysis/
> NumericalAnalysis.m
> $UserBaseDirectory/Applications/Math/NumericalAnalysis/PacletInfo.m
>
> Needs["Math`NumericalAnalysis`"] works as expected, but the
> documentation is not found.
>
> I played with the project settings "Paclet Location" and
> "Documentation Location" (setting these to Math/NumericalAnalysis and
> Math/NumericalAnalysis/Documentation). I tried also modifying the
> PacletInfo.m file with Extensions -> {{"Documentation", Resources ->
> {"Guides/NumericalAnalysis"}, Language -> "English", LinkBase ->
> "Math"}}, but without any success. The NumericalAnalysis help files
> were not found. So how should one modify the standard Workbench
> settings to make the help files accessible?
>
> Help is greatly appreciated.
>
> Best regards,
> Hannes Kessler



  • Prev by Date: Re: Calling kernel.dll from Mathematica
  • Next by Date: An open note for all the Mathematica
  • Previous by thread: Re: Managing packages in the workbench
  • Next by thread: Re: Managing packages in the workbench