Add Python Linting and CI/CD Workflow#2
Draft
bsadashi wants to merge 4 commits intoSiliconDojo:mainfrom
Draft
Conversation
- Add GitHub Actions workflow for Python linting (Black, isort, flake8, pylint, mypy) - Add pyproject.toml with tool configurations - Add requirements-dev.txt for development dependencies - Add .flake8 configuration file - Update .gitignore with Python-specific patterns - Add Makefile with convenient development commands (lint, format, test, coverage) - Configure Python 3.11+ target with coverage reporting and pytest integration - All linters run in warnings mode to support educational code diversity
- Remove deprecated multi_line_mode and force_grid_wrap settings - Use isort-compatible profile configuration - Settings now match isort 5.13.2+ API
- Fix nested f-string quotes in rest-location-ai.py, rest-news.py, parse-structured-data.py - Fix indentation in parse-structured-data.py - Clean up test.py placeholder file - Apply Black formatting to 67 files - Sort imports with isort across 54 files - All linters now pass: black, isort, pytest
- Add test_rest_apis.py: Tests for REST API modules (location, news, JSON parsing) - Add test_web_scraping.py: Tests for web scraping modules (parsing, data extraction) - Add test_ai_modules.py: Tests for AI modules (OpenAI, Ollama, MoonDream) - 15 tests total, all passing - Coverage reporting configured - Tests follow pytest conventions and educational module patterns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Python Linting and CI/CD Workflow
🎯 Overview
Set up comprehensive code quality infrastructure for the In-Person-Classes educational repository with automated Python linting, type checking, and testing via GitHub Actions.
✨ Changes
GitHub Actions Workflow
.github/workflows/lint.ymlmain/developand all PRsConfiguration Files
pyproject.toml- Centralized tool configuration.flake8- PEP 8 linting configurationrequirements-dev.txt- Development dependencies pinnedMakefile- Local development commandsmake lint- Run all lintersmake format- Auto-format codemake test- Run testsmake coverage- Generate coverage reports.gitignore- Enhanced with Python patterns (venv, caches, build artifacts)🚀 Usage
Local Development