Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update workflow for support python 3.11 & add link to web ui in readme #54

Merged
merged 2 commits into from
Aug 17, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
needs: [flake8_py3]
strategy:
matrix:
python: [3.7, 3.8, 3.9, '3.10']
python: [3.7, 3.8, 3.9, '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down
21 changes: 10 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
repos:
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pycqa/isort
rev: 5.4.2
hooks:
- id: isort

- repo: https://github.com/ambv/black
rev: stable
rev: 23.7.0
hooks:
- id: black
language_version: python3.8
language_version: python3.11
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
language_version: python3.11
args: ['--profile', 'black']
- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
rev: 6.1.0
hooks:
- id: flake8
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
**v0.14.0**
## Updates

1. Python 3.11 support.


**v0.13.0**
## New feature

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

![badge1](https://img.shields.io/pypi/v/omymodels) ![badge2](https://img.shields.io/pypi/l/omymodels) ![badge3](https://img.shields.io/pypi/pyversions/omymodels)![workflow](https://github.com/xnuinside/omymodels/actions/workflows/main.yml/badge.svg)

Big example you can find in example/ folder on the github: https://github.com/xnuinside/omymodels/tree/main/example

## Try in Web-UI
Try the online O!MyModels converter or simply use it online: https://archon-omymodels-online.hf.space/ (A big thanks for that goes to https://github.com/archongum)

## Examples
You can find usage examples in the example/ folder on GitHub: https://github.com/xnuinside/omymodels/tree/main/example

## About library

O! My Models (omymodels) is a library that allow you to **generate** different ORM & pure Python models from SQL DDL or **convert** one models type to another (exclude SQLAlchemy Table, it does not supported yet by py-models-parser).

Expand Down Expand Up @@ -295,8 +302,17 @@ Any questions? Ping me in Telegram: https://t.me/xnuinside or mail xnuinside@gma

If you see any bugs or have any suggestions - feel free to open the issue. Any help will be appritiated.

## Appretiation & thanks

One more time, big 'thank you!' goes to https://github.com/archongum for Web-version: https://archon-omymodels-online.hf.space/

## Changelog
**v0.14.0**
## Updates

1. Python 3.11 support.


**v0.13.0**
## New feature

Expand Down
26 changes: 25 additions & 1 deletion docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ O! My Models
:alt: workflow


Big example you can find in example/ folder on the github: https://github.com/xnuinside/omymodels/tree/main/example
Try in Web-UI
-------------

Try the online O!MyModels converter or simply use it online: https://archon-omymodels-online.hf.space/ (A big thanks for that goes to https://github.com/archongum)

Examples
--------

You can find usage examples in the example/ folder on GitHub: https://github.com/xnuinside/omymodels/tree/main/example

About library
-------------

O! My Models (omymodels) is a library that allow you to **generate** different ORM & pure Python models from SQL DDL or **convert** one models type to another (exclude SQLAlchemy Table, it does not supported yet by py-models-parser).

Expand Down Expand Up @@ -311,9 +322,22 @@ Any questions? Ping me in Telegram: https://t.me/xnuinside or mail xnuinside@gma

If you see any bugs or have any suggestions - feel free to open the issue. Any help will be appritiated.

Appretiation & thanks
---------------------

One more time, big 'thank you!' goes to https://github.com/archongum for Web-version: https://archon-omymodels-online.hf.space/

Changelog
---------

**v0.14.0**

Updates
-------


#. Python 3.11 support.

**v0.13.0**

New feature
Expand Down
13 changes: 2 additions & 11 deletions example/dataclass_defaults.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
from enum import Enum
import datetime
from typing import List, Union
from dataclasses import dataclass
from enum import Enum
from typing import List, Union


class MaterialType(str, Enum):

article = "article"
video = "video"


@dataclass
class Material:

id: int
title: str
link: str
Expand All @@ -25,44 +23,38 @@ class Material:

@dataclass
class Author:

id: int
name: str = None
link: str = None


@dataclass
class MaterialAuthors:

category: int = None
material: int = None


@dataclass
class MaterialPlatforms:

category: int = None
material: int = None


@dataclass
class Platform:

id: int
name: str
link: str


@dataclass
class MaterialCategories:

category: int = None
material: int = None


@dataclass
class Category:

id: int
name: str
description: str = None
Expand All @@ -72,7 +64,6 @@ class Category:

@dataclass
class ContentFilters:

category: int = None
channels: List[str] = None
words: List[str] = None
Expand Down
13 changes: 2 additions & 11 deletions example/dataclass_no_defaults.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
from enum import Enum
import datetime
from typing import List, Union
from dataclasses import dataclass
from enum import Enum
from typing import List, Union


class MaterialType(str, Enum):

article = "article"
video = "video"


@dataclass
class Material:

id: int
title: str
description: str
Expand All @@ -25,44 +23,38 @@ class Material:

@dataclass
class Author:

id: int
name: str
link: str


@dataclass
class MaterialAuthors:

category: int
material: int


@dataclass
class MaterialPlatforms:

category: int
material: int


@dataclass
class Platform:

id: int
name: str
link: str


@dataclass
class MaterialCategories:

category: int
material: int


@dataclass
class Category:

id: int
name: str
description: str
Expand All @@ -72,7 +64,6 @@ class Category:

@dataclass
class ContentFilters:

category: int
channels: List[str]
words: List[str]
Expand Down
14 changes: 3 additions & 11 deletions example/gino_orm_models.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
from enum import Enum
from sqlalchemy.sql import func
from sqlalchemy.dialects.postgresql import JSON, ARRAY

from gino import Gino
from sqlalchemy.dialects.postgresql import ARRAY, JSON
from sqlalchemy.sql import func

db = Gino()


class MaterialType(str, Enum):

article = "article"
video = "video"


class Material(db.Model):

__tablename__ = "material"

id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
Expand All @@ -27,7 +26,6 @@ class Material(db.Model):


class Author(db.Model):

__tablename__ = "author"

id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
Expand All @@ -36,23 +34,20 @@ class Author(db.Model):


class MaterialAuthors(db.Model):

__tablename__ = "material_authors"

category = db.Column(db.Integer(), db.ForeignKey("author.id"))
material = db.Column(db.Integer(), db.ForeignKey("material.id"))


class MaterialPlatforms(db.Model):

__tablename__ = "material_platforms"

category = db.Column(db.Integer(), db.ForeignKey("platform.id"))
material = db.Column(db.Integer(), db.ForeignKey("material.id"))


class Platform(db.Model):

__tablename__ = "platform"

id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
Expand All @@ -61,15 +56,13 @@ class Platform(db.Model):


class MaterialCategories(db.Model):

__tablename__ = "material_categories"

category = db.Column(db.Integer(), db.ForeignKey("category.id"))
material = db.Column(db.Integer(), db.ForeignKey("material.id"))


class Category(db.Model):

__tablename__ = "category"

id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
Expand All @@ -80,7 +73,6 @@ class Category(db.Model):


class ContentFilters(db.Model):

__tablename__ = "content_filters"

category = db.Column(db.Integer(), db.ForeignKey("category.id"))
Expand Down
Loading
Loading