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

Migrate JuMPTutorials #2483

Closed
12 of 16 tasks
odow opened this issue Feb 18, 2021 · 8 comments
Closed
12 of 16 tasks

Migrate JuMPTutorials #2483

odow opened this issue Feb 18, 2021 · 8 comments
Labels
good first issue This issue is recommended for new users, it does not require a thorough understanding of the package Status: Help Wanted Help is welcome on this issue Type: Documentation

Comments

@odow
Copy link
Member

odow commented Feb 18, 2021

This issue is to track the progress of migrating the modeling tutorials from JuMPTutorials.

  • Tutorials should be added to some suitable subfolder of https://github.com/jump-dev/JuMP.jl/tree/master/docs/src/tutorials (make one if it doesn't fit. e.g., The examples have MILP, Nonlinear, Quadratic, and SDP). We could (and probably should) convert the existing examples into tutorials overtime.
  • In addition, they need to be converted from Weave to Literate.
  • Some tutorials require extra packages. We should try to minimize the number of new dependencies. For example, we don't need Plots and Gadfly. If Plots adds too much to the CI runtime, we could consider using GRUtils instead. Plots has been added.

Tutorials

Unmerged PRs

Unresolved issues

@odow odow added Type: Documentation Status: Help Wanted Help is welcome on this issue good first issue This issue is recommended for new users, it does not require a thorough understanding of the package labels Feb 18, 2021
@blegat
Copy link
Member

blegat commented Feb 19, 2021

Is there a rule for whether something is an example or a tutorial or should all examples become tutorials ?

@odow
Copy link
Member Author

odow commented Feb 20, 2021

Not really. I wonder if we should just move all the examples into the tutorials folder now.

@joaquimg
Copy link
Member

+1 for merging folders.

Distances is no "really" needed. Haversine is like 5 lines of code + 1 link to wikipedia. We can reference the package.

I imagine we are considering having examples with plots but using a single framework to minimize deps.

@frapac
Copy link
Contributor

frapac commented Feb 20, 2021

I imagine we are considering having examples with plots but using a single framework to minimize deps.

How about using UnicodePlots as a plotting library? It does not require many deps, and comes with an acceptable time to first-plot. In my experience, the rendering in Weave/Literate notebooks is more than ok.

@odow
Copy link
Member Author

odow commented Feb 22, 2021

The doc build currently takes ~11 minutes, so I think we can take the hit with Plots. Although if we switched the doc build to Julia 1.6, things would be much quicker.

@ferrolho
Copy link
Contributor

The way the docs are currently built seems to share the same context for the different examples. This means that I had to abstain from using const on some global variables in the notebook, and I also had to rename one of the functions because its name was generic enough to have already been defined in some previous notebook.

On a separate note, +1 for the inclusion of Plots.

@odow
Copy link
Member Author

odow commented Feb 22, 2021

The way the docs are currently built seems to share the same context for the different examples.

Hmm. They shouldn't. Maybe I've configured things wrong.

I might need a let around

JuMP.jl/docs/make.jl

Lines 42 to 50 in f01adac

@testset "$(filename)" begin
include(filename)
end
Literate.markdown(
filename,
dir;
documenter = true,
postprocess = link_example,
)

@odow
Copy link
Member Author

odow commented Aug 13, 2021

Closing this as substantially done. The tutorials could always use more work tidying them up, but I don't think we need an issue to track that.

@odow odow closed this as completed Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue is recommended for new users, it does not require a thorough understanding of the package Status: Help Wanted Help is welcome on this issue Type: Documentation
Development

No branches or pull requests

5 participants