Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Support for Dependant files required for Execution runtimes [Julia] #67

Open
mmcky opened this issue Jun 3, 2021 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@mmcky
Copy link
Member

mmcky commented Jun 3, 2021

Is your feature request related to a problem? Please describe.

For Julia based projects some authors have been requesting the ability to include julia files such as Manifest.toml and Project.toml to get fine grain control over the julia packages used. This control seems a lot more important in the julia context than python. Sometimes these files can be nested in directories to change the behaviour of how julia imports packages and continuous_time directory would use the local Project.toml and Manifest.toml files in preference to the global ones at the root level of lectures. :

/lectures
    Project.toml
    Manifest.toml
    /dynamic_programming
       # source files
   /continuous_time
       Project.toml
       Manifest.toml
      # source files

https://pkgdocs.julialang.org/v1/toml-files/

Looking at the docs:

Store external assets: Notebooks being executed often require external assets: importing scripts/data/etc. These are prepared by the users.

@chrisjsewell I had a look at the python api in the docs but couldn't see how files get added as dependencies. We could use this mechanism after detecting a julia kernel to look for some set files such as the ones above and copy them into jupyter-cache for execution.

Describe the solution you'd like

We can look at adding support to automatically copy these files (based on the folder structure) when a julia kernel is detected.

Describe alternatives you've considered

None

@mmcky mmcky added the enhancement New feature or request label Jun 3, 2021
@jlperla
Copy link

jlperla commented Jun 3, 2021

Thanks. Yeah, as this is something essential for Julia I think it is best if it is automatic. In practice every Julia project would or should have them.

@AakashGfude
Copy link
Member

@mmcky @jlperla after looking at the codebase. It seems that the execution happens in the source directory itself. So, this issue is already handled.
Unless you are executing in a temp directory by turning on this option:

execute:
   run_in_temp: true

In this case, execution happens in this temp directory and dependant files are not copied there.

@jlperla
Copy link

jlperla commented Jun 24, 2021

Thanks @AakashGfude .We will follow whatever you guys tell us to do. I also really appreciate want to make sure we can use the same devops to whatever extent possible with the python books.

Just keep in mind that we want the separate Project.toml files at the top level of the source tree and at a few sub-trees as well.

And that it needs to execute with the those same relative paths. And when we generate the notebook repo we need all of those as well.

@mmcky
Copy link
Member Author

mmcky commented Jun 24, 2021

And when we generate the notebook repo we need all of those as well.

We will need to add this to sphinx-tojupyter as a builder step in QuantEcon/sphinx-tojupyter#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants