diff --git a/cookiecutter.json b/cookiecutter.json index 166a212..23a4a3e 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -2,7 +2,7 @@ "github_username": "username_for_github_actions", "github_email": "email_for@github_actions.com", "process_type": "RTC", - "short_description": "HyP3 plugin for {{cookiecutter.process_type}} processing", + "short_description": "HyP3 plugin for {{cookiecutter.process_type}} processing.", "public_url": "https://github.com/ASFHyP3/hyp3-{{cookiecutter.process_type}}", "copyright_year": "{% now 'utc', '%Y' %}", "__project_name": "hyp3-{{cookiecutter.process_type | lower}}", diff --git a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__init__.py b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__init__.py index d5e1f08..1769081 100644 --- a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__init__.py +++ b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__init__.py @@ -2,6 +2,7 @@ from importlib.metadata import version + __version__ = version(__name__) __all__ = [ diff --git a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py index 6589e4f..5a06251 100644 --- a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py +++ b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py @@ -1,20 +1,15 @@ -""" -{{cookiecutter.process_type}} processing for HyP3 -""" +"""{{cookiecutter.process_type}} processing for HyP3.""" import logging from argparse import ArgumentParser from hyp3lib.aws import upload_file_to_s3 from hyp3lib.image import create_thumbnail - from {{cookiecutter.__package_name}}.process import {{cookiecutter.__process_name}} -def main(): - """ - HyP3 entrypoint for {{cookiecutter.__package_name}} - """ +def main() -> None: + """HyP3 entrypoint for {{cookiecutter.__package_name}}.""" parser = ArgumentParser() parser.add_argument('--bucket', help='AWS S3 bucket HyP3 for upload the final product(s)') parser.add_argument('--bucket-prefix', default='', help='Add a bucket prefix to product(s)') diff --git a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py index f7a65ca..af7a473 100644 --- a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py +++ b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py @@ -1,6 +1,4 @@ -""" -{{cookiecutter.process_type}} processing -""" +"""{{cookiecutter.process_type}} processing.""" import argparse import logging @@ -8,11 +6,12 @@ from {{cookiecutter.__package_name}} import __version__ + log = logging.getLogger(__name__) def {{cookiecutter.__process_name}}(greeting: str = 'Hello world!') -> Path: - """Create a greeting product + """Create a greeting product. Args: greeting: Write this greeting to a product file (Default: "Hello world!" ) @@ -23,8 +22,8 @@ def {{cookiecutter.__process_name}}(greeting: str = 'Hello world!') -> Path: return product_file -def main(): - """{{cookiecutter.__process_name}} entrypoint""" +def main() -> None: + """{{cookiecutter.__process_name}} entrypoint.""" parser = argparse.ArgumentParser( prog='{{cookiecutter.__process_name}}', description=__doc__,