Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8743a48
Standardize imports
BKDDFS Sep 12, 2024
5bec673
Fix E2E tests on macOS ARM64 by using multi-arch base image
BKDDFS Jan 26, 2026
c65ac87
refactor: simplify architecture - use docker-compose directly
BKDDFS Jan 27, 2026
3366ec6
refactor: rename extractor_service to perfectframe and simplify proje…
BKDDFS Jan 27, 2026
8d17573
feat: migrate from TensorFlow to ONNX Runtime
BKDDFS Jan 27, 2026
e5c0d49
chore: configure Ruff linter and pre-commit hooks
BKDDFS Jan 27, 2026
bf628ed
fix: resolve ty type checker errors in pre-commit
BKDDFS Jan 27, 2026
2999cfe
chore: update Python target version to 3.13
BKDDFS Jan 27, 2026
5964e23
test: enforce 100% coverage in CI and pre-commit
BKDDFS Jan 27, 2026
0a0a421
feat: switch to onnxruntime-gpu with automatic GPU/CPU fallback
BKDDFS Jan 27, 2026
05baa39
refactor: clean up docstrings and README
BKDDFS Jan 27, 2026
f3b4d14
refactor: improve type annotations and add runtime type checks
BKDDFS Jan 27, 2026
6a079d8
fix: race condition between extractor check and flag set
BKDDFS Jan 27, 2026
a8aac92
refactor: use ExtractorName enum for active_extractor type
BKDDFS Jan 27, 2026
eb85fcc
refactor: improve type annotations in video_processors
BKDDFS Jan 27, 2026
6767de6
refactor: rename target_image_size to input_size with ImageResolution…
BKDDFS Jan 28, 2026
737e9dc
fix: update tests and code to use enum .value for string representation
BKDDFS Jan 28, 2026
20e6d7a
docs: improve README Usage section, remove Tests/Roadmap/Polski
BKDDFS Jan 28, 2026
b38e60f
refactor: merge InceptionResNetNIMA and _ONNXModel into NIMAEvaluator
BKDDFS Jan 28, 2026
8492c64
ci: add release-please and PR title validation
BKDDFS Jan 29, 2026
bbbded5
feat: add Docker macOS ARM64 support and CI improvements
BKDDFS Jan 29, 2026
e4d1929
ci: add SBOM attestation and versioned filename on release
BKDDFS Jan 29, 2026
70a2fc6
ci: add OpenSSF Scorecard workflow
BKDDFS Jan 29, 2026
519d097
docs: add OpenSSF Scorecard badge
BKDDFS Jan 29, 2026
de3be33
Merge branch 'main' into feat/docker-macos-arm64-support
BKDDFS Jan 29, 2026
7c54a71
ci: replace lint job with pre-commit in CI workflow
BKDDFS Jan 29, 2026
80de99a
ci: add dev branch to CI and CodeQL workflows
BKDDFS Jan 29, 2026
1a3ecbe
ci: add SonarCloud integration
BKDDFS Jan 29, 2026
65a5d2d
security: move workflow permissions to job level
BKDDFS Jan 29, 2026
2a1de06
ci: pin trivy-action to v0.28.0
BKDDFS Jan 29, 2026
1ec071f
ci: add --group test to uv run commands
BKDDFS Jan 29, 2026
77b86d8
ci: add pytest-timeout to test dependencies
BKDDFS Jan 29, 2026
889f9a7
ci: update all GitHub Actions to latest versions
BKDDFS Jan 29, 2026
50afe04
ci: fix docker image name for Trivy scanner
BKDDFS Jan 29, 2026
af7a0d6
ci: remove SonarCloud CI workflow in favor of Automatic Analysis
BKDDFS Jan 29, 2026
260cd55
security: run container as non-root user
BKDDFS Jan 29, 2026
e163bee
fix: ensure proper permissions for non-root container user
BKDDFS Jan 30, 2026
6508f5e
fix: address silent failures, typos, and license inconsistency
BKDDFS Jan 30, 2026
a6972b9
refactor: merge consecutive RUN instructions in Dockerfile
BKDDFS Jan 30, 2026
9628ed8
ci: add uv package ecosystem to Dependabot
BKDDFS Jan 30, 2026
e51dc2c
chore: change license from GPL v3 to Apache 2.0
BKDDFS Jan 30, 2026
5317079
fix: improve README badge consistency and order
BKDDFS Jan 30, 2026
d406a42
fix: remove wide badges for single-line layout
BKDDFS Jan 30, 2026
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
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Default owner
* @BKDDFS

# Critical paths
perfectframe/ @BKDDFS
tests/ @BKDDFS
.github/ @BKDDFS
Dockerfile @BKDDFS
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ in addressing your issue, assessing changes, and helping you finalize your pull
> I am still learning how to be an effective maintainer for our project. I am committed to improving, so please feel free to share any feedback or suggestions you might have. Thank you!

PerfectFrameAI is an open source project and we love to receive contributions from our community — you!
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation,
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation,
submitting bug reports and feature requests or writing code which can be incorporated into PerfectFrameAI itself.

