Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
30 changes: 30 additions & 0 deletions .bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Bandit configuration file for Animation Workbench security scanning
# https://bandit.readthedocs.io/en/latest/config.html

exclude_dirs:
- ./test
- ./test/**
- animation_workbench/test

# Skip acceptable issues for this QGIS plugin:
skips:
# B101: assert statements - legitimate in tests
- B101
# B104: Binding to 0.0.0.0 - intentional for debug server (development only)
- B104
# B108: Hardcoded /tmp - acceptable for temporary file handling
- B108
# B110: Try/except/pass - acceptable for silent error handling in UI code
- B110
# B404: subprocess import - required for ffmpeg/imagemagick integration
- B404
# B603: subprocess without shell=True - this is the SECURE way to call processes
- B603
# B606: Process without shell - this is intentional and secure
- B606
# B607: Partial path - acceptable when calling known system tools (ffmpeg, convert)
- B607

# Note: High severity issues that MUST remain fixed:
# - B605: Shell injection - fixed by using glob/os.remove instead of os.system
# - B602: Shell injection via subprocess shell=True - not used
58 changes: 58 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"version": "0.2",
"language": "en",
"words": [
"QGIS",
"PyQt",
"pyqt",
"qgis",
"workbench",
"kartoza",
"timlinux",
"nixpkgs",
"geospatial",
"flake",
"devshell",
"mkdocs",
"pyproject",
"toml",
"bandit",
"flake8",
"isort",
"mypy",
"pytest",
"docstring",
"docstrings",
"darglint",
"cspell",
"yamllint",
"actionlint",
"shellcheck",
"nixfmt",
"precommit",
"venv",
"virtualenv",
"ffmpeg",
"keyframe",
"keyframes",
"easing",
"interpolate",
"interpolation",
"viewport",
"renderer",
"rasterio",
"geopandas",
"numpy",
"pyqtgraph",
"debugpy"
],
"ignorePaths": [
"node_modules",
".venv",
"venv",
"build",
"dist",
"*.lock",
"*.log"
]
}
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: Tim Sutton
# SPDX-License-Identifier: MIT
#
# Environment variables for QGIS Animation Workbench development
# Copy this file to .env and adjust values as needed
#
# For Docker testing:
IMAGE=qgis/qgis
QGIS_VERSION_TAG=release-3_34
WITH_PYTHON_PEP=true
ON_TRAVIS=false
MUTE_LOGS=false

# For local development (these are auto-generated by scripts/vscode.sh):
# PYTHONPATH=/path/to/qgis/python
# QGIS_EXECUTABLE=/path/to/qgis
# QGIS_PREFIX_PATH=/path/to/qgis/prefix
# QT_QPA_PLATFORM=offscreen
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
use nix --impure
use flake
layout python3
31 changes: 31 additions & 0 deletions .exrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
" SPDX-FileCopyrightText: Tim Sutton
" SPDX-License-Identifier: MIT
"
" QGIS Animation Workbench - Neovim Project Configuration
"
" This file loads .nvim.lua which contains all project keybindings
" All shortcuts are under <leader>p (project commands)
"
" Usage: Requires 'exrc' option enabled in neovim:
" vim.opt.exrc = true
"
" Project Keybindings (<leader>p):
" q - QGIS (stable/LTR/master, debug/standard)
" t - Testing
" c - Code Quality (format, lint, checks)
" d - Documentation
" x - Debug (DAP breakpoints, attach to QGIS)
" p - Packaging (build zip, symlink to profile, copy install)
" r - Profiling
" u - Utilities
" g - Git

" Load .nvim.lua if it exists and hasn't been loaded
if !exists('g:loaded_animation_workbench_project')
let g:loaded_animation_workbench_project = 1

" Source the Lua configuration
if filereadable(expand('<sfile>:p:h') . '/.nvim.lua')
lua dofile(vim.fn.expand('<sfile>:p:h') .. '/.nvim.lua')
endif
endif
34 changes: 34 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[flake8]
max-line-length = 120
exclude =
.git,
__pycache__,
.venv,
venv,
.eggs,
*.egg,
build,
dist,
.idea,
.vscode,
.tox,
htmlcov,
test/test_data

# Ignore specific error codes
# E501: Line too long (handled by black)
# W503: Line break before binary operator (conflicts with black)
# E203: Whitespace before ':' (conflicts with black)
# E402: Module level import not at top (needed for optional imports)
# D-series: Docstring convention errors (handled separately)
ignore =
E501,
W503,
E203,
E402,
D

# Docstring checking
docstring-convention = google
strictness = short
require-return-section-when-returning-nothing = no
30 changes: 27 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
# Dependabot configuration for QGIS Animation Workbench
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: /
# Python dependencies (pip)
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: monthly
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "python"
commit-message:
prefix: "chore(deps)"

# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "chore(deps)"
groups:
github-actions:
patterns:
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/BlackPythonCodeLinter.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/BuildMKDocsAndPublishToGithubPages.yml

This file was deleted.

43 changes: 23 additions & 20 deletions .github/workflows/CompileMKDocsToPDF.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
name: 📔 Compile MKDocs to PDF
# This workflow is triggered on pushes to the repository.
name: Build Documentation PDF

on:
push:
branches:
- main
# Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory
paths:
- '.github/workflows/CompileMKDocsToPDF.yml'
- 'docs/**.md'
- 'docs/assets/**'
# Allow manually running in the actions tab
- 'docs/**'
workflow_dispatch:

jobs:
generatepdf:
name: Build PDF
build-pdf:
name: Build PDF Documentation
runs-on: ubuntu-latest

steps:
- name: Checkout 🛒
uses: actions/checkout@v2
- name: Create Mkdocs Config 🚀
- name: Checkout
uses: actions/checkout@v4

- name: Create MkDocs Config
working-directory: ./docs
run: ./create-mkdocs-pdf-config.sh
- name: Build PDF 📃
run: |
if [ -f create-mkdocs-pdf-config.sh ]; then
chmod +x create-mkdocs-pdf-config.sh
./create-mkdocs-pdf-config.sh
fi

- name: Build PDF
uses: kartoza/mkdocs-deploy-build-pdf@master
# Uses orzih's mkdocs PDF builder
# https://github.com/orzih/mkdocs-with-pdf
env:
EXTRA_PACKAGES: build-base
CONFIG_FILE: docs/mkdocs.yml
REQUIREMENTS: docs/requirements.txt
#REQUIREMENTS: folder/requirements.txt
- name: Upload PDF Artifact
uses: actions/upload-artifact@v3

- name: Upload PDF Artifact
uses: actions/upload-artifact@v4
with:
name: docs
name: documentation-pdf
path: pdfs
retention-days: 30
Loading