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
6 changes: 3 additions & 3 deletions .github/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
rev: 7.3.0
hooks:
- id: flake8
exclude: docs/conf.py
args: ["--config", ".github/configurations/python_linters/.flake8"]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
args: ["--settings-path", ".github/configurations/python_linters/.isort.cfg", "--filter-files", "--skip", "venv"]

- repo: https://github.com/psf/black
rev: 24.8.0
rev: 26.1.0
hooks:
- id: black
args: ["--config", ".github/configurations/python_linters/.black"]
10 changes: 5 additions & 5 deletions .github/configurations/python_linters/requirements-linters.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# === Code Quality & Formatting Tools ===
autoflake==2.3.1 # Automatically removes unused imports and unused variables
bandit==1.8.3 # Security linter to find common security issues in Python code
black==25.1.0 # Opinionated code formatter enforcing consistent style
isort==6.0.1 # Sorts and organizes Python imports automatically
black==26.1.0 # Opinionated code formatter enforcing consistent style
isort==7.0.0 # Sorts and organizes Python imports automatically
fawltydeps==0.20.0 # Detects unused and missing dependencies in requirements files
flake8==7.1.2 # Python style guide enforcement (PEP8) and linting tool
flake8==7.3.0 # Python style guide enforcement (PEP8) and linting tool
#flake8-django @ git+https://github.com/terencehonles/flake8-django.git@a6e369e89d275dfd5514f2aa9d091aa36c5ff84b
# Django-specific linting rules (disabled temporarily due to Python 3.12 incompatibility)
pylint==3.3.5 # Highly configurable code analysis tool for error detection and coding standards
pylint-django==2.6.1 # Django plugin for pylint, adds Django-specific checks and best practices
pylint==4.0.4 # Highly configurable code analysis tool for error detection and coding standards
pylint-django==2.7.0 # Django plugin for pylint, adds Django-specific checks and best practices
10 changes: 5 additions & 5 deletions .github/workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,24 +310,24 @@ jobs:
echo > requirements-linters.txt

if [[ '${{ inputs.use_black}}' != 'false' ]]; then
echo "black==25.1.0" >> requirements-linters.txt
echo "black==26.1.0" >> requirements-linters.txt
fi

if [[ '${{ inputs.use_isort}}' != 'false' ]]; then
echo "isort==6.0.1" >> requirements-linters.txt
echo "isort==7.0.0" >> requirements-linters.txt
fi

if [[ '${{ inputs.use_flake8}}' != 'false' ]]; then
echo "flake8==7.1.2" >> requirements-linters.txt
echo "flake8==7.3.0" >> requirements-linters.txt
#if [[ -n '${{ inputs.django_settings_module }}' ]]; then
#echo "flake8-django==1.4" >> requirements-linters.txt
#fi
fi

if [[ '${{ inputs.use_pylint}}' != 'false' ]]; then
echo "pylint==3.2.6" >> requirements-linters.txt
echo "pylint==4.0.4" >> requirements-linters.txt
if [[ -n '${{ inputs.django_settings_module }}' ]]; then
echo "pylint-django==2.5.5" >> requirements-linters.txt
echo "pylint-django==2.7.0" >> requirements-linters.txt
fi
fi

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist/
**/.DS_Store
*.egg-info/
/node_modules
celerybeat-schedule
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ How to create and submit a PR:
```
* Flake8 - linter for code syntax and cleaning
```bash
flake8 . --show-source --config ../.github/configurations/python_linters/.flake8
flake8 . --show-source --config .github/configurations/python_linters/.flake8
```
* Black - an uncompromising Python code formatter
```bash
black --config .github/configurations/python_linters/.black .
black --config .github/configurations/python_linters/.black .
```
* Isort - utility to sort imports alphabetically, and automatically separated into sections and by type
```bash
isort --sp ../.github/configurations/python_linters/.isort.cfg --profile black .
isort --sp .github/configurations/python_linters/.isort.cfg --profile black .
```
* Pylint - a static code analyser for Python
```bash
Expand Down
8 changes: 4 additions & 4 deletions buffacli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ dependencies = [
"rich==14.0.0",
"yarl==1.20.1",
"typing-extensions==4.14.0",
"black==25.1.0",
"black==26.1.0",
"build==1.2.2.post1",
"flake8==7.1.2",
"isort==6.0.1",
"flake8==7.3.0",
"isort==7.0.0",
"setuptools==80.9.0",
"pre-commit==4.2.0",
"pyproject-hooks==1.2.0",
"pytest==8.4.0",
"wheel==0.45.1",
"wheel==0.46.2",
]

[project.scripts]
Expand Down
8 changes: 4 additions & 4 deletions buffacli/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
black==25.1.0
black==26.1.0
build==1.2.2.post1
flake8==7.1.2
isort==6.0.1
flake8==7.3.0
isort==7.0.0
setuptools==80.9.0
pre_commit==4.2.0
pyproject_hooks==1.2.0
pytest==8.4.0
wheel==0.45.1
wheel==0.46.2
1 change: 1 addition & 0 deletions buffalogs/manage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""

import os
import sys

Expand Down
12 changes: 6 additions & 6 deletions buffalogs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
Django~=5.2 # Main Django framework (web application, ORM, admin, etc.)
djangorestframework>=3.16 # Django REST Framework for building RESTful APIs
djangorestframework-simplejwt>=5.5.1 # JWT authentication support for DRF
django-cors-headers>=4.8.0 # (dev) Enables CORS headers for frontend-backend separation during development
django-cors-headers>=4.9.0 # (dev) Enables CORS headers for frontend-backend separation during development

# === Task Queue / Background Jobs ===
celery>=5.5.3 # Distributed task queue for asynchronous jobs (e.g., scheduled ingestion)
celery>=5.6 # Distributed task queue for asynchronous jobs (e.g., scheduled ingestion)

# === Database ===
psycopg[binary]>=3.2.9 # PostgreSQL database adapter for Python (binary for better performance)
psycopg[binary]>=3.2.13 # PostgreSQL database adapter for Python (binary for better performance)

# === Elasticsearch ===
elasticsearch>=9.1 # Official low-level Python client for Elasticsearch
elasticsearch>=9.2 # Official low-level Python client for Elasticsearch

# === Geo & Location ===
geopy>=2.4.1 # Library for geocoding and distance calculations via various APIs
Expand All @@ -23,7 +23,7 @@ python-dateutil>=2.9.0 # Enhanced date parsing, time delta calculation
ua-parser>=1.0.1 # Parses user-agent strings into structured browser/device data

# === Visualization ===
pygal>=3.0.0 # SVG graphing library (used for rendering frontend charts)
pygal>=3.1.0 # SVG graphing library (used for rendering frontend charts)
pygal_maps_world>=1.0.2 # World map plugin for Pygal (used in geo-visualizations)

# === JWT Utilities ===
Expand All @@ -42,4 +42,4 @@ backoff>=2.2.1 # Library for retrying operations with exponent
requests>=2.32.5 # HTTP library for sending alerts and webhooks

# === Web Server ===
uwsgi>=2.0.30 # uWSGI application server for serving Django application
uwsgi>=2.0.31 # uWSGI application server for serving Django application
6 changes: 3 additions & 3 deletions buffalogs/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# === Development-only dependencies (no production) ===
mypy-extensions>=1.1.0 # (dev) Defines extensions to the Python standard library typing module that are supported by the mypy type checker and the mypyc compiler
pre-commit>=4.3.0 # (dev) Git hook manager for running linters, formatters, and other checks before commit
pipdeptree>=2.28.0 # (dev) CLI tool to visualize and inspect dependency tree of installed Python packages
pre-commit>=4.5.0 # (dev) Git hook manager for running linters, formatters, and other checks before commit
pipdeptree>=2.30 # (dev) CLI tool to visualize and inspect dependency tree of installed Python packages
splunk-sdk>=2.1.1 # (dev) currently, the Splunk source for the ingestion module is used only in dev/tests, not in prod
opensearch-py>=3.0.0 # (dev) currently, the Opensearch source for the ingestion module is used only in dev/tests, not in prod
opensearch-py>=3.1.0 # (dev) currently, the Opensearch source for the ingestion module is used only in dev/tests, not in prod
django-test-migrations>=1.5.0 # (dev) Used for testing migrations
12 changes: 6 additions & 6 deletions django-buffalogs/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ packages = find:
python_requires = >=3.8
install_requires =
backoff>=2.2.1
celery>=5.5.3
celery>=5.6
Django~=5.2
djangorestframework>=3.16
djangorestframework-simplejwt>=5.5.1
django-cors-headers>=4.8.0
django-cors-headers>=4.9.0
elasticsearch>=9.1
geopy>=2.4.1
Jinja2>=3.1.6
psycopg>=3.2.9
psycopg[binary]>=3.2.9
pygal>=3.0.0
psycopg>=3.2.13
psycopg[binary]>=3.2.13
pygal>=3.1.0
pygal_maps_world>=1.0.2
python-dateutil>=2.9.0
requests>=2.32.5
ua-parser>=1.0.1
uwsgi>=2.0.30
uwsgi>=2.0.31
Loading