## Code of Conduct
This project and everyone participating in it is governed by this [Code of Conduct](https://github.com/BKDDFS/PerfectFrameAI/blob/main/.github/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code.
By participating, you are expected to uphold this code.

## I don't want to read this whole thing I just have a question
Please use discussion tab for this.
Expand All @@ -26,7 +26,7 @@ Before **creating** an Issue for `features`/`bugs`/`improvements` please follow
Be sure to include a **title and clear description**, as much relevant information as possible.
Please select the correct Issue type, for example `bug` or `feature`.
1. all Issues are automatically given the label `status: waiting for triage`
1. if you wish to work on the Issue once it has been triaged and label changed to `status: ready for dev`,
1. if you wish to work on the Issue once it has been triaged and label changed to `status: ready for dev`,
please include this in your Issue description

## Working on an Issue
Expand Down
561 changes: 0 additions & 561 deletions .github/README.pl.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Email: Send an email to Bartekdawidflis@gmail.com with the subject line "Securit
* Detailed steps to reproduce the issue.
* Any relevant logs or screenshots.
* Your recommendations for mitigating the issue, if applicable.

### Credit:
If you wish, we will credit you for the discovery of the vulnerability in our release notes or security advisories.

Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
12 changes: 12 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
changelog:
categories:
- title: "⚠️ Breaking Changes"
labels: [breaking-change]
- title: "🚀 Features"
labels: [enhancement]
- title: "🐛 Bug Fixes"
labels: [bug]
- title: "📖 Documentation"
labels: [documentation]
- title: "🔧 Maintenance"
labels: [chore, dependencies]
23 changes: 23 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CodeQL

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
schedule:
- cron: '0 6 * * 1'

permissions:
contents: read
security-events: write

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: github/codeql-action/init@v3
with:
languages: python
- uses: github/codeql-action/analyze@v3
13 changes: 13 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR Title

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

on:
push:
branches: [main]

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: python

sbom:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v6

- name: Generate SBOM
uses: anchore/sbom-action@v0
with:
format: spdx-json
output-file: perfectframeai-${{ needs.release-please.outputs.tag_name }}.spdx.json

- name: Attest SBOM
uses: actions/attest-sbom@v3
with:
subject-path: perfectframeai-${{ needs.release-please.outputs.tag_name }}.spdx.json
sbom-path: perfectframeai-${{ needs.release-please.outputs.tag_name }}.spdx.json

- name: Upload SBOM to release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.release-please.outputs.tag_name }}
files: perfectframeai-${{ needs.release-please.outputs.tag_name }}.spdx.json
82 changes: 42 additions & 40 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,58 @@ name: CI

on:
push:
branches: [ "main" ]
branches: [main, dev]
pull_request:
branches: [ "main" ]

permissions:
contents: read
branches: [main, dev]

jobs:
build:
pre-commit:
runs-on: ubuntu-latest

services:
docker:
image: docker:26.1.3
options: --privileged
ports:
- 2375:2375
env:
DOCKER_TLS_CERTDIR: ""

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0

- name: Set up Python
uses: actions/setup-python@v5.1.0
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.11

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "export PATH=\"$HOME/.local/bin:$PATH\"" >> $GITHUB_ENV

- name: Install dependencies
run: |
poetry install

- name: Run tests with coverage
python-version: '3.13'
- uses: pre-commit/action@v3.0.1
env:
DOCKER_HOST: tcp://localhost:2375
run: |
poetry run pytest --cov --cov-report=xml
SKIP: pytest

test:
needs: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Run tests with coverage
run: uv run --group test pytest --cov=perfectframe --cov-report=xml --cov-fail-under=100
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true

test-docker:
needs: pre-commit
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Build Docker image
run: docker compose build
- name: Run Docker E2E tests
run: uv run --group test pytest tests/e2e/docker_*.py -v --timeout=600
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.33.1
with:
image-ref: 'perfectframeai-perfectframe:latest'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
36 changes: 36 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: OpenSSF Scorecard

on:
push:
branches: [main]
schedule:
- cron: '0 6 * * 1' # Weekly on Monday at 6 AM (aligned with CodeQL)
workflow_dispatch: # Allow manual triggers

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write # Upload SARIF results
id-token: write # Publish results and enable OIDC
contents: read
actions: read

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Run Scorecard analysis
uses: ossf/scorecard-action@v2.4.3
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- name: Upload SARIF results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ __pycache__/
# IDE specific files
.idea/

# macOS
.DS_Store

# Coverage reports
.coverage
htmlcov/
Expand All @@ -24,8 +27,9 @@ output_directory/*
!input_directory/.gitkeep
!output_directory/.gitkeep

# Model file
nima.h5
# Model files
*.onnx
*.h5

# Test files
tests/test_files/best_frames/*
Expand Down
55 changes: 55 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# .pre-commit-config.yaml
default_install_hook_types: [pre-commit]
default_stages: [pre-commit]

repos:
# FORMATTERS
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=1000'] # Block files > 1MB
- id: debug-statements
- id: check-merge-conflict

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff-format
- id: ruff
args: ["--fix"]

- repo: https://github.com/allganize/ty-pre-commit
rev: v0.0.13
hooks:
- id: ty-check
exclude: ^(tests|perfectframe)/

- repo: https://github.com/PyCQA/docformatter
rev: 06907d0
hooks:
- id: docformatter
args: ["--in-place", "--wrap-summaries", "100", "--wrap-descriptions", "100"]
files: perfectframe/

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: 'tests/'

# LOCAL HOOKS
- repo: local
hooks:
- id: pytest
name: pytest-units
entry: uv run pytest tests/unit -v --cov=perfectframe --cov-fail-under=100
language: system
pass_filenames: false
files: (perfectframe|tests)/
stages: [pre-commit]
Loading
Loading