-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Change models to one doc section #1801
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
Conversation
|
@eteq I agree this is much better. Hope this can make it into 0.3. Thanks for working on this. |
|
@embray - this should be good to go... should I merge this and leave it to you to backport to 0.3.x, or what? |
|
Sorry I didn't get to do much catchup on Astropy yesterday; I can merge things like this any time. I would right now but it seems GitHub is having trouble with some of their fileservers at the moment and it appears to be affecting write access to the repository. |
|
@eteq - maybe I misunderstand, but it looks like as if your proposed changes don't only affect the docs: We have many many models and some have very short names that are only unambiguously meaningful within a context. For example, the legendre polynomials (1D) reside inside the As we have so many models, I think we really should keep hierarchy in the code itself (don't know about the docs). |
|
I don't see that there's a whole lot of ambiguity in this even as it is, though if there is we could always later rename |
|
@embray: I'm saying that the current state is good - do not change. |
|
@wkerzendorf - this has not changed anything in the code (except for the sphinx extensions). In the current code one can already do The point is that you want a central place for the models to be visible, but don't want it in two different places. There was a lengthy discussion months ago that settled on the |
|
I agree with where this is going in principle [in particular I like that we can use automodsumm on sort of "namespace modules" like |
|
Ok, given that this needs more discussion, let's indeed postpone this to 0.3.1. This is certainly not critical for the 0.3.0 release. |
|
Also, I disagree that any of them are more ambiguous this way that before. Some (like |
|
Right--it's still coming from the modeling package so even if we did have a legendre transformation function (and it were class for some reason) the only ambiguity would arise would be if they're both used in the same module. |
|
@eteq sorry, couldn't see the code, because somehow github doesn't load it. Anyways, I disagree with making them all visible under |
|
Hmm, yeah, the Polynomial2D being used twice is indeed odd. So I see that this should be delayed. Are we willing to include it in 0.3.1 even though nominally it introduces a new feature (the extra option in |
|
@wkerzendorf - well, we do have a big red warning that says "modeling could change in the next version" in the docs for 0.3, so it certainly can be changed if you can rally support :) |
|
regarding the next discussion of ambiguity: the legendre transformation would be a @eteq I'll just bide my time for the first namespace clash - then I rally support 😉. For now it's fine and we have bigger fish to fry. |
|
@embray @astrofrog @wkerzendorf - I split out the sphinx stuff in #1808, and I can rebase this on that for 0.3.1 if we want. |
|
After some discussion in #1808, we opted to just wait on 0.3.1 for both the sphinx tweaks and adjusting the modeling docs. |
|
@nden @astrofrog @wkerzendorf @embray - Now that v0.3 is out, should we go ahead and merge this now for v0.3.1? |
|
Well, 👍 from me but others should weigh in too. |
|
it's fine from me as well |
|
👍 |
|
Is there somewhere we can see a build of the docs in this PR? I looked at http://eteq.github.io/astropy/modeling/index.html#module-astropy.modeling.models but it still shows the problems I raised previously? If it's too much trouble I can just try building it myself. |
|
@embray - there is not, but I've been thinking about possible ways of doing this. It should be pretty easy to modify travis to send the built documentation somewhere, but the question of "somewhere" is what has kept me from implementing it. I had not intended to fix the fact that they are "not grouped logically", as it's not clear to me what the right "logical" order is, because I can think of a few different, conflicting ways of organizing. But you're right that |
|
Well, at least many of the model classes are already grouped somewhat logically by what module they're defined in. Not all of them have an obvious taxonomy to them, but for example I think it makes sense that the various polynomial models are grouped together, and so on. |
|
@embray - I see your point... But I personally found the "taxonomy"-based grouping to be confusing, because it doesn't map completely onto how these things logically group together in my head. Of course, that may be just me, but if it happened to me I suspect that means other people have other ways of thinking about these things. So that's why I was thinking it makes sense to not enforce a specific taxonomy. Do you have a specific idea how you'd like to see this that addreses both the taxonomy problem and the fact that we want them to be accessed from |
|
clearly this is not happening for 0.4, so I re-milestoned it for 0.4.1 (although it might be better for 1.0, as there will be a lot of modleing changes there, anyway. |
|
@eteq - do you think it makes sense to wait for more modeling work to happen, or can we rebase and merge this soon? |
|
@astrofrog - I'm not sure what pending changes are affecting this... (@nden or @embray maybe know?) But it's definitely not ready to rebase and merge, because it's still waiting for other people to say yea or nay on my last proposal (see the Jan 16 comment). |
|
I just looked at the current devdocs. The place where I expected to find all models is at the bottom of the modeling page in the docs and I currently see all of them there. So, is this issue still relevant? Should the "other parts" mentioned by @eteq above be pulled out to a separate PR? |
|
It's relevant in that it could still use better organizing, I think. I've made some changes recently that moved things around a bit better. But it's true that I think most of the code in this PR is no longer relevant and if any of it is worth keeping (is it?) it needs to be merged into astropy-helpers instead. |
|
@eteq Just going over some old issues. As far as I can tell this is almost (if not cpompleteley) identical to the current docs. Should we close this PR? I think the modeling documentation is due for another round of updates but perhaps it should be started from scratch? |
|
Closing as @nden suggested. |
|
Wow @pllim, you did a lot of closing while we were having dinner over here. |
|
Must... achieve... goal... 😉 |
|
Brilliant, I hoped that I could get you on board :) |
|
110 is my personal best today. I can do no more... 😢 |
In the current master, the models from
astropy.modelingare each documented in their own section (e.g.astropy.modeling.polynomial,astropy.modeling.powerlaws, etc.). This strikes me as less than ideal, because it leads to people doing things likefrom astropy.modeling.polynomial import Chebyshev1D, while what we really want is for people to dofrom astropy.modeling.models import Chebyshev1D, so that they don't have to worry about the internal organization of themodelingpackage. This PR corrects that by changing it so that justastropy.modeling.modelsis documented, which contains all the same classes, but makes it clearer that it's intended that they useastropy.modeling.models.There's a bunch of changes in
astropy.sphinx.extbecause it turns out enabling this required some rather substantial changes to howautomodapifinds modules. The details are not terribly important unless you're interested, but even if we end up leaving themodelingdoc the way it is, the rest of this should be included, as it contains some bug fixes.cc @nden