Skip to content
Open
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: 0 additions & 11 deletions .editorconfig

This file was deleted.

29 changes: 0 additions & 29 deletions .flake8

This file was deleted.

30 changes: 20 additions & 10 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,42 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I guess this workflow still releases a new package, right? This is not mentioned anymore

# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Upload Python Package to PyPI

on:
release:
types:
- published
push:
tags:
- 'v*'
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.13'

- name: Install UV
uses: astral-sh/setup-uv@v7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
make install

- name: Build package
run: python -m build
run: |
make build

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,38 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test Python package with Tox
name: LocalStack py-avro-schema / Run Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.11'
- '3.12'
- '3.13'

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Run Tox commands
run: python -m tox
make install-dev

- name: Linting
run: |
make lint

- name: Execute tests
run: |
make test
50 changes: 0 additions & 50 deletions .pre-commit-config.yaml
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: should we keep precommit, but maybe use the same as LocalStack? ruff, etc?

This file was deleted.

20 changes: 0 additions & 20 deletions .readthedocs.yaml

This file was deleted.

34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
VENV_DIR ?= .venv
VENV_RUN = . $(VENV_DIR)/bin/activate
VENV_ACTIVATE = $(VENV_DIR)/bin/activate
TEST_PATH ?= .
TEST_EXEC ?= python -m
PYTEST_LOGLEVEL ?= warning

install:
uv venv --clear
uv sync --no-dev
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting new API 😄 I haven't really used uv yet, but I guess this is somewhat compatible with the pip commands. I wonder which direction we're going to go for LS!


install-dev:
uv venv --clear
uv sync --group testing --group linting

clean:
rm -rf $(VENV_DIR)

clean-dist:
rm -rf dist/

build:
uv build

format:
($(VENV_RUN); python -m ruff format; python -m ruff check --output-format=full --fix .)

lint:
($(VENV_RUN); python -m ruff check --output-format=full . && python -m ruff format --check .)

test:
($(VENV_RUN); $(TEST_EXEC) pytest --durations=10 --log-cli-level=$(PYTEST_LOGLEVEL) $(PYTEST_ARGS) $(TEST_PATH))

.PHONY: clean install install-dev clean clean-dist build publish format lint test
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# localstack py-avro-schema

This project is a fork of [py-avro-schema](https://github.com/jpmorganchase/py-avro-schema) (see the original README
below).

## Developing

To setup a virtual environment under `.venv/`, first install `uv`, then run:

```shell
make install-dev
```

## Release a new version

To release a new version you can create a tag with the following commands:

```shell
git tag v4.0.0
git push origin v4.0.0
```

This will create a git tag and push it to the remote repository.
This will trigger the build workflow and publish the package to PyPI.

---

# py-avro-schema

Generate [Apache Avro][] schemas for Python types including standard library [data-classes][] and [Pydantic data models][].
Expand Down
54 changes: 0 additions & 54 deletions docs/conf.py

This file was deleted.

30 changes: 0 additions & 30 deletions docs/index.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/modules.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/py_avro_schema.rst

This file was deleted.

Loading