General Best Practices
Project setup
- Use a dedicated notebook to install any Python dependencies. This provides a centralized place to see and manage your project’s dependencies.
- The same goes for any other one-time setup, such as fetching data from an API. This is best handled in a dedicated notebook.
Process design
When publishing a DataCards variable with datacards.publish.variable()
, bear in mind that all cells that consume this variable will be executed, as well as the cells that follow those cells. This execution happens in parallel. Therefore, for the best performance:
- Publish as early as possible (to start the parallel executions of consuming notebooks).
- Consume as late as possible (to run really just what needs to be executed).
Of course, you may need to break these guidelines depending on your use case, which is fine!
Last updated on