domino logo
4.5
  • Tech Ecosystem
  • Deployment-wide Search
  • Get Started
  • Security and Credentials
  • Collaborate
  • Organizations
  • Projects
  • Domino Datasets
  • External Data
  • Workspaces
  • Environments
  • Executions
  • Model APIs
  • Publish
  • Notifications
  • Domino Command Line Interface (CLI)
  • Troubleshooting
  • Get Help
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Projects
>
Domino File System Projects
>
Manage Project Files
>
Export Files as Python or R Package

Export Files as Python or R Package

If you organize the files in a project as an installable package, then you can choose to export it as such. When another project imports this project, Domino will automatically install the package at runtime, making it available to your code.

Export as a package
  1. Configure your project to export files.

  2. From Code Package, select the language.

    screen shot 2016 02 04 at 4.33.44 PM

The following describes the language-specific pattern required for any package.

R

See the official manual for an in-depth guide to writing R extensions.

In summary, each R package requires:

  • A directory called R/ with code files.

  • A directory called man/ with documentation files.

  • A file named DESCRIPTION, with each line following the pattern link:key>: <value[]. The 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 don’t know what to put here, exportPattern( "." ) works in many cases.

Python

See Packaging Python Projects for more details.

In summary, each Python package requires:

  • A setup.py file. This must contain a setup() function (imported from setuptools), with arguments as described in Packaging Python Projects.

  • A folder containing your Python modules and packages. Usually this is given the same name as the overall package.

  • Domino recommends that you also include a README file.

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.