If you organize the files in a project as an installable package, then you can choose to export it as such. When another project import this project, Domino will automatically install the package at runtime, making it available to your code.
To export as a package, configure your project to export files, and select the appropriate language under "code package".
The following describes the language-specific pattern required for any package.
For an in-depth guide to writing R extensions, see the official manual.
In summary, each R package requires:
-
A directory called
R/
containing code files. -
A directory called
man/
containing documentation files -
A file named
DESCRIPTION
, with each line following the pattern link:key>: <value[]. Required keys include:Package Version (for example,
0.1
) Title Description Author Maintainer (a name followed by an email address in angle brackets, for example,Sample Maintainer <maintainer@example.com>
) License -
A file named
NAMESPACE
that describes the namespace of the package. If you aren’t sure what to put here,exportPattern( "." )
can work in many cases.
For an in-depth guide, see this documentation.
In summary, each Python package requires:
-
A
setup.py
file. This must contain asetup()
function (imported from setuptools), with arguments as described here. -
A folder containing your Python modules and packages. Usually this is given the same name as the overall package.
-
It’s also a good idea to include some sort of
README
file.