Skip to content

Commit

Permalink
0.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Hallett committed Sep 28, 2023
1 parent 3038f5e commit 382b81f
Show file tree
Hide file tree
Showing 33 changed files with 52 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
#----------------------------------------------
- name: Black check
run: |
poetry run black src/ --check
poetry run black clientele/ --check
- name: Ruff check
run: |
poetry run ruff src/
poetry run ruff clientele/
- name: Test with pytest
run: |
poetry run pytest -vv
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## 0.6.3

* Packaged application installs in the correct location. Resolving [#6](https://github.com/phalt/clientele/issues/6)
* Updated pyproject.toml to include a better selection of links.

## 0.6.2

* Ignore optional URL query parameters if they are `None`.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ release: ## Build a new version and release it
poetry publish

mypy: ## Run a static syntax check
poetry run mypy src/
poetry run mypy .

lint: ## Format the code correctly
poetry run black .
Expand Down
4 changes: 2 additions & 2 deletions src/cli.py → clientele/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def version():
"""
Print the current version of clientele
"""
from src.settings import VERSION
from clientele.settings import VERSION

print(f"clientele {VERSION}")

Expand Down Expand Up @@ -81,7 +81,7 @@ def generate(url, file, output, asyncio):

console = Console()

from src.generator import Generator
from clientele.generator import Generator

assert url or file, "Must pass either a URL or a file"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/generator.py → clientele/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

from openapi_core import Spec

from src.generators.clients import ClientsGenerator
from src.generators.http import HTTPGenerator
from src.generators.schemas import SchemasGenerator
from src.settings import CLIENT_TEMPLATE_ROOT, CONSTANTS_ROOT, VERSION
from src.writer import write_to_manifest
from clientele.generators.clients import ClientsGenerator
from clientele.generators.http import HTTPGenerator
from clientele.generators.schemas import SchemasGenerator
from clientele.settings import CLIENT_TEMPLATE_ROOT, CONSTANTS_ROOT, VERSION
from clientele.writer import write_to_manifest


class Generator:
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/generators/clients.py → clientele/generators/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from pydantic import BaseModel
from rich.console import Console

from src.generators.http import HTTPGenerator
from src.generators.schemas import SchemasGenerator
from src.settings import templates
from src.utils import (
from clientele.generators.http import HTTPGenerator
from clientele.generators.schemas import SchemasGenerator
from clientele.settings import templates
from clientele.utils import (
class_name_titled,
clean_prop,
create_query_args,
Expand All @@ -17,7 +17,7 @@
get_type,
schema_ref,
)
from src.writer import write_to_client
from clientele.writer import write_to_client

console = Console()

Expand Down
4 changes: 2 additions & 2 deletions src/generators/http.py → clientele/generators/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from openapi_core import Spec
from rich.console import Console

from src.settings import templates
from src.writer import write_to_http
from clientele.settings import templates
from clientele.writer import write_to_http

console = Console()

Expand Down
6 changes: 3 additions & 3 deletions src/generators/schemas.py → clientele/generators/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from openapi_core import Spec
from rich.console import Console

from src.settings import templates
from src.utils import (
from clientele.settings import templates
from clientele.utils import (
class_name_titled,
clean_prop,
get_schema_from_ref,
get_type,
schema_ref,
)
from src.writer import write_to_schemas
from clientele.writer import write_to_schemas

console = Console()

Expand Down
12 changes: 12 additions & 0 deletions clientele/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from os.path import abspath, dirname

from jinja2 import Environment, PackageLoader

CLIENT_TEMPLATE_ROOT = (
dirname(dirname(abspath(__file__))) + "/clientele/client_template/"
)
TEMPLATES_ROOT = dirname(dirname(abspath(__file__))) + "/clientele/templates/"
CONSTANTS_ROOT = dirname(dirname(abspath(__file__))) + "/clientele/"
VERSION = "0.6.3"

templates = Environment(loader=PackageLoader("clientele", "templates"))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## 0.6.3

* Packaged application installs in the correct location. Resolving [#6](https://github.com/phalt/clientele/issues/6)
* Updated pyproject.toml to include a better selection of links.

## 0.6.2

* Ignore optional URL query parameters if they are `None`.
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
[tool.poetry]
name = "clientele"
version = "0.6.2"
version = "0.6.3"
description = "Generate loveable Python HTTP API Clients"
authors = ["Paul Hallett <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{include = "src"}]
packages = [{include = "clientele"}]
homepage = "https://phalt.github.io/clientele/"

[tool.poetry.urls]
changelog = "https://phalt.github.io/clientele/CHANGELOG/"
documentation = "https://phalt.github.io/clientele/"
issues = "https://github.com/phalt/clientele/issues"

[tool.poetry.scripts]
clientele = "src.cli:cli_group"
clientele = "clientele.cli:cli_group"

[tool.poetry.dependencies]
python = "^3.9"
Expand Down
Empty file removed src/generators/__init__.py
Empty file.
10 changes: 0 additions & 10 deletions src/settings.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/async_test_client/MANIFEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipx install clientele

API VERSION: 0.1.0
OPENAPI VERSION: 3.0.2
CLIENTELE VERSION: 0.6.2
CLIENTELE VERSION: 0.6.3

Generated using this command:

Expand Down
2 changes: 1 addition & 1 deletion tests/test_client/MANIFEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipx install clientele

API VERSION: 0.1.0
OPENAPI VERSION: 3.0.2
CLIENTELE VERSION: 0.6.2
CLIENTELE VERSION: 0.6.3

Generated using this command:

Expand Down

0 comments on commit 382b81f

Please sign in to comment.