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

Failure to run some examples due to both Plots and ReachabilityAnalysis exporting "center" #751

Closed
hurak opened this issue Nov 23, 2023 · 3 comments · Fixed by #752
Closed
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@hurak
Copy link

hurak commented Nov 23, 2023

I am not sure if the following qualifies as an issue, but it certainly prevents some examples from the webpage from running successfully just by running the copy-pasting their code: for example, the one from https://juliareach.github.io/ReachabilityAnalysis.jl/dev/tutorials/linear_methods/discrete_time/.

Namely, both Plots and ReachabilityAnalysis export "center". As a result, the following code

using ReachabilityAnalysis, Plots
X0 = BallInf(ones(2), 0.2)
plot(X0, c=:white)
c = center(X0) 

returns the error

ERROR: UndefVarError: `center` not defined

As a result the example code on the above linked webpage cannot be run without adding the full qualification:

c = ReachabilityAnalysis.center(X0)

but this should better be included in the example code directly.

Unless there is a neater solution.

@mforets
Copy link
Member

mforets commented Nov 23, 2023

i think this is a known issue; Plots exports a method called center (why?!) and so does LazySets.

... and ReachabilityAnalysis just reexports LazySets names for convenience.

@mforets
Copy link
Member

mforets commented Nov 23, 2023

looking at the code i see that we are hiding the relevant line https://github.com/JuliaReach/ReachabilityAnalysis.jl/blob/master/docs/src/tutorials/linear_methods/discrete_time.md

using ReachabilityAnalysis # hide
using ReachabilityAnalysis: center  # hide

but showing them seems better, to avoid confusion.

@mforets mforets added the documentation Improvements or additions to documentation label Nov 23, 2023
@mforets
Copy link
Member

mforets commented Nov 24, 2023

being done in #752

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants