lmmx / botodto Goto Github PK
View Code? Open in Web Editor NEWPydantic model codegen from AWS OpenAPI schemas generated from the AWS JS/TS SDK (v3)
License: MIT License
Pydantic model codegen from AWS OpenAPI schemas generated from the AWS JS/TS SDK (v3)
License: MIT License
We typically just have a single setup.py
script which uses find_packages("src")
and follows a src layout.
To ship multiple packages (let's say for APIs named "a", "b", "c"), we'd want:
botodto-monorepo/
botodto-a/
setup.py
botodto_a/
__init__.py
...
botodto-b/
setup.py
b/
__init__.py
...
botodto-c/
setup.py
c/
__init__.py
...
name: Publish botodto-a to PyPI
on:
push:
branches:
- main
paths:
- 'botodto-a/**'
- 'updated_packages.json'
- '.github/workflows/botodto-a.yml'
jobs:
build-n-publish:
name: Build and publish botodto-a to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/botodto-a
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Cache pip packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Check if package was updated
id: check
run: echo "::set-output name=updated::$(jq -r '.botodto-a' updated_packages.json)"
- name: Set up Python
if: steps.check.outputs.updated == 'true'
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install pypa/build
if: steps.check.outputs.updated == 'true'
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
if: steps.check.outputs.updated == 'true'
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution to PyPI
if: steps.check.outputs.updated == 'true' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
I might be able to come up with a way to represent ambiguity or identify an undocumented part of the response that will name the error type.
E.g. InvalidArn
, surely part of the response somewhere? Even if only as constr
Pydantic pattern?
Also get datamodel-codegen into the development dependencies? Not sure. Generate DTOs as documented already from v2 OpenAPI representations anyway.
Create Pydantic models with keys from the members
of the StructShape-type shapes in the v3-only set.
It looks like they're all going to be simple singleton objects with a message of type ErrorMessage (which is a simple string type).
I didn't count the different types of shape but I did begin to whittle down the enum.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.