How aditya-cult/unbound-ranker works
Project type and purpose
• This is a small standalone CLI data-processing tool written in Python.
• Its purpose is to read a CSV of competitor metrics (Format, City, Age Bracket, Strength, Endurance), compute three ranks per competitor (Strength, Endurance, Overall), and write a new CSV alongside the input.
File structure
• Top level:
• ranker.py – the main script
• requirements.txt – external Python dependencies (e.g., pandas or numpy)
• README.md – usage and rules
• .gitignore – ignores venvs/output files
• No separate frontend/backend folders or microservices. All logic lives in one script.
README for additional insights
• Describes input format and exact headers.
• Explains ranking rules (competition ranking with ties; age-bracket exceptions).
• Shows both interactive prompt and CLI-argument usage.
• Output naming convention (input “ - data.csv” → output “ - ranks.csv”).
Main components and interactions
a. Components:
1. User/CLI Runner
2. Input Parser Module (reads CSV, validates headers)
3. Ranking Engine Module
– Strength ranker
– Endurance ranker
– Overall rank aggregator
4. Output Writer Module (writes new CSV)
5. Python Runtime & Dependencies (pandas, etc.)
6. File System (source and destination CSV files)
b. Relationships & data flow:
• User invokes ranker.py →
• Input Parser reads CSV file from filesystem →
• Parser passes a DataFrame/records to Ranking Engine →
• Engine computes ranks and appends columns →
• Output Writer writes new CSV to filesystem →
• Script terminates, user inspects output.
c. Architectural patterns & principles:
– Single-process, procedural/functional separation into parser, compute, writer.
– Data-centric pipeline (load → transform → write).
– Dependency injection of input path to ease testing.
d. Technologies/frameworks:
– Python 3.9+
– pandas (or csv + numpy) for data handling
– Standard library modules: argparse (for CLI), logging (optional)