Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COM-12618-Create pypi publishing CI workflow based on release tags #235

Merged
merged 1 commit into from
Jan 15, 2025
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,30 @@ jobs:
--notes "$NOTES"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish_to_pypi:
name: Publish to PyPI
runs-on: ubuntu-20.04
needs:
- create_release
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/pyproject.toml'
- name: Install dependencies
run: |
pip install setuptools setuptools-scm wheel build
- name: Build
run: |
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ suites.
## Description

Fluster requires **Python 3.6+** to work. It has zero dependencies apart from
that. The [requirements.txt](requirements.txt) file includes Python's modules
that. The [requirements.txt](https://github.com/fluendo/fluster/blob/master/requirements.txt) file includes Python's modules
used only for development.

The framework works with test suites. Each test suite is associated with one
codec and contains a number of test vectors. Each test vector consists of an
input file and and the expected result. The input file will be fed into each
decoder that supports the codec of the test suite. The file format is a JSON
file. You can find the ones included in the [test_suites](test_suites)
file. You can find the ones included in the [test_suites](https://github.com/fluendo/fluster/tree/master/test_suites)
directory.

The decoders are the ones in charge of doing the decoding given an input file.
They implement two methods: `decode` which is mandatory and `check` which is
optional. Check out the [decoder class](fluster/decoder.py) for reference. The
optional. Check out the [decoder class](https://github.com/fluendo/fluster/blob/master/fluster/decoder.py) for reference. The
`@register_decoder` decorator is used to ensure the framework takes them into
account. Fluster is agnostic as to how the decoding itself is done. So far, all
decoders are external processes that need to run with a number of parameters,
but they could actually be decoders written in Python as far as Fluster is
concerned. The [decoders](fluster/decoders) directory contains all supported
concerned. The [decoders](https://github.com/fluendo/fluster/tree/master/fluster/decoders) directory contains all supported
decoders.

In order to run the tests for the different test suites and decoders, a
Expand Down Expand Up @@ -528,7 +528,7 @@ optional arguments:

## Report

[Go to report](REPORT.md)
[Go to report](https://github.com/fluendo/fluster/blob/master/REPORT.md)

## FAQ

Expand All @@ -540,7 +540,7 @@ very appropriate name for testing decoders.

### How can I add a new decoder?

1. Create a new decoder in [fluster/decoders](fluster/decoders) directory.
1. Create a new decoder in [fluster/decoders](https://github.com/fluendo/fluster/tree/master/fluster/decoders) directory.
2. Implement the `decode` method.
3. Use the `register_decoder` decorator.
4. Ensure to set `hw_acceleration = True` if it requires hardware.
Expand All @@ -549,12 +549,12 @@ very appropriate name for testing decoders.

### How can I create a new test suite?

Check out the JSON format they follow in the [test_suites](test_suites)
Check out the JSON format they follow in the [test_suites](https://github.com/fluendo/fluster/tree/master/test_suites)
directory. Add a new json file within, Fluster will automatically pick it
up.

There is also a [generator script (H.264)](scripts/gen_jvt.py), [generator script (H.265)](scripts/gen_jct_vc.py), and a [generator script (H.266)](scripts/gen_jvet.py) for the [conformance
test suites](#test_suites) that you can use as a base to generate automatically
There is also a [generator script (H.264)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jvt.py), [generator script (H.265)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jct_vc.py), and a [generator script (H.266)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jvet.py) for the [conformance
test suites](#test-suites) that you can use as a base to generate automatically
new ones.

### How can I use it to test regressions?
Expand Down Expand Up @@ -596,7 +596,7 @@ results are obtained, we can do the following procedure:
1. Fork the repo.
2. Install the required Python modules for development using `pip3 install -r
requirements.txt`.
3. Install the [git hook](scripts/install_git_hook.sh) that will run for every
3. Install the [git hook](https://github.com/fluendo/fluster/blob/master/scripts/install_git_hook.sh) that will run for every
commit to ensure it works before pushing. [About git
hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks).
4. Modify the code. Make sure the git hook is properly checking that the basic
Expand All @@ -616,7 +616,7 @@ results are obtained, we can do the following procedure:
### How can I report an issue?

In case you find any problem or want to report something, don't hesitate to
search for similar [issues](issues). Only when the issue can't be found, a new
search for similar [issues](https://github.com/fluendo/fluster/issues). Only when the issue can't be found, a new
one should be created. Please try to provide as many details and context as
possible to help us diagnose it.

Expand Down
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "fluster-conformance"
version = "0.1"
version = "0.2.0.0" # TODO: Ensure that version 0.2.0 is marked as the final version in the CI release workflow only when we are certain about deploying a new release. This prevents creating an irreversible history in PyPI, which would block re-uploading the same version.
authors = [
{name = "Pablo Marcos Oltra"},
{name = "Andoni Morales Alastruey", email="[email protected]"},
{name = "Pablo Marcos Oltra"},
]
maintainers = [
{name = "Michalis Dimopoulos", email="[email protected]"},
Expand All @@ -27,6 +27,9 @@ classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia",
"Topic :: Multimedia :: Sound/Audio",
Expand All @@ -35,6 +38,9 @@ classifiers = [
"Topic :: Software Development :: Testing",
]

[tool.setuptools.package-data]
"additional_documents" = ["REPORT.md"]

[project.urls]
"Github repository" = "https://github.com/fluendo/fluster/"

Expand Down