-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Tracking issue for Documenter and design of docstrings and new tutorials. #238
Comments
Thanks! Yes, my plan, which hopefully I can get to this weekend or next week was to split the big tutorial into several pieces and clean them up. Something along the lines of pure jump models with The FAQ would be split out of the tutorial to a separate section. Basically I'm envisioning something like the Catalyst doc structure: https://catalyst.sciml.ai We could also add and cleanup the jump diffusion tutorial -- I'd leave that decision to @ChrisRackauckas on where he feels that should live. (It would also make sense in StochasticDiffEq.) Then we need to figure out how to reconcile the current |
I don't think docstrings should be in the tutorials -- see the Catalyst style. I'd prefer the tutorials to introduce how to use DiffEqJump in the most common use cases, and then leave the docstrings for more detailed info about the specific components. |
@00krishna if you want to take a first pass the simplest thing to do would be to initially split the tutorial in two parts, and have the second start with a note that one should be familiar with the first before looking at it. We could also convert it to use
That would be a good starting point to then build out from I think. |
TODO still:
|
@isaacsas say, I was looking through the tutorials as a basis for the docstrings. Seems like a lot of the tutorial code is focused on using |
I'm not sure what you mean? The tutorial starts with Catalyst, but everything after it is pure DiffEqJump. Also, most of the core functions have docstrings showing now at https://jump.sciml.ai/dev/api/ |
Ahh, I see. I was looking at the tutorial on https://jump.sciml.ai/dev/tutorials/discrete_stochastic_example/ . Right, so the original model is Thanks for setting me straight. |
But maybe I should update that tutorial to move the Catalyst stuff to the end. Then it can start with DiffEqJump but present Catalyst at the end for people that are interested only in reactions systems and want an easier interface. |
I think that the SIR model example is a good one. You could define the SIR model in both DiffEq, as well as in Catayst, and present them together? I think that threw me off was that the tutorials starts with a detailed description of the SIR model in Catalyst form. So once that expectation was set, I did not notice the DiffEq examples below. So using an extended example is good, but perhaps showing the SIR example in both Catalyst and DiffEq forms? Like can I define a standard Diffeq model |
Yeah, I think it makes sense to reverse the order. i.e. show SIR in DiffEqJump first, and then at the end point out it is easier to do these types of chemical systems with Catalyst (which has some other advantages). That way the information is there, but people who just want to learn DiffEqJump and don't care about chemical systems won't get hung up on it. I'm working on such an update now. Thanks for the suggestion! |
Say, @isaacsas I had an idea to adjust the formatting of the code blocks in the docstrings, but I wanted to check with you first. I thought an adjustment might make the The current code blocks are formatted like this:
But most of the original
Let me know either way, and I will use that as a model. Like I said, it is just an idea. |
I don't think putting the parameters after is really needed, and maybe it is a bit confusing (since the earlier declaration makes clear the parameters are beta and nu, which are then referenced in subsequent comments -- moving it after means the parameter names are referenced before they are actually defined). An alternative would be to move the |
Okay. So then something like this below?
|
Sure |
@isaacsas I created the first set of doctests for the jump types. One thing to note is that the doctests are building, but they are indicating a failure a warning. I created the docstring for
I used the code below.
So the problem seems to be that |
Someone changed the interface a while back but I don't think it has gotten much use since the change. You can look at the regular jump tests https://github.com/SciML/DiffEqJump.jl/blob/master/test/regular_jumps.jl and the definitions to see how it works now (notice it takes a It is also used in StochasticDiffEq at https://github.com/SciML/StochasticDiffEq.jl/blob/master/test/tau_leaping.jl |
Getting a doc string on |
@isaacsas Okay good. I got a working example--no warnings. Note that in order to include this example, I will need to include I will go ahead and put it in the PR with this code.
|
@isaacsas i am traveling the yesterday and today, but will get back to the PR in the next day or so. Just wanted to let you know. |
No worries. Have a good trip! |
@isaacsas Gradually getting back on the horse :). So I did more research and thinking and it seems like doctests in the docstrings only support test cases where some result is returned and compared to a desired result. Those So we could just go with I will read over the new tutorials to figure out the options. |
I think julia blocks for docstrings with simple examples aimed at helping users see how to use the functions are fine. I don't really see the point of silent tests via the documentation -- at that point we might as well add the associated test as a normal package test instead. We have testing pretty well covered with the normal tests, and I've setup the new documentation to run all the tutorials as example blocks. |
Closing as I think this is out of date now. Happy to start doc discussions in a new thread. |
I am creating a new issue to help track the work on migrating some of the
DiffEqJump.jl
documentation toDocumenter.jl.
In talking with @isaacsas , he indicated that he wanted to revamp the introductory tutorials forDiffEqJump
.Originally I thought I would just migrate the tutorials to Documenter and incorporate the docstrings into the tutorials. But instead of that, perhaps it is better to review how others have
implemented the docstrings for some other larger packages in the combined SciML docs.
This issue can just help us to coordinate efforts and agree on a design.
The text was updated successfully, but these errors were encountered: