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

Better tracks documentation #275

Conversation

KronosTheLate
Copy link
Contributor

I just has a significant amount of problems navigating my way through the documentation for Tracks. This PR significantly improves the docstring, adds a section in the documentation, and makes the reference to Tracks in the docstring of find_zero a link.

Fact-checking and other improvements are most welcome.

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #275 (41ebec3) into master (e0182dc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #275   +/-   ##
=======================================
  Coverage   84.15%   84.15%           
=======================================
  Files          12       12           
  Lines        2064     2064           
=======================================
  Hits         1737     1737           
  Misses        327      327           
Impacted Files Coverage Δ
src/find_zero.jl 71.66% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0182dc...41ebec3. Read the comment docs.


Alternatively, a `Tracks` object can be constructed and then shown; `find_zero` modifies a `Tracks` object.
`Tracker` objects are printed in a nice, easy-to-read format. You can also
access individual fields if you need the values. A `Tracks` object has the following fields:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there is a chance this could be refactored, it would be best to include the usual reminder that internal fields are subject to modification. (Maybe just say "Currently a tracks object ...")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So "Currently a tracks object is printed in a nice, easy-to-read format..."?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to the fieldname (tracks.xs, tracks.fs...) These may change, though unlikely, so I'm suggesting using "currently" at the point you describe these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that the documentation should be updated if the field names change. The docs should not be uncertain about what things are called.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once documented, even if not exported, they become expected by users, making it harder to modify things should a refactoring be done. (This is exactly why I'm reluctant to rename Tracks, even if I agree with your take). Take for example the discussion on the need to two types of ways to record xs (one with brackets, one without). I'd like the freedom to change that without feeling responsible for mucking up someone's code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair points. The docs are allowed to become after a potential refactoring (meaning a potential 2.0, right?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for sure. But changing things on an old package is usually best reserved for necessary things (performance improvements...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am having a hard time seing exactly what you want to change. Feel free to make the change yourself - I trust your judgment

@jverzani
Copy link
Member

Thanks, this looks pretty good and definitely necessary for anyone who wants to use this feature! I just had that one comment about reminding the reader that internal fields may be renamed, modified, ... (though in this case, it is really unlikely).

jverzani added a commit to jverzani/Roots.jl that referenced this pull request Mar 18, 2022
jverzani added a commit that referenced this pull request Mar 19, 2022
* Add "Tracks" to reference/API
* rework the Tracks object
* use unicode to distinguish abs fields in Tracks
* merge and edit documentation PR #275 by KronosTheLate
* tidy logging methods
* docfix

Co-authored-by: KronosTheLate <[email protected]>
@jverzani
Copy link
Member

I had thought my merging this into PR #280 would have closed this, but it didn't. So am closing. Thanks for your help here!

@jverzani jverzani closed this Mar 19, 2022
@jverzani
Copy link
Member

I thought you would show up in the contributors with how I merged this, but am wrong. I’d love it if you put in a PR to bump the version, so that you do.

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