BjornFJohansson / pydna

Clone with Python! Data structures for double stranded DNA & simulation of homologous recombination, Gibson assembly, cut & paste cloning.
Other
166 stars 45 forks source link

New docs #304

Closed manulera closed 1 month ago

manulera commented 1 month ago

Hello @BjornFJohansson @hiyama341 @dgruano @JeffXiePL

I have made some changes to the documentation that I think can make it a bit more engaging and easier to maintain.

Because the action is set to deploy from any branch, it has actually updated the docs to that, but as soon as someone pushes again, it will be overwritten, so you can check it in this netlify link: https://keen-jalebi-634077.netlify.app/

The main changes I have made:

Let me know what you think. If you agree, I will finish up the changes and add the documentation of how to add notebooks to the docs.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.68%. Comparing base (fd8577c) to head (72c13aa). Report is 5 commits behind head on dev_bjorn.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/BjornFJohansson/pydna/pull/304/graphs/tree.svg?width=650&height=150&src=pr&token=8gKFpo7HAl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bj%C3%B6rn+Johansson)](https://app.codecov.io/gh/BjornFJohansson/pydna/pull/304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bj%C3%B6rn+Johansson) ```diff @@ Coverage Diff @@ ## dev_bjorn #304 +/- ## ============================================= + Coverage 93.60% 93.68% +0.08% ============================================= Files 40 40 Lines 3922 3960 +38 Branches 588 604 +16 ============================================= + Hits 3671 3710 +39 + Misses 199 198 -1 Partials 52 52 ``` | [Files with missing lines](https://app.codecov.io/gh/BjornFJohansson/pydna/pull/304?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bj%C3%B6rn+Johansson) | Coverage Δ | | |---|---|---| | [src/pydna/crispr.py](https://app.codecov.io/gh/BjornFJohansson/pydna/pull/304?src=pr&el=tree&filepath=src%2Fpydna%2Fcrispr.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bj%C3%B6rn+Johansson#diff-c3JjL3B5ZG5hL2NyaXNwci5weQ==) | `87.23% <ø> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/BjornFJohansson/pydna/pull/304/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bj%C3%B6rn+Johansson)
BjornFJohansson commented 1 month ago

I looked at the docs in the link and I think they look good. Some of the symbols do not work, like :radioactive: on the first page. I think it needs an attractive image on the first page as well.

All the pages under "module content" seem the same? Should each module have its own page?

manulera commented 1 month ago

Some of the symbols do not work, like ☢️ on the first page

Yes, this is because they are using the :emoji_name: syntax, which is not rendered in rst, they simply have to be replaced by the actual emoji, but I did not want to edit the README in this branch, since the other branches do.

needs an attractive image

What would you put?

All the pages under "module content" seem the same?

What do you mean? Now "module content" roughly corresponds to what the previous documentation was ( the autogenerated docs) is there something repeated?

BjornFJohansson commented 1 month ago

image

It seems like every page under the links in the gray area is a a different part of the same page.

In the Biopython docs it seems like there is a file for each module.

The way it works in Pydna is perhaps due to old sphinx settings?

manulera commented 1 month ago

Yes, they are all in the same page as before. This is defined in module_contents.rst, we could make it so that every submodule is in a different page if you think it's better.

manulera commented 1 month ago

Anyway, let me know about the sub-pages for the modules, and if you agree with the overall idea. If so, I will add the rest of the notebooks and document how the docs generation works.

BjornFJohansson commented 1 month ago

I do agree with the overall idea. I think it would be better wit ha page for each module as we hope to expand the docstrings for most modules. It is not urgent imho.

manulera commented 1 month ago

Ok, I think it's looking good by now, and I incorporated what you suggested. You can have a look at how it looks in the same URL: https://keen-jalebi-634077.netlify.app/

I have documented how to work on the docs, and referenced it in the readme, so you can easily contribute:

https://github.com/BjornFJohansson/pydna/blob/fa07e0eee05188e5f535a33d902e78326fea4be7/docs/README.md

dgruano commented 1 month ago

Now that we are at it and related to #259 : the Cas objects describe the structure of the sgRNA in the docstring. This causes some artifacts in the documentation page. I attach images of how it looks in the editor vs in the docs:

image image

Any idea on how to solve/workaround this?

dgruano commented 1 month ago

Okay, quick Google search explains how to create code blocks within Sphinx: just adding double colons before the text "::" (unless you can suggest something else).

We can take care of this with @JeffXiePL when we push the changes on the CRISPR module and its docs.

manulera commented 1 month ago

Hi @dgruano good catch! Thanks for checking. I fix it by adding a codeblock and with indentation, see:

https://github.com/BjornFJohansson/pydna/pull/304/commits/72c13aa841c3f3d4bf13560947a8341ef4c6e715

manulera commented 1 month ago

Ok, I will merge this then, and we can always improve further.