Skip to content

Commit

Permalink
Hatch reprostim cli stub, #124.
Browse files Browse the repository at this point in the history
  • Loading branch information
vmdocua committed Dec 18, 2024
1 parent 3da8609 commit 9cae952
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
File renamed without changes.
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "reprostim"
dynamic = ["version"]
description = 'ReproStim is a video capture and recording suite for neuroimaging and psychology experiments.'
readme = "README.md"
requires-python = "3.10"
#requires-python = "3.10"
license = "MIT"
license-files = { paths = ["LICENSE"] }
keywords = []
Expand All @@ -25,13 +25,18 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = []
dependencies = [
"click>=8.1.7",
]

[project.urls]
Documentation = "https://github.com/ReproNim/reprostim"
Issues = "https://github.com/ReproNim/reprostim/issues"
Source = "https://github.com/ReproNim/reprostim"

[project.scripts]
reprostim = "reprostim.cli:reprostim"

[tool.hatch.build.targets.sdist]
include = [
"/src/reprostim/",
Expand Down
9 changes: 9 additions & 0 deletions src/reprostim/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2024-present Vadim Melnik <[email protected]>
#
# SPDX-License-Identifier: MIT
import sys

if __name__ == "__main__":
from reprostim.cli import reprostim

sys.exit(reprostim())
12 changes: 12 additions & 0 deletions src/reprostim/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024-present Vadim Melnik <[email protected]>
#
# SPDX-License-Identifier: MIT
import click

from reprostim.__about__ import __version__


@click.group(context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=True)
@click.version_option(version=__version__, prog_name="reprostim")
def reprostim():
click.echo("Hello world!")

0 comments on commit 9cae952

Please sign in to comment.