Skip to main content
Skip table of contents

Best Practices

Overview

The following are best practices to follow when developing and packaging Add-ons.

Naming

There are four factions that should be considered when naming an Add-on.

  1. Choose a unique Add-on identifier. This is a string that identifies your Add-on. It should be a reverse domain name, which means that it should start with the top-level domain (e.g., com, edu, org) and then be followed by the name of your company or organization, followed by the name of your Add-on. For example, if your company is called Seeq and your Add-on is called Example, your Add-on identifier would be com.seeq.addon.example.

  2. Include the version number in the file name. The version number is a string that indicates the version of your Add-on. It should be specified as major.minor.patch, where major is the major version number, minor is the minor version number, and patch is the patch version number. For example, if your Add-on is currently in version 1.0.0, the version number in the file name would be 1.0.0.

  3. Use the .addon extension. The .addon extension is the standard extension for Add-on files.

  4. Use a consistent naming convention for all of your Add-on files. This will make it easier to keep track of your Add-ons and to find them when you need them.

Here is an example of a correctly named Add-on file:

com.seeq.addon.example-1.0.0.addon

Python Packages

When developing Python AddOnTool and DataLabFunctions elements, try to use the versions of libraries that are already in the image if available instead of pip installing a different specific version. You can see what’s already available by running PYTHONUSERBASE=/usr/local pip list in the Data Lab terminal. Following this best practice reduces the storage used and the amount of time it takes to install an Add-on.

Available library versions as of 3/28/23
CODE
datalab@jupyter:~$ PYTHONUSERBASE=/usr/local pip list
Package                        Version
------------------------------ -----------
anyio                          3.6.1
argon2-cffi                    21.3.0
argon2-cffi-bindings           21.2.0
asttokens                      2.0.5
attrs                          21.4.0
Babel                          2.10.1
backcall                       0.2.0
beautifulsoup4                 4.9.3
bleach                         5.0.0
Bottleneck                     1.3.2
CacheControl                   0.12.11
certifi                        2022.12.7
cffi                           1.15.0
charset-normalizer             2.0.12
chevron                        0.13.1
cleo                           2.0.1
colorama                       0.4.4
crashtest                      0.4.1
cron-descriptor                1.2.24
cryptography                   39.0.1
cycler                         0.11.0
debugpy                        1.6.0
decorator                      5.1.1
defusedxml                     0.7.1
Deprecated                     1.2.12
distlib                        0.3.6
dulwich                        0.20.50
entrypoints                    0.4
executing                      0.8.3
fastjsonschema                 2.15.3
filelock                       3.10.7
fonttools                      4.33.3
gitdb                          4.0.9
GitPython                      3.1.31
greenlet                       1.1.2
html5lib                       1.1
idna                           3.3
importlib-metadata             4.11.3
importlib-resources            5.7.1
ipykernel                      6.15.0
ipylab                         0.5.2
ipython                        8.10.0
ipython-genutils               0.2.0
ipyvue                         1.7.0
ipyvuetify                     1.8.2
ipywidgets                     7.7.0
jaraco.classes                 3.2.3
jedi                           0.18.1
jeepney                        0.8.0
Jinja2                         3.1.2
json5                          0.9.8
jsonschema                     4.5.1
jupyter_client                 7.3.5
jupyter_core                   4.11.2
jupyter-server                 1.17.1
jupyter-server-mathjax         0.2.5
jupyterlab                     3.4.8
jupyterlab-git                 0.39.3
jupyterlab-language-pack-de-DE 3.4.post5
jupyterlab-language-pack-es-ES 3.4.post5
jupyterlab-language-pack-fr-FR 3.4.post5
jupyterlab-language-pack-ja-JP 3.4.post5
jupyterlab-language-pack-pt-BR 3.4.post5
jupyterlab-pygments            0.2.2
jupyterlab-server              2.14.0
keyring                        23.13.1
kiwisolver                     1.4.2
lockfile                       0.12.2
Mako                           1.1.4
Markdown                       3.4.1
MarkupSafe                     2.0.1
matplotlib                     3.5.1
matplotlib-inline              0.1.3
mistune                        0.8.4
more-itertools                 9.1.0
msgpack                        1.0.5
nbclassic                      0.3.7
nbclient                       0.5.13
nbconvert                      6.5.0
nbdime                         3.1.1
nbformat                       5.4.0
nest-asyncio                   1.5.5
notebook                       6.4.12
notebook-shim                  0.1.0
numpy                          1.22.0
packaging                      21.3
pandas                         1.3.5
pandocfilters                  1.5.0
parsedatetime                  2.6
parso                          0.8.3
pexpect                        4.8.0
pickleshare                    0.7.5
Pillow                         9.1.1
pip                            22.0.4
pkginfo                        1.9.6
pkgutil_resolve_name           1.3.10
platformdirs                   2.6.2
plotly                         5.5.0
poetry-core                    1.4.0
poetry-plugin-export           1.3.0
prometheus-client              0.14.1
prompt-toolkit                 3.0.37
psutil                         5.9.0
ptyprocess                     0.7.0
pure-eval                      0.2.2
pycparser                      2.21
Pygments                       2.12.0
pyparsing                      3.0.9
pyrsistent                     0.18.1
python-dateutil                2.8.2
pytz                           2022.1
pyzmq                          23.1.0
qgrid                          1.3.1
rapidfuzz                      2.13.7
recurrent                      0.4.0
requests                       2.26.0
requests-toolbelt              0.10.1
rpy2                           3.4.5
scipy                          1.7.3
SecretStorage                  3.3.3
seeq                           62.0.0
seeq-datalab-api               0.1.0
seeq-datalab-extension         0.1.0
seeq-spy                       186.5
Send2Trash                     1.8.0
setuptools                     65.6.3
shellingham                    1.5.0.post1
six                            1.16.0
smmap                          5.0.0
sniffio                        1.2.0
soupsieve                      2.3.2.post1
SQLAlchemy                     1.4.29
stack-data                     0.2.0
tenacity                       8.0.1
terminado                      0.15.0
tinycss2                       1.1.1
tomli                          2.0.1
tomlkit                        0.11.7
tornado                        6.2
traitlets                      5.2.1.post0
trove-classifiers              2023.3.9
tzlocal                        2.1
urllib3                        1.26.5
virtualenv                     20.21.0
voila                          0.3.5
wcwidth                        0.2.5
webencodings                   0.5.1
websocket-client               1.3.2
websockets                     10.3
wheel                          0.40.0
wrapt                          1.14.1
zipp                           3.8.0
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.