Skip to content
Merged
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
27 changes: 9 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
---
name: CI

on:
pull_request:
branches: [ master ]

branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Git
uses: actions/checkout@v2

- name: Install Python 3
uses: actions/setup-python@v2
- name: Install UV
uses: astral-sh/setup-uv@v6
with:
python-version: 3.9

enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev

run: uv sync --locked --dev
- name: Run linters
run: |
pipenv run mypy ./src

run: uv run mypy ./src
- name: Run tests
run: |
pipenv run python -m pip install -e .
pipenv run pytest
run: uv run pytest

26 changes: 10 additions & 16 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
---
name: Upload

on:
workflow_dispatch: # manual trigger
release:
types: [ created ]

types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Git
uses: actions/checkout@v2

- name: Install Python 3
uses: actions/setup-python@v2
- name: Install UV
uses: astral-sh/setup-uv@v6
with:
python-version: 3.9

enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev

uv sync --locked --dev
- name: Build package
run: |
pipenv run python -m build --no-isolation

uv build
- name: Publish package
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
38 changes: 0 additions & 38 deletions Makefile

This file was deleted.

18 changes: 0 additions & 18 deletions Pipfile

This file was deleted.

1,302 changes: 0 additions & 1,302 deletions Pipfile.lock

This file was deleted.

35 changes: 35 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env just --justfile

set quiet := true

# show help
help:
just --list

# build package
build:
uv build

# remove temp build files
clean:
rm -Rf dist/ .pytest_cache/ .mypy_cache/

# upload package to test repository
publish-test:
uv publish --index testpypi

# upload package to prod repository
publish:
uv publish

# install package with dependencies
sync:
uv sync

# run unit tests
test:
uv run pytest -qv

# run package linters
lint:
uv run mypy ./src
71 changes: 71 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[project]
name = "openapi3-parser"
version = "1.1.22"
description = "OpenAPI v3 parser"
readme = "readme.md"
license = { file = "license.txt" }
authors = [{ name = "Artem Manchenkov", email = "artem@manchenkoff.me" }]
keywords = [
"swagger",
"python",
"swagger-parser",
"openapi3-parser",
"parser",
"openapi3",
"swagger-api",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries",
]
requires-python = ">=3.9"
dependencies = ["openapi-spec-validator>=0.7.2", "prance>=23.6.21.0"]

[project.urls]
homepage = "https://github.com/manchenkoff/openapi3-parser"
source = "https://github.com/manchenkoff/openapi3-parser"

[dependency-groups]
dev = ["mypy>=1.18.2", "pytest>=8.4.2"]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.mypy]
python_version = 3.9

check_untyped_defs = true
follow_imports = "silent"
no_implicit_reexport = true
no_implicit_optional = true

strict_optional = true
strict_equality = true

ignore_missing_imports = true
ignore_errors = false

disallow_any_generics = false
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true

warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
warn_unreachable = true
warn_no_return = true
29 changes: 0 additions & 29 deletions setup.cfg

This file was deleted.

34 changes: 0 additions & 34 deletions setup.py

This file was deleted.

10 changes: 1 addition & 9 deletions src/openapi_parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
__version__ = '1.1.21'
__title__ = 'openapi3-parser'
__author__ = 'Artem Manchenkov'
__email__ = 'artem@manchenkoff.me'
__description__ = 'OpenAPI v3 parser'

from .parser import parse

__all__ = [
"parse"
]
__all__ = ["parse"]
Loading