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

Make package installation automatic and deprecate manual installation #132

Merged
merged 2 commits into from
Dec 10, 2023

Conversation

LilithHafner
Copy link
Member

This has three benefits

  • Less code (if we exclude deprecated code)
  • Easier setup (there is no install step for de or any of the GPU backends)
  • Don't have to install and precompile DifferentialEquations to use from diffeqpy import ode

The principle is to use

try
	import Package
catch
	import Pkg
	Pkg.add("Package")
	import Package
end

Before

>>> from juliacall import ode
...
juliacall.JuliaError: ArgumentError: Package OrdinaryDiffEq not found in current path.
- Run `import Pkg; Pkg.add("OrdinaryDiffEq")` to install the OrdinaryDiffEq package. # bad hint
...
>>> import juliacall
>>> juliacall.install() # Installs de and ode
...
>>> from juliacall import ode

After

>>> from juliacall import ode # Installs de

Also changes the API of the internal load_julia_packages to be more reasonable (takes a list of strings instead of a string with commas in it) and more robust ("just works" regardless of instillation status)

TODO: support manual updates with diffeqpy.update() => Pkg.up() or similar.

@ChrisRackauckas ChrisRackauckas merged commit b448769 into SciML:master Dec 10, 2023
1 of 2 checks passed
@LilithHafner LilithHafner deleted the lh/install branch December 10, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants