-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Workflows + Optional Type Support (#4)
- Loading branch information
Showing
7 changed files
with
111 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Deploy SDK Docs | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install deps | ||
run: | | ||
pip install poetry poethepoet | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
cache: poetry | ||
cache-dependency-path: "poetry.lock" | ||
- name: Poetry install | ||
run: | | ||
poetry install --with dev,test,email | ||
- name: Run tests | ||
run: | | ||
poe test | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install deps | ||
run: | | ||
pip install poetry poethepoet | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
cache: poetry | ||
cache-dependency-path: "poetry.lock" | ||
- name: Poetry install | ||
run: | | ||
poetry install --with dev | ||
- name: Lint code | ||
run: | | ||
poe lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "dydantic" | ||
version = "0.0.5" | ||
version = "0.0.6" | ||
description = "Dynamically generate pydantic models from JSON schema." | ||
authors = ["William Fu-Hinthorn <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -9,6 +9,10 @@ readme = "README.md" | |
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
pydantic = "^2" | ||
email-validator = { version = "^2.1", optional = true } | ||
|
||
[tool.poetry.extras] | ||
email = ["email-validator"] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
ruff = "^0.3.5" | ||
|
@@ -20,6 +24,9 @@ mypy = "^1.9.0" | |
poethepoet = "^0.25.0" | ||
pytest = "^8.1.1" | ||
|
||
[tool.poetry.group.email.dependencies] | ||
email-validator = "^2.1.0" | ||
|
||
|
||
[tool.poetry.group.docs.dependencies] | ||
mkdocs = "^1.5.3" | ||
|
@@ -43,24 +50,13 @@ build-backend = "poetry.core.masonry.api" | |
ruff = "ruff" | ||
black = "black" | ||
mypy = "mypy" | ||
format = [ | ||
"ruff check --fix .", | ||
"black .", | ||
"ruff format ." | ||
] | ||
lint = [ | ||
"ruff check .", | ||
"mypy ." | ||
] | ||
format = ["ruff check --fix .", "black .", "ruff format ."] | ||
lint = ["ruff check .", "mypy ."] | ||
pytest = "poetry run pytest" | ||
test = "poetry run pytest tests" | ||
doctest = "pytest --doctest-modules dydantic" | ||
|
||
mkdocs = "poetry run mkdocs" | ||
build-docs ="mkdocs build --clean -f docs/mkdocs.yml" | ||
|
||
serve-docs = [ | ||
"build-docs", | ||
"mkdocs serve -f docs/mkdocs.yml", | ||
] | ||
build-docs = "mkdocs build --clean -f docs/mkdocs.yml" | ||
|
||
serve-docs = ["build-docs", "mkdocs serve -f docs/mkdocs.yml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters