Skip to content

Commit

Permalink
Merge branch 'master' into test_skip
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinaGomoryova committed Jul 11, 2024
2 parents d5f95e5 + dffa8fd commit 215902c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ description = "This package adjusts and cleans the metadata file provided by a u
authors = ["Zargham Ahmad <[email protected]>" ]
license = "MIT"
readme = "README.md"
packages = [
{include = "src/rcx_tk"},
{include = "src/rcx_tk/py.typed"},
]
keywords = ["metadata", "alkanes", "metabolomics"]

[tool.poetry.dependencies]
python = "^3.11"
pandas = "^2.2.2"
pyxlsx = "^1.1.3"
pandas-stubs = "^2.2.2.240603"
mypy = "^1.10.1"
click = "^8.1.7"

[tool.poetry.group.dev.dependencies]
build = "^1.2.1"
Expand Down Expand Up @@ -106,7 +113,6 @@ exclude = [
]
lint.per-file-ignores = {}


# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

Expand All @@ -125,4 +131,7 @@ filename = "pyproject.toml"
filename = "CITATION.cff"

[[tool.bumpversion.files]]
filename = "docs/conf.py"
filename = "docs/conf.py"

[tool.poetry.scripts]
rcx_tk = "rcx_tk.__main__:main"
26 changes: 26 additions & 0 deletions src/rcx_tk/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import click

from rcx_tk.process_metadata_file import process_alkane_ri_file, process_metadata_file


@click.command()
@click.option('--method', type=click.Choice(['metadata', 'alkanes']), required = True, help = 'A file type to be processed, either metadata or alkanes file.')
@click.argument('file_path')
@click.argument('out_path')
def main(method, file_path, out_path):
"""Process metadata or alkane file.
Args:
file_path (path): A path to the input data.
out_path (path): A path where the processed data will be exported to.
"""
if method == "metadata":
process_metadata_file(file_path, out_path)
click.echo("Metadata done!")
elif method == "alkanes":
process_alkane_ri_file(file_path, out_path)
click.echo("Alkanes done!")


if __name__ == "__main__":
main()
Empty file added src/rcx_tk/py.typed
Empty file.

0 comments on commit 215902c

Please sign in to comment.