Skip to content

Commit ed361a1

Browse files
committed
Implement python package structure with Poetry
1 parent 642bc7a commit ed361a1

File tree

7 files changed

+306
-0
lines changed

7 files changed

+306
-0
lines changed

poetry.lock

Lines changed: 265 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[tool.poetry]
2+
name = "ucb-api"
3+
version = "0.1.0"
4+
description = "Python package for Unity Cloud Build api"
5+
authors = ["leynier <leynier41@gmail.com>"]
6+
readme = "README.md"
7+
8+
[tool.poetry.scripts]
9+
ucb-api = "ucb_api.main:app"
10+
11+
[tool.poetry.dependencies]
12+
python = "^3.7"
13+
typer = {extras = ["all"], version = "^0.3.2"}
14+
15+
[tool.poetry.dev-dependencies]
16+
pytest = "^5.2"
17+
18+
[build-system]
19+
requires = ["poetry>=0.12"]
20+
build-backend = "poetry.masonry.api"

tests/__init__.py

Whitespace-only changes.

tests/test_ucb_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from ucb_api import __version__
2+
3+
4+
def test_version():
5+
assert __version__ == '0.1.0'

ucb_api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.1.0'

ucb_api/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from .main import app
2+
3+
4+
app(prog_name="ucb-api")

ucb_api/main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import typer
2+
3+
4+
app = typer.Typer()
5+
6+
7+
@app.callback()
8+
def callback():
9+
"""
10+
Python package for Unity Cloud Build api
11+
"""

0 commit comments

Comments
 (0)