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

Improve developer documentation. #540

Merged
merged 1 commit into from
May 1, 2020

Conversation

jeromekelleher
Copy link
Member

@jeromekelleher jeromekelleher commented Apr 16, 2020

I started writing some documentation to explain how to write documentation and I ended up doing a merge between the msprime docs and here. Still some way to go, but we do need to get all this stuff down on paper.

Closes #470
Closes #509
Closes #454
Closes #118

@jeromekelleher jeromekelleher marked this pull request as draft April 16, 2020 19:58
@codecov
Copy link

codecov bot commented Apr 16, 2020

Codecov Report

Merging #540 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #540   +/-   ##
=======================================
  Coverage   87.22%   87.22%           
=======================================
  Files          21       21           
  Lines       16283    16283           
  Branches     3195     3195           
=======================================
  Hits        14203    14203           
  Misses       1020     1020           
  Partials     1060     1060           
Flag Coverage Δ
#c_tests 88.40% <ø> (ø)
#python_c_tests 90.34% <ø> (ø)
#python_tests 99.20% <ø> (ø)

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 dd4824e...098d024. Read the comment docs.

@petrelharp
Copy link
Contributor

Super useful. I learned things! Maybe I should have ignored this until you took off the "draft" tag though... ?

@jeromekelleher
Copy link
Member Author

Super useful. I learned things! Maybe I should have ignored this until you took off the "draft" tag though... ?

Yeah, I'm only half way through editing it, but thanks for the comments anyway. I'm going to use the "draft" tag as a "don't bother looking at this yet" protocol.

@jeromekelleher jeromekelleher marked this pull request as ready for review April 21, 2020 18:09
@jeromekelleher
Copy link
Member Author

This is ready for review now. I changed it a lot, so comments welcome!

Copy link
Contributor

@petrelharp petrelharp left a comment

Choose a reason for hiding this comment

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

Looks good! Some minor comments.

Copy link
Member

@benjeffery benjeffery left a comment

Choose a reason for hiding this comment

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

Really great stuff, just a few nitpicks and broken links. A lot of this I figured out by reading the CI scripts, so nice to have it in proper docs!

@benjeffery
Copy link
Member

BTW are the "commit suggestions" helpful? I think they are ok for small things only as they immediately resolve the conversation.

@jeromekelleher
Copy link
Member Author

Note to self: add more on documentation. How to do a quick drive-by edit when you're on github. How to document a function. Links to sphinx and rst docs,.

@benjeffery
Copy link
Member

How to do a quick drive-by edit when you're on github.

Why not just add an edit button to each doc page that links to the GitHub edit page?

@benjeffery
Copy link
Member

https://gist.github.com/mgedmin/6052926

Seems like readthedocs has support for this? sphinx-doc/sphinx#2386

@jeromekelleher
Copy link
Member Author

To go into the C docs somewhere:

-tsk_id_t is an ID for any entity in a table

  • tsk_size_t refers to the size of a table or entity that can be stored in a table
  • size_t is an OS size, like the result of strlen or whatever
  • Error return types are ints.
  • uint32_t etc should be avoided, as these are just leftovers from before tsk_size_t, etc.
  • Sometimes we want to do things like work bitstrings (like a set, say), then it makes sense to use in64 or uint64.

@jeromekelleher
Copy link
Member Author

BTW are the "commit suggestions" helpful? I think they are ok for small things only as they immediately resolve the conversation.

Great thanks, I just batched them all together.

@jeromekelleher
Copy link
Member Author

I've made another pass at this, and put a good bit of effort into documenting the documentation process. There's a handholding bit for editing the docs, this is as simple as it can be I think.

Why not just add an edit button to each doc page that links to the GitHub edit page?

Good idea @benjeffery. I've added the "Edit on GitHub" link to the top of the page which seems to work well.

Any chance of another look through helpful reviewers?

@petrelharp
Copy link
Contributor

I haven't had a careful read, but spot-checking, it looks wonderful. :yay:

@jeromekelleher
Copy link
Member Author

OK, squashed and ready to go. @benjeffery, if you're happy can you merge please?

@benjeffery
Copy link
Member

benjeffery commented May 1, 2020

I've fixed a broken link, made the git checkout command consistent with the text and added the command to make an upstream remote. Squashed and then force pushed. This time it didn't close the PR! 👍

@benjeffery
Copy link
Member

This is awesome and a real step up for the docs. 🌞 Merging!

@benjeffery benjeffery merged commit 295b4bf into tskit-dev:master May 1, 2020
@jeromekelleher jeromekelleher deleted the dev-docs branch May 3, 2020 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants