1
0
Fork 0

Adding upstream version 0.12.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 10:57:24 +01:00
parent d887bee5ca
commit 148efc9122
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
69 changed files with 12923 additions and 0 deletions

47
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,47 @@
name: Build and Publish Package
on:
pull_request:
branches:
- main
types:
- closed
jobs:
publish-package:
if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') }}
runs-on: ubuntu-latest
steps:
- name: Check out repo main branch
uses: actions/checkout@v4
with:
ref: main
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.6.1
- name: Configure poetry
run: poetry config --no-interaction pypi-token.pypi ${{ secrets.FASTDATATABLE_PYPI_TOKEN }}
- name: Get project Version
id: project_version
run: echo "project_version=$(poetry version --short)" >> $GITHUB_OUTPUT
- name: Build package
run: poetry build --no-interaction
- name: Publish package to PyPI
run: poetry publish --no-interaction
- name: Create a Github Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.project_version.outputs.project_version }}
target_commitish: main
token: ${{ secrets.FASTDATATABLE_RELEASE_TOKEN }}
body_path: CHANGELOG.md
files: |
LICENSE
dist/*textual_fastdatatable*.whl
dist/*textual_fastdatatable*.tar.gz

58
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,58 @@
name: Create Release Branch
on:
workflow_dispatch:
inputs:
newVersion:
description: A version number for this release (e.g., "0.1.0")
required: true
jobs:
prepare-release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check out repo main branch
uses: actions/checkout@v4
with:
ref: main
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.6.1
- name: Create release branch
run: |
git checkout -b release/v${{ github.event.inputs.newVersion }}
git push --set-upstream origin release/v${{ github.event.inputs.newVersion }}
- name: Bump version
run: poetry version ${{ github.event.inputs.newVersion }} --no-interaction
- name: Ensure package can be built
run: poetry build --no-interaction
- name: Update CHANGELOG
uses: thomaseizinger/keep-a-changelog-new-release@v3
with:
version: ${{ github.event.inputs.newVersion }}
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Bumps version to ${{ github.event.inputs.newVersion }}
- name: Create pull request into main
uses: thomaseizinger/create-pull-request@1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/v${{ github.event.inputs.newVersion }}
base: main
title: v${{ github.event.inputs.newVersion }}
body: >
This PR was automatically generated. It bumps the version number
in pyproject.toml and updates CHANGELOG.md. You may have to close
this PR and reopen it to get the required checks to run.

53
.github/workflows/static.yml vendored Normal file
View file

@ -0,0 +1,53 @@
name: "Perform Static Analysis"
on:
pull_request:
# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true
jobs:
static:
name: Static Analysis - 3.11
runs-on: ubuntu-latest
steps:
- name: Check out Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python 3.11
uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.11"
- name: Load cached Poetry installation
id: cached-poetry-install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-0
- name: Install Poetry
if: steps.cached-poetry-install.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: static-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install python dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --sync --no-interaction --without dev
- name: Run analysis
run: |
source .venv/bin/activate
ruff format --check
ruff check .
mypy

88
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,88 @@
name: Test
on:
push:
branches: [ main ]
pull_request:
# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
test-windows:
name: Windows - 3.10
runs-on: Windows-latest
steps:
- name: Check out Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
- name: Install python dependencies
run: poetry install --sync --no-interaction --only main,test
- name: Run tests
run: poetry run pytest
test:
name: ${{ matrix.os }} - ${{ matrix.py }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu
- MacOs
py:
- "3.11"
- "3.10"
- "3.9"
steps:
- name: Check out Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python ${{ matrix.py }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Load cached Poetry installation
id: cached-poetry-install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
if: steps.cached-poetry-install.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install python dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --sync --no-interaction --only main,test
- name: Run tests
run: |
source .venv/bin/activate
pytest