How recenama/practice-pull-request works
Project type and purpose
• This is a small, CLI-based Python utility whose primary function is to read a text file of words, optionally remove duplicates, and print or return the results.
• It also serves as a teaching/demo repository for DevOps concepts (Makefile usage, Docker execution, Git workflows).
Key components
a. User / Developer
• Invokes make run or directly runs python3 main.py.
b. Host Environment
• Linux/macOS (required by Makefile); optionally Windows via VM.
• Docker Engine running on the host.
c. Makefile
• Provides targets like run to encapsulate build/run commands.
d. Docker Container (optional)
• Defines a lightweight, reproducible execution environment for Python 3.
e. Python Interpreter + main.py
• Contains the core logic: reads <filename>, checks the dup flag, filters duplicates, outputs the word list.
f. Input File (palabras.txt or any <filename>)
• Plain‐text resource, one word per line.
g. Output / Console
• STDOUT displaying processed word list.
Relationships & data flow
• The User issues a command (make run or python3 main.py).
• If using make run:
• The Makefile calls Docker CLI to spin up the container.
• Docker Engine on the Host provisions the Container.
• Inside the Container, Python 3 runs main.py, mounts the input file from the host.
• If running directly: Python interpreter on the Host executes main.py against the file.
• main.py reads the Input File, applies duplicate-removal logic, then writes to STDOUT.
Architectural patterns & design principles
• Separation of concerns:
• Makefile isolates build/run mechanics.
• Docker container isolates runtime environment.
• main.py isolates business logic (file I/O + duplication logic).
• Infrastructure as Code: the Makefile codifies commands for reproducibility.
• Containerization: Docker encapsulates dependencies and ensures cross-platform consistency.