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
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Run flake8
run: flake8 py_models_parser/ tests/

tox:
tests:
runs-on: ubuntu-latest
needs: [flake8]
strategy:
Expand All @@ -37,6 +37,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Run tox
run: tox -e py$(echo ${{ matrix.python-version }} | tr -d '.')
pip install poetry
poetry install
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Test with pytest
run: pytest tests/ -vv
100 changes: 100 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2025-01-18

### Added

**Pydantic 2.x Support**
- Union types with `|` operator (PEP 604): `int | None`, `str | None`
- `Field()` with validation constraints: `max_length`, `min_length`, `gt`, `ge`, `lt`, `le`
- `model_config` with `ConfigDict` handling
- Nested generic types: `list[dict[str, str]]`, `dict[str, list[int]]`

**OpenAPI 3.0/Swagger Support**
- New `parse_openapi()` function to parse OpenAPI specs from string
- New `parse_openapi_file()` function to parse from YAML or JSON files
- Supports OpenAPI 3.0 `components/schemas` and Swagger 2.0 `definitions`
- Type mapping from OpenAPI types to Python types
- Support for `$ref`, `allOf`, `oneOf`, `anyOf` compositions

**Python Version Support**
- Added support for Python 3.12
- Added support for Python 3.13

**Documentation**
- Added ARCHITECTURE.md with project documentation

### Changed

**Breaking Changes**
- Dropped support for Python 3.7
- Dropped support for Python 3.8
- Minimum required Python version is now 3.9

**Dependencies**
- Added `pyyaml` dependency for OpenAPI parsing

### Testing
- Added 8 new tests for Pydantic 2.x features
- Added 15 tests for OpenAPI parsing
- Updated CI to test Python 3.9, 3.10, 3.11, 3.12, 3.13

## [0.7.0]

### Changed
- Updated to latest version of parsimonious
- Library now works with Python 3.11

## [0.6.0]

### Added
- Support for [Encode ORM](https://github.com/encode/orm) models
- Support for [Piccolo ORM](https://piccolo-orm.readthedocs.io/en/latest/piccolo/schema/defining.html) models

## [0.5.1]

### Fixed
- Multiple parent names in "parents" output were sometimes joined in one string

## [0.5.0]

### Added
- Base support for PyDAL tables definitions
- Support for Python list syntax like `[]`

## [0.4.0]

### Fixed
- Return tuples (multiple values) are now parsed correctly
- Symbols like `*&^%$#!±~`§<>` no longer cause errors
- Classes without any args no longer cause errors

## [0.3.0]

### Added
- CLI command `pmp` with `-d`, `--dump` arguments
- Support for simple Django ORM models
- Base support for pure Python classes

## [0.2.0]

### Added
- Support for Dataclasses
- `parse_from_file()` method
- Correct handling of types with comma inside: `Union[dict, list]`, `Union[dict, list, tuple, anything]`

## [0.1.1]

### Added
- Base parser logic for:
- Pydantic models
- Python Enums
- SQLAlchemy Models
- GinoORM models
- TortoiseORM models
- Initial test suite
49 changes: 0 additions & 49 deletions CHANGELOG.txt

This file was deleted.

Loading