Skip to content

Commit

Permalink
Update project config.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Feb 2, 2025
1 parent aad15b3 commit 260cb76
Show file tree
Hide file tree
Showing 5,582 changed files with 8,877 additions and 8,134 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
101 changes: 55 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,74 @@ on:
branches:
- main
workflow_call:
inputs:
attest-package:
description: "Create GitHub provenance attestation for the package."
default: "false"
type: string
outputs:
artifact-name:
description: "Name of the uploaded artifact; use for artifact retrieval."
value: ${{ jobs.package.outputs.artifact-name }}

jobs:
beefore:
name: Pre-test checks
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
task:
- 'flake8'
- 'towncrier-check'
- 'docs'
- 'package'
steps:
# Fetch main branch for comparison, then check out current branch.
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.X
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade tox
- name: Run pre-test check
run: |
tox -e ${{ matrix.task }}
pre-commit:
name: Pre-commit checks
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main

towncrier:
name: Check towncrier
uses: beeware/.github/.github/workflows/towncrier-run.yml@main

python-versions:
package:
name: Package Colosseum
permissions:
id-token: write
contents: read
attestations: write
uses: beeware/.github/.github/workflows/python-package-create.yml@main
with:
attest: ${{ inputs.attest-package }}

unit-tests:
name: Python compatibility test
needs: beefore
needs: [ pre-commit, towncrier, package ]
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
include:
# Builds must pass by default
- experimental: false

- python-version: "3.12-dev"
# Development Python can fail without failing the entire job
- python-version: "3.14"
experimental: true

steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install tox
allow-prereleases: true

- name: Get Packages
uses: actions/[email protected]
with:
name: ${{ needs.package.outputs.artifact-name }}
path: dist

- name: Install Tox
uses: beeware/.github/.github/actions/install-requirement@main
with:
requirements: tox
extra: dev

- name: Test
run: |
tox -e py
run: tox -e py --installpkg dist/colosseum-*.whl
12 changes: 12 additions & 0 deletions .github/workflows/config-file-deps-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Bump Config File Dependencies

on:
schedule:
- cron: "0 20 * * SUN" # Sunday @ 2000 UTC
workflow_dispatch:

jobs:
dep-bump-versions:
name: Bump Config File Dependencies
uses: beeware/.github/.github/workflows/dep-version-bump.yml@main
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Update pre-commit

on:
schedule:
- cron: "0 20 * * SUN" # Sunday @ 2000 UTC
workflow_dispatch:

jobs:
pre-commit-update:
name: Update pre-commit
uses: beeware/.github/.github/workflows/pre-commit-update.yml@main
secrets: inherit
33 changes: 13 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@ on:
types: published

jobs:
publish:
deploy:
runs-on: ubuntu-latest
permissions:
# This permission is required for trusted publishing.
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install tox
- name: Build release artefacts
run: |
tox -e package
- name: Publish release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
tox -e publish
- uses: dsaltares/[email protected]
with:
version: tags/${{ github.event.release.tag_name }}
file: ${{ github.event.repository.name }}.*
regex: true
target: dist/

- name: Publish release to production PyPI
uses: pypa/gh-action-pypi-publish@release/v1
58 changes: 47 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,58 @@ name: Create Release
on:
push:
tags:
- 'v*'
- "v*"

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
with:
attest-package: "true"

release:
name: Create Release
needs: ci
runs-on: ubuntu-latest
permissions:
contents: write
# This permission is required for trusted publishing.
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set build variables
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" | tee -a $GITHUB_ENV
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.x"

- name: Get packages
uses: actions/[email protected]
with:
name: ${{ needs.ci.outputs.artifact-name }}
path: dist

- name: Install packages
run: pip install dist/*.whl

- name: Check version number
# Check that the setuptools_scm-generated version number is still the same when
# installed from a wheel with setuptools_scm not present.
run: |
set -x
test $(python -c "from colosseum import __version__; print(__version__)") = $VERSION
- name: Create release
uses: ncipollo/[email protected]
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
name: ${{ env.VERSION }}
draft: true
prerelease: false
artifacts: dist/*
artifactErrorsFailBuild: true

- name: Publish release to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: check-case-conflict
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
additional_dependencies: [toml]
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Contributing

PyBee <3's contributions!
PyBee <3's contributions!

Please be aware, PyBee operates under a Code of Conduct.
Please be aware, PyBee operates under a Code of Conduct.

See [CONTRIBUTING to PyBee](http://pybee.org/contributing) for details.

14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Colosseum
.. image:: https://img.shields.io/discord/836455665257021440?label=Discord%20Chat&logo=discord&style=plastic
:target: https://beeware.org/bee/chat/
:alt: Discord server

An independent implementation of the CSS layout algorithm. This
implementation is completely standalone - it isn't dependent on
a browser, and can be run over any box-like set of objects that
Expand Down Expand Up @@ -72,16 +72,16 @@ Contributing
If you experience problems with Colosseum, `log them on GitHub`_. If you
want to contribute code, please `fork the code`_ and `submit a pull request`_.

.. _hands-on tutorial for beginners: http://colosseum.readthedocs.io/en/latest/tutorial/tutorial-1.html
.. _how-to guides and recipes: http://colosseum.readthedocs.io/en/latest/how-to/index.html
.. _background: http://colosseum.readthedocs.io/en/latest/background/index.html
.. _Technical reference: http://colosseum.readthedocs.io/en/latest/reference/index.html
.. _BeeWare suite: http://beeware.org
.. _hands-on tutorial for beginners: https://colosseum.readthedocs.io/en/latest/tutorial/tutorial-1.html
.. _how-to guides and recipes: https://colosseum.readthedocs.io/en/latest/how-to/index.html
.. _background: https://colosseum.readthedocs.io/en/latest/background/index.html
.. _Technical reference: https://colosseum.readthedocs.io/en/latest/reference/index.html
.. _BeeWare suite: https://beeware.org
.. _Read The Docs: https://colosseum.readthedocs.io
.. _@[email protected] on Mastodon: https://fosstodon.org/@beeware
.. _Discord: https://beeware.org/bee/chat/
.. _Github Discussions forum: https://github.com/beeware/colosseum/discussions
.. _BeeWare Community Code of Conduct: http://beeware.org/community/behavior/
.. _BeeWare Community Code of Conduct: https://beeware.org/community/behavior/
.. _log them on Github: https://github.com/beeware/colosseum/issues
.. _fork the code: https://github.com/beeware/colosseum
.. _submit a pull request: https://github.com/beeware/colosseum/pulls
2 changes: 1 addition & 1 deletion changes/75.misc.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Added a negative percentage check in the validator, and added less than dunder to Percentage class.
Added a negative percentage check in the validator, and added less than dunder to Percentage class.
2 changes: 1 addition & 1 deletion changes/79.misc.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Added CI checks for code style, MANIFEST.in, and news snippets.
Added CI checks for code style, MANIFEST.in, and news snippets.
2 changes: 1 addition & 1 deletion changes/90.misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Update discussion and social media links.

* Remove links to Twitter and Gitter.
* Remove unused target definitions for Google discussion groups.
* Add links to Discord, Mastodon, and the Discussions forum.
* Add links to Discord, Mastodon, and the Discussions forum.
Loading

0 comments on commit 260cb76

Please sign in to comment.