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

CLI documentation page generation #342

Merged
merged 22 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c16a872
implemented automatic CLI documentation generation
Lilferrit Jun 17, 2024
4e8ce27
converted CLI doc page to markdown, added CLI doc page intro
Lilferrit Jun 17, 2024
b6a99bd
Merge remote-tracking branch 'origin/dev' into man-pages
Lilferrit Jun 18, 2024
c20ae02
fixed cli man page formatting bug
Lilferrit Jun 18, 2024
dcd700c
changed casanovo cli help message to rst for compatability with sphin…
Lilferrit Jun 20, 2024
4bc8d81
implemented filter javascript
Lilferrit Jun 20, 2024
f640c5a
resolved linter errors
Lilferrit Jun 20, 2024
786676c
resolved more linter errors
Lilferrit Jun 20, 2024
c4d69f8
Generate new screengrabs with rich-codex
github-actions[bot] Jun 20, 2024
2893ed8
cli docuementation fixes/improvements
Lilferrit Jun 21, 2024
cfa3429
Merge branch 'man-pages' of github.com:Noble-Lab/casanovo into man-pages
Lilferrit Jun 21, 2024
038cc76
fixed misspelling
Lilferrit Jun 21, 2024
78dfed6
added sphinx-click dependency to pyproject.toml
Lilferrit Jun 25, 2024
d9f1ded
Merge branch 'dev' into man-pages
Lilferrit Jul 2, 2024
83723f8
cli restructured text file formatting
Lilferrit Jul 2, 2024
6d2db26
remove changes from model.py
Lilferrit Jul 2, 2024
05f7f09
Generate new screengrabs with rich-codex
github-actions[bot] Jul 2, 2024
58375ea
CLI man page event handler implementation
Lilferrit Jul 8, 2024
4a34b12
Merge branch 'man-pages' of github.com:Noble-Lab/casanovo into man-pages
Lilferrit Jul 8, 2024
2ac9eab
requested changes
Lilferrit Jul 9, 2024
e9388c7
requested changes
Lilferrit Jul 9, 2024
0cbfef6
conf.py merge conflict
Lilferrit Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions casanovo/casanovo.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,27 @@ def __init__(self, *args, **kwargs) -> None:

@click.group(context_settings=dict(help_option_names=["-h", "--help"]))
def main() -> None:
"""# Casanovo
"""
Casanovo
========

Casanovo de novo sequences peptides from tandem mass spectra using a
Transformer model. Casanovo currently supports mzML, mzXML, and MGF files
for de novo sequencing and annotated MGF files, such as those from
MassIVE-KB, for training new models.

Links:
- Documentation: [https://casanovo.readthedocs.io]()
- Official code repository: [https://github.com/Noble-Lab/casanovo]()

- Documentation: https://casanovo.readthedocs.io
- Official code repository: https://github.com/Noble-Lab/casanovo

If you use Casanovo in your work, please cite:

- Yilmaz, M., Fondrie, W. E., Bittremieux, W., Oh, S. & Noble, W. S. De novo
mass spectrometry peptide sequencing with a transformer model. Proceedings
of the 39th International Conference on Machine Learning - ICML '22 (2022)
doi:10.1101/2022.02.07.479481.
mass spectrometry peptide sequencing with a transformer model. Proceedings
of the 39th International Conference on Machine Learning - ICML '22 (2022)
doi:10.1101/2022.02.07.479481.


"""
return
Expand Down
10 changes: 10 additions & 0 deletions docs/cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Casanovo CLI
============

After installing the Casanovo package and all of its dependencies, the Casanovo CLI can be used to access Casanovo functionality from the command line.
For Casanovo installation instructions, see the :doc:`Getting Started <getting_started>`.

.. click:: casanovo.casanovo:main
:prog: casanovo
:nested: full
:commands: configure, evaluate, sequence, train, version
15 changes: 10 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath("."))
import os
import sys

sys.path.insert(0, os.path.abspath("."))
bittremieux marked this conversation as resolved.
Show resolved Hide resolved


# -- Project information -----------------------------------------------------
Expand All @@ -30,7 +31,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named "sphinx.ext.*") or your custom
# ones.
extensions = ["myst_parser"]
extensions = ["myst_parser", "sphinx_click", "sphinx_click_handlers"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand All @@ -57,9 +58,13 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Does this need to be commented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFIK this was originally left as a commented out piece of code in the conf.py template, but I'll go ahead and remove it.

Copy link
Collaborator

@bittremieux bittremieux Jul 9, 2024

Choose a reason for hiding this comment

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

It's currently not commented on main, so unless the change is required, I think we can leave it as-is. So rather than remove it, put it back in there and not commented.

html_theme_options = {"repository_url": "https//github.com/Noble-Lab/casanovo"}

html_js_files = [
bittremieux marked this conversation as resolved.
Show resolved Hide resolved
"js/cli-page.js",
]

# -- MyST configuration ------------------------------------------------------
myst_enable_extensions = [
"amsmath",
Expand Down
64 changes: 35 additions & 29 deletions docs/images/configure-help.svg
bittremieux marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading