Skip to content

fit-project/fit-acquisition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

128 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fit-cases

Acquisition module for the FIT Project, built using PySide6.

Utilities and base classes for content acquisition, shared across FIT scraper modules.


Dependencies

Main dependencies are:

See pyproject.toml for full details.


Local checks (same as CI)

Run these commands before opening a PR, so failures are caught locally first.

What each tool does

  • pytest: runs automated tests (unit, contract, integration and e2e suites).
  • ruff: checks code style and common static issues (lint).
  • mypy: performs static type checking on annotated Python code.
  • bandit: scans source code for common security anti-patterns.
  • pip-audit: checks installed dependencies for known CVEs.

1) Base setup

python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
pip install . pytest ruff mypy "bandit[toml]" pip-audit
python -m pip install --upgrade "setuptools>=78.1.1"

2) Test suite

export QT_QPA_PLATFORM=offscreen
export FIT_SCREEN_RECODER_PATH="<path>/fit-screen-recorder"
# example
export FIT_SCREEN_RECODER_PATH="/Users/zitelog/Developer/Workspace/fit-screen-recorder/build/fit-screen-recorder"

# unit tests
pytest -m unit -q tests

# contract tests
pytest -m contract -q tests

# integration tests
pytest -m integration -q tests

# end-to-end smoke tests
pytest -m e2e -q tests

3) Quality and security checks

ruff check fit_acquisition tests
mypy fit_acquisition
bandit -c pyproject.toml -r fit_acquisition -q -ll -ii
PIPAPI_PYTHON_LOCATION="$(python -c 'import sys; print(sys.executable)')" \
  python -m pip_audit --progress-spinner off

Note: pip-audit may print a skip message for fit-acquisition, fit-assets, fit-cases, fit-common and fit-configurations because they are a local packages and not published on PyPI.


Installation

    python3.11 -m venv .venv
    source .venv/bin/activate
    pip install --upgrade pip
    pip install poetry
    poetry lock
    poetry install
    poetry run python main.py

Contributing

  1. Fork this repository.
  2. Create a new branch (git checkout -b feat/my-feature).
  3. Commit your changes using Conventional Commits.
  4. Submit a Pull Request describing your modification.

About

FIT Cases module provides utilities and base classes for content acquisition, shared across FIT scraper modules.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages