Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions news/add-cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* Add basic cli interface.

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exclude = [] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)

[project.scripts]
sequential = "pdfbl.sequential.sequential_app:main"
pdfbl-sequential = "pdfbl.sequential.pdfbl_sequential_app:main"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Use pdfbl-sequential as the entry point name.


[tool.setuptools.dynamic]
dependencies = {file = ["requirements/pip.txt"]}
Expand Down
25 changes: 25 additions & 0 deletions src/pdfbl/sequential/pdfbl_sequential_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import argparse

from pdfbl.sequential import __version__


def main():
"""Entry point for the pdfbl-cli.

Examples
--------
>>> pdfbl-cli --version
"""
parser = argparse.ArgumentParser(
description=(
"Scripts for running sequential PDF refinements "
"using diffpy.cmi automatically"
)
)
parser.add_argument(
"--version",
action="version",
version=f"pdfbl.sequential {__version__}",
help="Show the version of pdfbl.sequential and exit.",
)
parser.parse_args()
1 change: 0 additions & 1 deletion src/pdfbl/sequential/sequential_cmi_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ def run_one_cycle(self, stop_event=SimpleNamespace(is_set=lambda: False)):
self.input_files_running = []

def run(self, mode: Literal["batch", "stream"]):

if mode == "batch":
self.run_one_cycle()
elif mode == "stream":
Expand Down
Loading