Skip to content
Open
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
3 changes: 0 additions & 3 deletions .VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.VERSION export-subst
.VERSION export-subst
34 changes: 16 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
name: generate Documentation

on: [push, pull_request]
on: [ pull_request ]

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: read

strategy:
max-parallel: 4
matrix:
python-version: [3.12]
python-version: [ 3.13 ]

steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
activate-environment: true
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Give permission to run scripts
run: chmod +x ./docs/scripts/doc8_style_check.sh

- name: Install Dependencies
working-directory: ./docs
run: pip install -r requirements.txt
- shell: bash
run: |
uv sync

- name: Check Sphinx Documentation build minimally
working-directory: ./docs
run: sphinx-build -b linkcheck -EW source build
working-directory: docs
run: |
hatch run docs:check_build

- name: Check for documentation style errors
working-directory: ./docs
run: ./scripts/doc8_style_check.sh
working-directory: docs
run: |
hatch run docs:check_style
37 changes: 15 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: run tests

on: [push, pull_request]

on: [ pull_request ]

env:
DB_NAME: vulnerablecode
Expand All @@ -10,7 +9,7 @@ env:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: read

Expand All @@ -22,38 +21,32 @@ jobs:
POSTGRES_USER: ${{ env.DB_USER }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432

strategy:
max-parallel: 4
matrix:
python-version: ["3.12", "3.13"]
python-version: [ "3.13" ]

steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
activate-environment: true
python-version: ${{ matrix.python-version }}

cache: true

- name: Install dependencies
run: make dev envfile
# Disable codestyle checks until we have cleaned up the code
# - name: Validate code format
# run: make check
- shell: bash
run: |
uv sync

- name: Run tests
run: make test
- name: Run testscopilot
run: |
pytest -vvs -m "not webtest" --disable-warnings
env:
GH_TOKEN: 1
GH_TOKEN: 1
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
VULNERABLECODE_DB_NAME: ${{ env.DB_NAME }}
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,9 @@ tcl

# Ignore Jupyter Notebook related temp files
.ipynb_checkpoints/

# Ignore old setup tools
setup.py
setup.cfg
MANIFEST.in
examples
85 changes: 85 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Configuration file for `prek`, a git hook framework written in Rust.
# See https://prek.j178.dev for more information.
#:schema https://www.schemastore.org/prek.json

default_language_version.python = "3.13"
default_install_hook_types = ["pre-commit", "commit-msg"]

[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v6.0.0"
hooks = [
{ id = "trailing-whitespace" },
{ id = "end-of-file-fixer" },
{ id = "check-yaml" },
{ id = "check-added-large-files" },
{ id = "check-symlinks" },
{
id = "mixed-line-ending",
args = ["--fix=lf"]
}
]

[[repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.15.9"
hooks = [
{
id = "ruff",
args = ["--fix"]
},
{ id = "ruff-format" }
]

[[repos]]
repo = "https://github.com/compilerla/conventional-pre-commit"
rev = "v4.4.0"
hooks = [
{
id = "conventional-pre-commit",
stages = ["commit-msg"]
}
]

[[repos]]
repo = "https://github.com/astral-sh/uv-pre-commit"
rev = "0.11.3"
hooks = [
{ id = "uv-lock" }
]

[[repos]]
repo = "https://github.com/codespell-project/codespell"
rev = "v2.4.2"
hooks = [
{ id = "codespell" }
]

[[repos]]
repo = "https://github.com/allganize/ty-pre-commit"
rev = "v0.0.29"
hooks = [
{
id = "ty-check",
args = [
"--output-format=full"
],
additional_dependencies = [
"click",
"deprecated",
"jira",
"python-magic",
"pyartifactory",
"pydantic",
"pytest",
"python-optima",
"pyyaml",
"rich",
"tenacity",
"toml",
"slack_sdk",
"jinja2",
"requests"
]
}
]
Loading
Loading