Welcome to the fourth iteration of my programming challenges repository! This project is a personal journey of learning and implementing various programming challenges, spanning different categories and difficulty levels.
This repository is a collection of solutions to a wide array of programming problems, inspired by the /g/ programming challenges list. The goal is to learn new languages, explore different programming paradigms, and build a portfolio of work. Whether you're a beginner looking for inspiration or an experienced developer curious about different problem-solving approaches, you'll find something of interest here.
The solutions are organized by category and difficulty, making it easy to navigate and find what you're looking for. Many of the projects are implemented in multiple languages to showcase different ways of solving the same problem.
All challenge implementations now live under a consolidated challenges/ directory so tooling, tests, and packaging metadata can stay focused at the repository root.
.
├── challenges/ # Category folders (Practical, Algorithmic, Games, Artificial Intelligence, Emulation)
├── docs/ # Guides, debugging tips, Git LFS instructions
├── src/ # Python support library powering shared tooling/tests
├── tests/ # Automated regression and smoke tests
├── tools/ # Helper scripts (native build harnesses, release automation)
├── pyproject.toml # Packaging metadata with optional dependency extras per category
└── requirements*.txt # Consolidated dependency snapshots
Category READMEs and progress tables now reference paths such as challenges/Practical/Image Converter/ to emphasize the new layout. See docs/repo-organization.md for the full decision log.
- Git LFS – Install Git Large File Storage before cloning and run the sync commands from the Git LFS setup guide. Many challenges (games, audio tools, pretrained AI models) rely on large assets stored with LFS, so remember to run
git lfs installandgit lfs pullbefore building or testing.
Overall: 131 / 131 challenges completed (100%).
| Category | Completed | Total | Progress |
|---|---|---|---|
| Practical | 53 | 53 | 100% |
| Algorithmic | 27 | 27 | 100% |
| Artificial Intelligence | 8 | 8 | 100% |
| Emulation/Modeling | 14 | 14 | 100% |
| Games | 29 | 29 | 100% |
Progress counts are generated from the actual solution folders in the repository (see tables below).
While this is a personal project, the principles behind it are universal. If you're starting your own journey of programming challenges, here's a guide to help you get the most out of it:
Working in this repo? Make sure Git LFS is installed and that you've run
git lfs install/git lfs pullso game assets, audio packs, and pretrained models are available before you start hacking.
- Understand the Problem: Before writing a single line of code, do your research. Draw diagrams, write out the logic, and break the problem down into smaller pieces. If a problem seems too easy, think about how you can add more features or complexity.
- Implement a Solution: Start with a language you're comfortable with to get a working solution first. Don't worry about writing perfect code on the first try. The goal is to get it working, then you can refactor and improve it.
- Test Your Code: Think about how your code might fail. Write test cases to cover different scenarios and edge cases. Find bugs, fix them, and document your process.
- Re-implement and Explore: Once you have a solid solution, try implementing it in a new language. Experiment with different algorithms, data structures, and programming styles. This is a great way to deepen your understanding and expand your skills.
- Never Stop Learning: Keep challenging yourself. Contribute to open source, start new projects, and keep building your portfolio.
The repository now ships a pyproject.toml so you can install challenge stacks as editable extras.
- Create a virtual environment (recommended):
python -m venv .venv source .venv/bin/activate # PowerShell: .venv\Scripts\Activate.ps1
- Install the extras you need:
Combine extras (e.g.,
python -m pip install -e .[practical] python -m pip install -e .[algorithmic] python -m pip install -e .[constructive_solid_geometry]
.[practical,visual]) or grab everything with.[all]. - Run scripts/tests directly from the repo. Editable installs keep your checkout in sync with the environment.
| Extra | Covers | Highlights |
|---|---|---|
practical |
challenges/Practical/ utilities, desktop apps, and web tools |
Flask imageboard, Tk dashboards, Seam Carving, Shazam clone |
algorithmic |
challenges/Algorithmic/ problem set helpers |
Steganography, stock analysis, crawler tooling |
visual |
Visualization add-ons used across categories | Matplotlib demos, colour-science palettes, VPython spinny cube, FFT spectrum analyzer |
audio |
Audio processing stacks | WAV equalizer, Shazam clone, music streaming |
games |
Python games in challenges/Games/ |
Sudoku solver, Simon, Oil Panic tribute |
constructive_solid_geometry |
challenges/Emulation/ConstructiveSolidGeometry/ mesh utilities |
Signed-distance field primitives, marching cubes meshing |
ai |
challenges/Artificial Intelligence/ demos |
A* Sudoku, Connect4 AI, neural network |
web |
HTTP and dashboard helpers | Imageboard, IP tracking, web crawlers |
desktop |
GUI/automation conveniences | Window manager, key press bot, Tk front-ends |
markdown |
Markdown Editor stack | Live preview, HTML export |
geo |
Geospatial helpers | WMS viewer, map projections |
media |
Download/encoding helpers | YouTube to MP3 workflows |
security |
Crypto utilities | Password manager, encrypted upload |
documents |
PDF tooling | PDF Tagger |
midi |
MIDI pipeline | MIDI player/editor, synth tools |
developer |
Repo test/lint helpers | pytest, ruff, mypy |
See the category READMEs for per-project suggestions; each now points back to these extras.
Consult the consolidated debugging guide for a full matrix of automated coverage, dependency notes, and category-specific smoke tests.
Quick commands
pytest tests/test_cli_help.py -k "Practical"— exercise CLI entry points for Practical utilities headlessly. 【F:tests/test_cli_help.py†L1-L82】pytest tests/test_raytracer.py— render deterministic sample scenes fromchallenges/Emulation/RayTracer/scenes/minimal.json. 【F:tests/test_raytracer.py†L11-L26】pytest tests/test_wolfenstein_clone.py— boot the Wolfenstein raycasting engine with SDL's dummy backend. 【F:tests/test_wolfenstein_clone.py†L1-L45】pytest tests/test_ai_roguelike_smoke.py— run the roguelike agent end-to-end using the bundledtcodstub. 【F:tests/test_ai_roguelike_smoke.py†L1-L194】pytest tests/test_cnn_framework.py— perform a one-epoch MNIST training/evaluation cycle and verify checkpoints. 【F:tests/test_cnn_framework.py†L1-L49】
Manual spot checks
- Launch headless-friendly games with
python challenges/Games/WolfensteinClone/game.py --helpbefore interactive debugging to confirm argument parsing. 【F:challenges/Games/WolfensteinClone/game.py†L440-L520】 - Ray tracer scenes live under
challenges/Emulation/RayTracer/scenes/;minimal.jsonmirrors the asset used in the hash regression test. 【F:tests/test_raytracer.py†L16-L23】 - CNN framework runs emit checkpoints under
challenges/Artificial Intelligence/CNN_Framework/checkpoints/(configurable viaTrainConfig.checkpoint_path). 【F:tests/test_cnn_framework.py†L24-L49】
| # | Challenge | Status |
|---|---|---|
| 1 | Download Manager | View Solution |
| 2 | Make an elastic producer/consumer task queue. | View Solution |
| 3 | IRC Client | View Solution |
| 4 | Markov Chain Sentence Generator (Include Shitposting Capabilities) | View Solution |
| 5 | English Sentence Parser that Points to the Context of a Sentence | View Solution |
| 6 | MIDI Player + Editor | View Solution |
| 7 | Stock Market Simulator Using Yahoo Spreadsheet Data | View Solution |
| 8 | Parametric/Graphic Equalizer for .wav files (Make it real-time) | View Solution |
| 9 | Graphing Calculator (BONUS: Graph the Function's Derivatives) | View Solution |
| 10 | To-Do List Application (Web app or CLI) | View Solution |
| 11 | Verlet Integration (Verlet Cloth) | View Solution |
| 12 | TCP/UDP Chat Server + Client | View Solution |
| 13 | Music Streaming | View Solution |
| 14 | Shazam | View Solution |
| 15 | Chatbot (with conversation retention) | View Solution |
| 16 | Curses Text Editor (with Emacs /Vim Keybindings) | View Solution |
| 17 | Paint Clone | View Solution |
| 18 | Image to ASCII Art | View Solution |
| 19 | Booru (Image Board) Image Downloader | View Solution |
| 20 | Image Converter | View Solution |
| 21 | ID3 Reader | View Solution |
| 22 | Sound Synthesis (Sine square sawtooth etc...) ("Fuck You" mode: Realtime MIDI Playback with Custom instruments) | View Solution |
| 23 | C++ IDE Plugin for Sublime/Atom (Auto-Complete Go-To Symbol Declaration and Definition using Clang's AST) | View Solution |
| 24 | Simple Version Control supporting checkout commit (with commit message) unlocking and per-file configuration of number of revisions kept | View Solution |
| 25 | Imageboard (Imagine vichan) | View Solution |
| 26 | Password Manager | View Solution |
| 27 | Create a Torrent Client (CLI or GUI) | View Solution |
| 28 | Booru Client | View Solution |
| 29 | Key Press Bot | View Solution |
| 30 | IP/URL Obsucrification (http://www.pc-help.org/obscure.htm) | View Solution |
| 31 | Radix Base Converter (Given a radix base convert it to decimal) | View Solution |
| 32 | Chan aggregator (Let's user view various boards from different 'chans') (Bonus: Add 4ChanX and Archiving Functionality) | View Solution |
| 33 | Encrypt a File and Upload it online | View Solution |
| 34 | Make a Text Editor that autosaves and includes the date in the filename | View Solution |
| 35 | Create an HSV Color Representation | View Solution |
| 36 | Window Manager | View Solution |
| 37 | Basic Relational Database Software (SQL Support Handle Relationships Focus on Efficiency) | View Solution |
| 38 | Pixel Editor | View Solution |
| 39 | Trivial File Transfer Protocol (TFTP): Allow a client to put a file onto a remote host | View Solution |
| 40 | Markdown (HTML/XML) Editor | View Solution |
| 41 | IP Tracking Visualization | View Solution |
| 42 | Port Scanner | View Solution |
| 43 | Old School Demo Effect (Plasma Tunnel Scrollers Zoomers etc...) | View Solution |
| 135 | Bellman-Ford Simulation with at least Five Vertices | View Solution |
| 136 | Matrix Arithmetic | View Solution |
| 137 | File Compression Utility (Make it GUI) | View Solution |
| 138 | PDF Tagger | View Solution |
| 139 | Nonogram Generator and Solver | View Solution |
| 140 | Calculate Dot and Cross Product of Two Vectors | View Solution |
| 141 | Bismuth Fractal | View Solution |
| 142 | Seam Carving | View Solution |
| 143 | Bayesian Filter | View Solution |
| 144 | WMS viewer that isn't web based | View Solution |
The IRC client depends only on Python 3.10+ standard-library modules (
asyncio,ssl,argparse,logging).
Security notice: The encrypted upload utility in this repository is educational. Review the project documentation before using it with sensitive information and ensure keys, manifests, and remote endpoints are secured.
| # | Challenge | Status |
|---|---|---|
| 44 | Fizzbuzz (BONUS: In Assembly) | View Solution |
| 45 | RPN Calculator | View Solution |
| 46 | Counts occurrences of characters in a Given String (include support for unicode characters) | View Solution |
| 47 | Towers of Hanoi | View Solution |
| 48 | Music Visualizer | View Solution |
| 49 | Unicode Converter (Support for UTF-8 16LE 32LE and 32BE) | View Solution |
| 50 | Calculate the first (n) digits of pi | View Solution |
| 51 | Least Squares Fitting Algorithm | View Solution |
| 52 | Given an Array of Stocks's values over time find the period of time where the stocks could have made the most money | View Solution |
| 53 | Highest Prime Factor Calculator | View Solution |
| 54 | Hide and Extract Data in images (Basic Steganography) (Bonus: Include .gif support) | View Solution |
| 55 | Web Page Crawler | View Solution |
| 56 | Password Generator (Let User Choose Options) | View Solution |
| 57 | Vigenère cipher encryption/decryption | View Solution |
| 58 | Game Of Life | View Solution |
| 59 | Caesar Cipher Cracker | View Solution |
| 60 | Dijkstra's Algorithm | View Solution |
| 61 | ROT 13 | View Solution |
| 62 | Program that displays MBR Contents | View Solution |
| 63 | Random Name Picker | View Solution |
| 64 | Encrypt/Decrypt Text: Implement at least one from http://rumkin.com/tools/cipher/collection | View Solution |
| 65 | Youtube To MP3 | View Solution |
| 66 | Text to Hexadecimal/Binary | View Solution |
| 67 | Calculate the first 1 000 digits of pi iteratively | View Solution |
| 68 | Sierpinski Triangle | View Solution |
| 69 | Mandelbrot Set | View Solution |
| 134 | Ulam Spiral | View Solution |
| # | Challenge | Status |
|---|---|---|
| 70 | OpenAI Gym Project | ✅ View Solution |
| 71 | AI for Roguelikes | ✅ View Solution |
| 72 | Sudoku/n-Puzzle Solver using A* algorithm | ✅ View Solution |
| 73 | Connect-4 AI Player using Alpha-Beta Pruning | ✅ View Solution |
| 74 | Basic Neural Network - Simulate individual neurons and their connections | ✅ View Solution |
| 75 | Real Neural Network - Implement a basic feed-forward neural network using matrices for entire layers along with matrix operations for computations. | ✅ View Solution |
| 76 | Convolutional Neural Network: Implement a convolutional N.N. for a handwritten digit recognition test on MNIST dataset (Use TensorFlow Theano etc...) | ✅ View Solution |
| 77 | Convolutional Neural Network: Implement your own convolutional neural network for handwritten digit recognition test on MNIST Dataset (Without TensorFlow Theano etc...) | ✅ View Solution |
Reinforcement learning experiments now live in challenges/Artificial Intelligence/OpenAI Gym/.
The folder ships a reproducible CartPole DQN baseline built on Stable-Baselines3 with command-line
flags for training and evaluation, checkpointing, deterministic seeding, and a binary-free heuristic for quick checks.
# Create an environment and install the AI stack (Gymnasium + Stable-Baselines3 + Torch)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1
python -m pip install -e .[ai]
# Train for 80k timesteps and save checkpoints/models under the project folder
python "challenges/Artificial Intelligence/OpenAI Gym/train.py" --mode train \
--total-timesteps 80000 \
--checkpoint-dir "challenges/Artificial Intelligence/OpenAI Gym/checkpoints" \
--model-path "challenges/Artificial Intelligence/OpenAI Gym/models/dqn_cartpole"
# Quickly sanity-check the heuristic CartPole controller used in tests
python - <<'PY'
from runpy import run_path
module_globals = run_path('challenges/Artificial Intelligence/OpenAI Gym/policies.py')
policy = module_globals['cartpole_balance_policy']()
print('Policy action for zero-state:', policy([0, 0, 0.05, 0]))
PY| # | Challenge | Status |
|---|---|---|
| 91 | Chip - 8 Emulator (Hard Mode: Cached Interpreter. Fuck You: Dynamic Recompiler use dynarec/jit library) | ✅ View Solution |
| 92 | Double Pendulum Simulation | ✅ View Solution |
| 93 | Constructive Solid Geometry | ✅ View Solution |
| 94 | Ray Tracer | ✅ View Solution |
| 95 | Real-Time Fast Fourier Transform Spectrum Visualizer | ✅ View Solution |
| 96 | Generate a Complimentary Color from any input color | ✅ View Solution |
| 97 | Generate a 5-Color Scheme from the most dominant tones in any image | ✅ View Solution |
| 98 | General Lambert's-Problem Solver (At least it's not rocket science... Oh wait it actually is) | ✅ View Solution |
| 99 | TI-86 Emulator (Bonus: Include the Option to Create Programs) | ✅ View Solution |
| 100 | N-Body Simulator with particles having a certain mass and radius depending on the mass that merge if they collide (Bonus: Include a GUI where you can place particles) | ✅ View Solution |
| 101 | Eulerian Path | ✅ View Solution |
| 102 | Draw a spinning 3D Cube | ✅ View Solution |
| 103 | Cellular Textures | ✅ View Solution |
| 145 | ASCII Digital Clock | ✅ View Solution |
| # | Challenge | Status |
|---|---|---|
| 104 | Knight's Tour | ✅ View Solution |
| 105 | Monster Raising/Breeding Simulator | ✅ View Solution |
| 106 | Tetris | ✅ View Solution |
| 107 | Snake | ✅ View Solution |
| 108 | Pipe Dreams | ✅ View Solution |
| 109 | Pac Man With Different Behaviors for each ghost | ✅ View Solution |
| 110 | Dragon Quest / Basic RPG Engine | ✅ View Solution |
| 111 | Rock Paper Scissors | ✅ View Solution |
| 112 | First-Person Engine in OpenGL (Walking Looking Around Jumping on Obstacles) (BONUS: VR Compatibility) | ✅ View Solution |
| 113 | Shuffle a Deck of Cards (Include a Visualization) | ✅ View Solution |
| 114 | Simulate a game of Tag using a multi-agent system | ✅ View Solution |
| 115 | Wolfenstein Clone (FPS two-dimensional map that appears to be 3-D) (If you need a starting point search for bisquit's video about DOOM-like Engines) | ✅ View Solution |
| 116 | Scorched Earth Clone | ✅ View Solution |
| 117 | Minesweeper | ✅ View Solution |
| 118 | An Audio/Visual 64KB Demonstration | ✅ View Solution |
| 119 | Sudoku | ✅ View Solution |
| 120 | Danmaku (Bullet Hell) Engine | ✅ View Solution |
| 121 | Roguelike Engine/Dungeon Generator | ✅ View Solution |
| 122 | Design a Game Engine in Unity | ✅ View Solution |
| 123 | Yahtzee | ✅ View Solution |
| 124 | Oil Panic | ✅ View Solution |
| 125 | Chess | ✅ View Solution |
| 126 | Go (No AI Necessary) | ✅ View Solution |
| 127 | Connect Four | ✅ View Solution |
| 128 | Mastermind | ✅ View Solution |
| 129 | Missile Command Game | ✅ View Solution |
| 130 | Tron | ✅ View Solution |
| 131 | Breakout | ✅ View Solution |
| 132 | Simon | ✅ View Solution |
This repository includes several scripts with graphical user interfaces (GUIs) and algorithm visualizations. Here are a few highlights:
| Tool | Command |
|---|---|
| PDF Metadata Tagger | python "challenges/Practical/PDF Tagger/pdftag_gui.py" |
| Image to ASCII Art Converter | python "challenges/Practical/ImgToASCII/convert_gui.py" |
| Multi-threaded Port Scanner | python "challenges/Practical/Port Scanner/scanner_gui.py" |
| Radix Base Converter | python "challenges/Practical/Radix Base Converter/radix_gui.py" |
| Markov Chain Sentence Generator | python "challenges/Practical/Markov Chain Sentence Generator/mcsg_gui.py" |
| Seam Carving Image Resizer | python "challenges/Practical/Seam Carving/resize_gui.py" |
| Visualization | Command |
|---|---|
| Dijkstra's Shortest Path | python "challenges/Algorithmic/Djikstra/dijkstra_visualizer.py" --start A |
| Towers of Hanoi | python "challenges/Algorithmic/Towers of Hanoi/ToH_visualizer.py" 4 |
| Character Frequency | python "challenges/Algorithmic/Character Counter/charcount_visualizer.py" -t "hello world" |
For those hungry for more, here are some excellent resources to continue your journey.
- Knuth: The Art of Computer Programming
- Skiena: The Algorithm Design Manual
- Cormen et al: Introduction to Algorithms
- Russel: Artificial Intelligence: A Modern Approach
- Abelson: Structure and Interpretation of Computer Programs
This section provides a practical, execution-focused overview so new contributors (or you on a fresh machine) can get from clone → running examples quickly.
PowerShell (Windows):
git clone https://github.com/saintwithataint/Pro-g-rammingChallenges4.git
cd Pro-g-rammingChallenges4
python -m venv .venv
. .venv/Scripts/Activate.ps1
python -m pip install -e .[practical]The project uses pyproject.toml extras as the single source of truth for optional stacks. Mix and match the ones you need, for example:
# Base algorithms + AI helpers
python -m pip install -e .[algorithmic,ai]
# Everything including developer tooling
python -m pip install -e .[all,developer]The root requirements.txt is now generated directly from the extras for compatibility with tools that still expect a requirements file. Regenerate it with python tools/sync_requirements.py if you update pyproject.toml.
pyproject.tomlextras drive dependency selection; install only what you need (e.g.python -m pip install -e .[visual]).- Run
python tools/sync_requirements.pyafter editing extras to keep the generatedrequirements.txtin sync. - Folder-level
requirements.txtfiles (e.g.challenges/Practical/,challenges/Emulation/) remain available for ultra-minimal installs. - Heavy/optional libs (plotly, vpython, scikit-learn, colour-science) can be skipped unless you need those features.
Large or frequently updated binaries live in Git LFS so the regular Git history stays lightweight. The following patterns are tracked automatically:
challenges/Games/**/Assets/**/*.{png,wav}– game textures, sprites, and audio cues.challenges/Emulation/Chip8/roms/*.ch8– sample ROMs for the CHIP-8 emulator.challenges/Emulation/FFTSpectrum/**/*.wav– reference audio for FFT spectrum demos.challenges/Practical/Booru Imageboard Downloader/downloads/**/*.png– example download payloads.challenges/Practical/ImgToASCII/*.png– high-resolution source images for ASCII rendering tests.challenges/Practical/Imageboard/docs/**/*.png– documentation screenshots that exceed a few kilobytes.challenges/Artificial Intelligence/CNN_Framework/checkpoints/**/*.{pt,pth}– neural network checkpoint blobs.
Everything else (including placeholder .gitkeep files) should remain in normal Git. If you add a new binary asset outside the
paths above either relocate it into an existing asset folder or extend .gitattributes with a narrowly-scoped pattern before
committing. After updating the attributes run git lfs track/git lfs untrack as needed, git add .gitattributes, and
finally git lfs checkout to ensure your working tree contains the real binary bits rather than pointer text. git lfs ls-files and git lfs status are good final sanity checks before opening a PR.
| Domain | Example Scripts | Key Deps | Typical Command |
|---|---|---|---|
| Web App | Imageboard | Flask, Pillow | python "challenges/Practical/Imageboard/imageboard.py" --help |
| Image Processing | Seam Carving | opencv-python, numpy | python "challenges/Practical/Seam Carving/resize.py" in.jpg --width -100 -o out.jpg |
| Visualization | 5 Color Scheme | numpy, matplotlib, scikit-learn | python "challenges/Emulation/5 color scheme/5cs.py" img.jpg --k 5 --show |
| Data / Geo | IP Tracking Visualization | requests, pandas, plotly | python "challenges/Practical/IP Tracking visualization/trackip.py" ips.txt --html map.html |
| CLI Utility | Radix Converter | (stdlib) | python "challenges/Practical/Radix Base Converter/radix.py" 1a --from 16 --to 2 |
| Text / ASCII | ASCII Clock | (stdlib) | python "challenges/Emulation/ASCII_Clock/ClockSynced.py" --refresh 0.2 |
| Math / Vectors | Vector Product | matplotlib | python "challenges/Practical/Vector Product/vector.py" cross 1,0,0 0,1,0 |
| PDF Metadata | PDF Tagger | pypdf | python "challenges/Practical/PDF Tagger/pdftag.py" doc.pdf --add key=value |
| Networking Scan | Port Scanner | (stdlib) | python "challenges/Practical/Port Scanner/scanner.py" 192.168.1.10 --top 100 |
| Markov Text | Markov Chain | (stdlib) | python "challenges/Practical/Markov Chain Sentence Generator/mcsg.py" corpus.txt --sentences 3 |
- Most Python scripts expose
--helpfor argument details. - Image tools usually accept
--outor-ofor output file specification. - Long-running tasks often support interruption with Ctrl+C (graceful cleanup implemented where applicable).
- Some GUIs are mirrored by a CLI variant (e.g.
resize.pyvsresize_gui.py). - Optional dependencies are imported inside
try/exceptblocks; absence results in reduced functionality, not crashes.
| Interest | Install Command |
|---|---|
| Web + Images | pip install Flask Pillow |
| Algorithm Visualizers | (typically stdlib) |
| Image Resizing / Seam Carving | pip install opencv-python numpy Pillow |
| Palette & Color Tools | pip install numpy Pillow matplotlib scikit-learn |
| PDF Tagging | pip install pypdf |
| Geo/IP Visualization | pip install requests pandas plotly tqdm |
| 3D Cube (VPython) | pip install vpython |
You can verify key imports with a short one-liner:
python - <<'PY'
import importlib, sys
mods = ["flask","PIL","numpy","cv2","matplotlib","plotly","pandas","pypdf"]
for m in mods:
try:
importlib.import_module(m)
print(f"[OK] {m}")
except Exception as e:
print(f"[MISS] {m}: {e.__class__.__name__}: {e}")
PYRun the repository's automated CLI smoke tests when you want to ensure
--help continues to execute successfully across the command-line tools:
pytest tests/test_cli_help.pyIf you add a new GUI-only program (or a script that needs network access or
large optional dependencies), include its relative path in the
SKIP_PATTERNS dictionary in tests/test_cli_help.py along with a short
reason. The test module treats each entry as a prefix, so adding
"Games" skips the entire games tree, while a specific file path affects
just that script.
| Issue | Cause | Fix |
|---|---|---|
ImportError: cv2 |
OpenCV not installed | pip install opencv-python |
No module named plotly |
Plotly omitted | pip install plotly |
| Pillow missing WEBP | Extra codecs absent | pip install Pillow[webp] |
| GUI window invisible | Running headless | Use CLI version or run locally |
OSError: [Errno ...] image file truncated |
Corrupt input image | Re-download / validate file |
To mirror the automated checks:
-
Install the developer and practical extras in editable mode so intra-repo imports work the same way as CI:
python -m pip install --upgrade pip python -m pip install -e .[developer,practical]
-
From the repository root, run the full test suite:
pytest
The included
pytest.inisetsPYTHONPATH=.so tests inchallenges/Practical/Imageboard/testsandchallenges/Algorithmic/MBRresolve local modules without extra flags. -
If you need to replicate the imageboard tests manually, export the environment variables they expect before invoking the app or running individual tests:
export IMAGEBOARD_DATA_DIR=$(mktemp -d) export IMAGEBOARD_SECRET_KEY=testing-secret export IMAGEBOARD_ADMIN_PASSWORD=letmein
- Introduce
pyproject.tomlwith extras:imageboard,visual,ml,geo. - Add
pytestsmoke tests (import +--helpexecution) to CI. - Provide a unified launcher (
python tools.py list/run <tool>). - Add Dockerfile for the imageboard deployment scenario.
- Generate HTML index page summarizing runnable tools.
If you’d like help implementing any of these improvements next, open an issue or continue the session here.