Skip to content
Open
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
1 change: 1 addition & 0 deletions .anno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.0
current_version = 0.1.0
commit = True
tag = True

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

0.1.0 (2021-10-15)
------------------

* First translation of code directly from GO

0.0.0 (2021-10-13)
------------------

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ Overview
:alt: Supported implementations
:target: https://pypi.org/project/component-generator

.. |commits-since| image:: https://img.shields.io/github/commits-since/onna/python-component-generator/v0.0.0.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/onna/python-component-generator/v0.1.0.svg
:alt: Commits since latest release
:target: https://github.com/onna/python-component-generator/compare/v0.0.0...master
:target: https://github.com/onna/python-component-generator/compare/v0.1.0...master



Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
year = '2021'
author = 'Darren Buttigieg'
copyright = '{0}, {1}'.format(year, author)
version = release = '0.0.0'
version = release = '0.1.0'

pygments_style = 'trac'
templates_path = ['.']
Expand Down
9 changes: 7 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
universal = 1

[flake8]
max-line-length = 140
exclude = .tox,.eggs,ci/templates,build,dist
max-line-length = 110
extend-ignore = E203
exclude = .tox,.eggs,ci/templates,build,dist,src/component_generator/component_files

[tool:pytest]
# If a pytest section is found in one of the possible config files
Expand Down Expand Up @@ -33,3 +34,7 @@ known_first_party = component_generator
default_section = THIRDPARTY
forced_separate = test_component_generator
skip = .tox,.eggs,ci/templates,build,dist

[mypy]
exclude = src/component_generator/component_files
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def read(*names, **kwargs):

setup(
name='component-generator',
version='0.0.0',
version='0.1.0',
license='BSD-2-Clause',
description='Generate backend components quickly',
long_description='%s\n%s' % (
Expand Down
2 changes: 1 addition & 1 deletion src/component_generator/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.0'
__version__ = '0.1.0'
2 changes: 1 addition & 1 deletion src/component_generator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- https://docs.python.org/2/using/cmdline.html#cmdoption-m
- https://docs.python.org/3/using/cmdline.html#cmdoption-m
"""
from component_generator.cli import main
from cli import main

if __name__ == "__main__":
main()
18 changes: 14 additions & 4 deletions src/component_generator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@
"""
import argparse

parser = argparse.ArgumentParser(description='Command description.')
parser.add_argument('names', metavar='NAME', nargs=argparse.ZERO_OR_MORE,
help="A name of something.")
from generate import generate_component, ComponentType

parser = argparse.ArgumentParser(description="Component Generator.")
parser.add_argument("--component", help="Component name.")
parser.add_argument("--service", help="Service name.")
parser.add_argument("--consumer", help="Consumer name.")


def main(args=None):
args = parser.parse_args(args=args)
print(args.names)

if not hasattr(args, "component"):
parser.error("Please pass component name")
generate_component(ComponentType.COMPONENT, args.component, args.component)
if args.service:
generate_component(ComponentType.SERVICE, args.service, args.component)
if args.consumer:
generate_component(ComponentType.CONSUMER, args.consumer, args.component)
Loading