Skip to content

Commit 666f050

Browse files
committed
Make cli and about to private modules
1 parent a33ff0b commit 666f050

File tree

6 files changed

+27
-10
lines changed

6 files changed

+27
-10
lines changed

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def main(args: Dict[str, Union[bool, str]]):
2020
version = args[build_utils.FLAG_VERSION]
2121
if args[build_utils.FLAG_VERSION]:
2222
# Replace version in about.py
23-
with open(os.path.join(HERE, f"src/{MAIN_PACKAGE}/about.py"), "r+") as f:
23+
with open(os.path.join(HERE, f"src/{MAIN_PACKAGE}/_about.py"), "r+") as f:
2424
data = f.read()
2525
f.seek(0)
2626
f.write(re.sub(r"__version__ = \".+\"", f'__version__ = "{version}"', data))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def load_requirements(path_dir=PWD, file_name="requirements.txt", comment_char="
118118
"Source": URL,
119119
},
120120
entry_points={
121-
"console_scripts": [f"{NAME}={MAIN_PACKAGE}.cli:app"],
121+
"console_scripts": [f"{NAME}={MAIN_PACKAGE}._cli:app"],
122122
},
123123
keywords=[
124124
# eg: 'keyword1', 'keyword2', 'keyword3',

src/lazydocs/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from . import about
1+
from . import _about
22

33
# define the version before the other imports since these need it
4-
__version__ = about.__version__
4+
__version__ = _about.__version__
55

6-
# TODO do your imports here
6+
from . import generator

src/lazydocs/_about.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Information about this library. This file will automatically changed."""
2+
3+
__version__ = "0.1.3"
4+
# __author__
5+
# __email__

src/lazydocs/cli.py renamed to src/lazydocs/_cli.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Command line interface of lazydocs."""
2+
13
from typing import List, Optional
24

35
import typer
@@ -20,10 +22,22 @@ def generate(
2022
None,
2123
help="The base github link. Should include branch name. All source links are generated with this prefix.",
2224
),
25+
overview_file: Optional[str] = typer.Option(
26+
None,
27+
help="Filename of overview file. If not provided, no overview file will be generated.",
28+
),
2329
remove_package_prefix: bool = typer.Option(
2430
True,
2531
help="If `True`, the package prefix will be removed from all functions and methods.",
2632
),
33+
ignored_modules: List[str] = typer.Option(
34+
[],
35+
help="A list of modules that should be ignored.",
36+
),
37+
watermark: bool = typer.Option(
38+
True,
39+
help="If `True`, add a watermark with a timestamp to bottom of the markdown files.",
40+
),
2741
validate: bool = typer.Option(
2842
False,
2943
help="If `True`, validate the docstrings via pydocstyle. Requires pydocstyle to be installed.",
@@ -36,6 +50,9 @@ def generate(
3650
output_path=output_path,
3751
src_base_url=github_link,
3852
remove_package_prefix=remove_package_prefix,
53+
ignored_modules=ignored_modules,
54+
overview_file=overview_file,
55+
watermark=watermark,
3956
validate=validate,
4057
)
4158

src/lazydocs/about.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)