mirror of
https://github.com/creyD/creyPY.git
synced 2026-06-11 20:52:23 +02:00
Compare commits
7 Commits
3.1.0rc56
...
171ea78ac2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
171ea78ac2 | ||
|
|
34f59bedbe | ||
|
|
8ce6ba5bf5 | ||
|
|
68f7bf2d6d | ||
|
|
500378e120 | ||
|
|
998c5765bc | ||
| 5b74ed5620 |
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: psf/black@stable
|
||||
with:
|
||||
options: "-l 100 --exclude '/.venv/|/__init__.py'"
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
with:
|
||||
no_commit: True
|
||||
options: --in-place --remove-all-unused-imports -r --exclude **/__init__.py,**/db/models.py,
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
- uses: stefanzweifel/git-auto-commit-action@v7
|
||||
with:
|
||||
commit_message: Adjusted files for isort & autopep
|
||||
|
||||
@@ -35,8 +35,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- run: python -m pip install --upgrade pip
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
contents: write # for the tags
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-tags: true
|
||||
ref: ${{ github.ref_name }}
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Git Version
|
||||
uses: PaulHatch/semantic-version@v5.4.0
|
||||
uses: PaulHatch/semantic-version@v6.0.2
|
||||
id: git_version
|
||||
with:
|
||||
tag_prefix: ""
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
git push origin ${{ steps.git_version.outputs.version }}
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import Column, DateTime, String
|
||||
from sqlalchemy import Column, DateTime, PrimaryKeyConstraint, String
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy.ext.declarative import declared_attr
|
||||
from sqlalchemy.orm import as_declarative
|
||||
@@ -23,6 +23,11 @@ class Base(AutoAnnotateMixin, AutoInitMixin):
|
||||
|
||||
# TODO: Add automated foreign key resolution
|
||||
|
||||
# Add name to primary key constraint to ensure alembic can pick it up later
|
||||
@declared_attr
|
||||
def __table_args__(cls):
|
||||
return (PrimaryKeyConstraint("id", name=f"pk_{cls.__tablename__}"),)
|
||||
|
||||
# Generate __tablename__ automatically
|
||||
@declared_attr
|
||||
def __tablename__(cls) -> str:
|
||||
|
||||
@@ -1 +1 @@
|
||||
stripe==12.3.0 # Stripe
|
||||
stripe==15.2.0 # Stripe
|
||||
|
||||
Reference in New Issue
Block a user