Skip to content

Commit ba39325

Browse files
committed
chore: cleanup obsolete files and update configurations
- Remove legacy RTD config and redundant requirements files - Drop unused 'future' dependency per codeql advisory - Update Dockerfile to reduce image size - Adjust docs workflow permissions - Revise pre-commit hooks configuration
1 parent 04f1a7b commit ba39325

File tree

9 files changed

+29
-675
lines changed

9 files changed

+29
-675
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ on:
88
jobs:
99
deploy-docs:
1010
name: Deploy Docs
11+
permissions:
12+
contents: write
1113
runs-on: ubuntu-latest
1214

1315
steps:
14-
# 1. Checkout repository
1516
- name: Checkout repository
1617
uses: actions/checkout@v6
1718

18-
# 2. Deploy to GitHub Pages
1919
- name: Deploy pre-built docs
2020
uses: peaceiris/actions-gh-pages@v4
2121
with:

.pre-commit-config.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
- repo: git://github.com/pre-commit/pre-commit-hooks
2-
sha: v0.9.1
3-
hooks:
4-
- id: trailing-whitespace
5-
- id: flake8
6-
- id: check-merge-conflict
7-
- repo: git://github.com/pre-commit/mirrors-jshint
8-
sha: v2.9.5
9-
hooks:
10-
- id: jshint
11-
- repo: https://github.com/ambv/black
12-
rev: stable
1+
---
2+
default_language_version:
3+
python: python3.10
4+
5+
repos:
6+
# - repo: https://github.com/pre-commit/pre-commit-hooks
7+
# rev: v6.0.0
8+
# hooks:
9+
# - id: trailing-whitespace
10+
# - id: check-merge-conflict
11+
# - id: mixed-line-ending
12+
# - id: end-of-file-fixer
13+
# - id: check-yaml
14+
# - id: check-toml
15+
16+
- repo: https://github.com/gitleaks/gitleaks
17+
rev: v8.30.0
1318
hooks:
14-
- id: black
15-
language_version: python3.7
19+
- id: gitleaks
1620

17-
- repo: local
21+
- repo: https://github.com/hadolint/hadolint
22+
rev: v2.14.0
1823
hooks:
19-
- id: python-bandit-vulnerability-check
20-
name: bandit
21-
entry: bandit
22-
args: ['--ini', 'tox.ini', '-r', 'consoleme']
23-
language: system
24-
pass_filenames: false
24+
- id: hadolint

.readthedocs.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM python:3.10-slim-bookworm AS builder
22

3+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4+
35
# Install build dependencies
46
RUN apt update && apt upgrade -y && apt install -y --no-install-recommends \
57
curl \
@@ -52,15 +54,12 @@ RUN apt update && apt upgrade -y && apt install -y --no-install-recommends \
5254
RUN useradd --create-home --shell /bin/bash lemur
5355

5456
# Copy built project
55-
COPY --from=builder /opt/lemur /opt/lemur
57+
COPY --from=builder --chown=lemur:lemur /opt/lemur /opt/lemur
5658

5759
# Ensure entrypoint is executable
5860
RUN chmod +x /opt/lemur/entrypoint
5961

60-
# Permissions
61-
RUN chown -R lemur:lemur /opt/lemur
62-
63-
# Switch to user
62+
# Switch to the user
6463
USER lemur
6564

6665
# Expose port

SETUP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- Docker 20.10+
66
- Docker Compose v2.0+
7-
- Node.js 18+ and npm (for building frontend)
7+
- Node.js 18+ and npm
88

99
## Build locally
1010

@@ -218,7 +218,7 @@ uv sync --reinstall
218218
219219
220220
┌─────────────────────────────────────────────────────┐
221-
│ Caddy/your favorite web server (HTTPS only)
221+
│ Caddy/your favorite web server (port 80/433)
222222
│ • Serves static files (CSS, JS, images) │
223223
│ • Proxies /api/* to Flask backend │
224224
│ • SPA routing (all routes → index.html) │

lemur/auth/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
.. moduleauthor:: Kevin Glisson <[email protected]>
77
"""
88

9-
from __future__ import annotations # Import annotations to make type hints backwards compatible with Python 3.7/3.8
109

1110
import base64
1211
import time

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ dependencies = [
6969
"flask-replicated==2.1",
7070
"flask-restful==0.3.10",
7171
"flask-sqlalchemy==2.5.1",
72-
"future==1.0.0",
7372
"google-api-core==2.18.0",
7473
"google-auth==2.29.0",
7574
"google-cloud-private-ca==1.15.0",

0 commit comments

Comments
 (0)