Skip to main content

Processes racing data to generate a detailed report of racer statistics.

Project description

Report of Monaco 2018 Racing

This project processes racing data to generate a detailed report of racer statistics, including race times, rankings, and team information. It supports sorting results and filtering by specific drivers.

Features

  • Command-line Interface: Configure input folder, sorting order, and driver filtering.
  • Data Parsing: Reads racer data from structured files (abbreviations.txt, start.log, end.log).
  • Time Calculations: Computes race durations accurately from start and end timestamps.
  • Flexible Reporting: Displays full rankings or filtered statistics for a single driver.

Installation

Create and activate a virtual environment:

virtualenv venv

venv/scripts/activate

Install the package:

python -m pip install monaco_2018_report

Import the package:

import monaco_2018_report

Usage

Run the script from the command line with the following options:

python script.py --folder_path <path_to_data_folder> [--order <asc|desc>] [--driver <driver_name>]

Arguments:

  • --folder_path (required): Path to the folder containing abbreviations.txt, start.log, and end.log.
  • --order (optional): Sorting order of the report.
    • Options:
      • asc (default): Ascending order of race times.
      • desc: Descending order of race times.
  • --driver (optional): Filter and show statistics for a specific driver.

Usage Exemple

python script.py --folder_path ./data --order desc --driver "Fernando Alonso"

Output

  • Ranked Report: Displays all racers, sorted by race time, with a separator distinguishing the top 15 racers.
  • Driver Statistics: Shows details of a specific driver's performance if --driver is specified

File Requirements

The input folder must contain:

  • abbreviations.txt: Racer abbreviations, names, and team data.
  • start.log: Start times for each racer.
  • end.log: End times for each racer.

Error Handling

  • Ensures all required files are present.
  • Validates input data formats.
  • Provides informative error messages for missing or invalid arguments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monaco_2018_report-0.4.2.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monaco_2018_report-0.4.2-py3-none-any.whl (5.3 MB view details)

Uploaded Python 3

File details

Details for the file monaco_2018_report-0.4.2.tar.gz.

File metadata

  • Download URL: monaco_2018_report-0.4.2.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for monaco_2018_report-0.4.2.tar.gz
Algorithm Hash digest
SHA256 55c26739a72875b7e865ecaf9342fa5d51852ae818485a506d8fc7e710e158ca
MD5 a8a2047f4f4485eb91fae49878bfd333
BLAKE2b-256 f148b3f4dd40373c51a9e2241f7a7f2ac6d3b0396f73df80c3d388318732ab4e

See more details on using hashes here.

File details

Details for the file monaco_2018_report-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for monaco_2018_report-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7d642c9cad9e2d0d073cd23d48bff910edfb981bf27f4c200ff4935fe6ee48a6
MD5 ef6b38c01ac817bb41219614050831fd
BLAKE2b-256 5095018b321a7b1a1e65c5c985dd8f4d47d12eeef76fd0e1d2db96249bc2c6f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page