Skip to content

Commit

Permalink
Add entry points for scripts (#39)
Browse files Browse the repository at this point in the history
* Try fixing the docs pipeline.

* Add entry point

* Fix CLI configuration

* Minor refactoring

* Finish the script
  • Loading branch information
pawel-czyz authored Jan 21, 2025
1 parent ab10a03 commit 7eab01a
Show file tree
Hide file tree
Showing 6 changed files with 418 additions and 2 deletions.
29 changes: 29 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,32 @@ repo_url: https://github.com/cbg-ethz/covvfit

watch:
- src/covvfit

extra:
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/cbg-ethz/covvfit


markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- admonition
- pymdownx.arithmatex:
generic: true
- footnotes
- pymdownx.details
- pymdownx.superfences
- pymdownx.mark
- attr_list
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg


extra_javascript:
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ seaborn = "^0.13.2"
numpyro = "^0.14.0"
subplots-from-axsize = "^0.1.9"
pango-aliasor = "^0.3.0"
typer = "^0.15.1"

[tool.poetry.scripts]
covvfit = "covvfit.cli:main"

[tool.poetry.group.dev]
optional = true
Expand All @@ -32,9 +35,9 @@ ruff = "^0.1.3"
black = "==23.12.1"
pre-commit = "^3.5.0"
pyright = "^1.1.333"
mkdocstrings = {extras = ["python"], version = "^0.23.0"}
mkdocs-material = "^9.5.50"
mkdocstrings = {extras = ["python-legacy"], version = "^0.21.2"}
mkdocs = "^1.5.3"
mkdocs-material = "^9.4.7"
jupytext = "^1.16.1"
jupyterlab = "^4.1.6"

Expand Down
1 change: 1 addition & 0 deletions src/covvfit/_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Subpackage with scripts."""
18 changes: 18 additions & 0 deletions src/covvfit/_cli/freyja.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""Script gathering Freyja files into one CSV."""
from typing import Annotated

import typer


def freyja_gather(
directory: Annotated[str, typer.Argument(help="Directory with Freyja output")],
metadata: Annotated[str, typer.Argument(help="Metadata")],
output: Annotated[str, typer.Argument(help="Desired output location")],
):
"""Gathers Freyja-demixed files from the given directory into the output CSV,
adding the metadata."""
typer.echo(
"This function is not implemented yet. It will be added at a later time."
)
typer.Exit(code=1)
# Add your processing logic here
Loading

0 comments on commit 7eab01a

Please sign in to comment.