Skip to content

Commit

Permalink
Merge pull request #1 from idiap/updates
Browse files Browse the repository at this point in the history
Drop Python 3.7 and 3.8, update build and metadata
  • Loading branch information
eginhard authored Oct 17, 2024
2 parents 47f39ea + 777e7a7 commit 2690289
Show file tree
Hide file tree
Showing 22 changed files with 135 additions and 856 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
37 changes: 10 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,26 @@ on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
check_skip:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
steps:
- run: echo "${{ github.event.head_commit.message }}"

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
- name: check OS
run: cat /etc/os-release
- name: Install Make
run: |
sudo apt-get update
sudo apt-get install --reinstall make
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install Coqpit
run: |
pip install -r requirements_dev.txt
pip install -r requirements.txt
pip install -e .
version: "0.4.21"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Lint check
run: make lint
- name: Unit tests
run: make test
- name: Test package build
run: |
pip install build
python -m build
run: uv build
54 changes: 36 additions & 18 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,49 @@ defaults:
shell:
bash
jobs:
build-package:
runs-on: ubuntu-20.04
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Verify tag matches version
run: |
set -ex
version=$(cat VERSION)
version=$(grep -m 1 version pyproject.toml | grep -P '\d+\.\d+\.\d+' -o)
tag="${GITHUB_REF/refs\/tags\/}"
if [[ "v$version" != "$tag" ]]; then
exit 1
fi
- uses: actions/setup-python@v2
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: 3.9
- run: |
python -m pip install -U pip setuptools twine build
- run: |
python -m build
- name: Setup PyPI config
version: "0.4.21"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Set up Python
run: uv python install
- name: Build sdist and wheel
run: uv build
- name: Test installation of sdist and wheel
run: |
cat << EOF > ~/.pypirc
[pypi]
username=__token__
password=${{ secrets.PYPI_TOKEN }}
EOF
- run: |
twine upload --repository pypi dist/*
uv venv --no-project
uv pip install dist/*.tar.gz
uv pip install dist/*.whl
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/coqpit*
publish-artifacts:
runs-on: ubuntu-latest
needs: [build]
environment:
name: release
url: https://pypi.org/p/coqui-tts-coqpit
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: "dist"
path: "dist/"
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Binary file removed .pre-commit-2.12.1.pyz
Binary file not shown.
29 changes: 8 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v2.3.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: 'https://github.com/psf/black'
rev: 20.8b1
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/pycqa/pylint
rev: v2.8.2
hooks:
- id: pylint
Loading

0 comments on commit 2690289

Please sign in to comment.