How can we define a project's root directory?
For example, given
I'd like to set the project root as
src/proj
and, from notebook nb1.py
, import
5 Replies
Someone will reply to you shortly. In the meantime, this might help:
If the answer is to modify
sys.path
at the beginning of every notebook, that's fine, but some tools expect/allow base directories to be specified in pyproject.toml
The answer is modify
sys.path
, if that's your project structure. I personally would make processors
a package and do an editable install of it, so I didn't need to modify sys.path
. But I understand you may have other constraints.
What tools are you thinking of that expect/allow base directories to be specified in the toml file?I'd have to look at some old
pyproject.toml
s to find reasonable examples –
In general, other projects are installed as editable, but I would just point out, I wouldn't be surprised if there's a much larger cohort of users (compared to jupyter users, for example) who are interested in integrating marimo notebooks deeper into their workflows, such that the notebook is a component rather than a customer or a view.
For example, a data ingestion process that runs silently, when all is well, but still contains the narrative (visualizations, validations, etc.) somewhat frozen in time, which can be difficult to recreate in a comment block, especially with regard to statistics driven processes, which are subject to drift, etc.Makes sense — enabling those types of workflows is a goal of ours. If you have a suggestion of how you’d like to specify paths, all ears.