Skip to main content

Аналізатор гонки F1

Project description

Пакет task_6_report

task_6_report — Python package for analyzing Formula 1 race results: loading logs, building reports, output via CLI.


Installation

pip install task_6_report

Using

from race_report.report import RaceData
from pathlib import Path

# Вкажи шлях до папки з файлами
folder = Path(r"your path to the folder/data")

# Ініціалізація RaceData — передаємо шлях до папки як параметр folder
data = RaceData(folder=folder)

# Завантаження даних з файлів start.log, end.log, abbreviations.txt (шляхи утворюються автоматично)
data.load_data()

# Побудова звіту у порядку 'asc' або 'desc'
report = data.build_report(order='asc')

# Вивід звіту в консоль
data.print_report(report)

Required data files:

abbreviations.txt:

DRR_Daniel Ricciardo_RED BULL RACING TAG HEUER
SVF_Sebastian Vettel_FERRARI
LHM_Lewis Hamilton_MERCEDES

start.log:

DRR2018-05-24_12:14:12.054
SVF2018-05-24_12:14:15.145
LHM2018-05-24_12:14:18.035

end.log:

DRR2018-05-24_12:15:26.399
SVF2018-05-24_12:15:29.750
LHM2018-05-24_12:15:33.082

An example of a report:

1. DRR_Daniel Ricciardo | RED BULL RACING TAG HEUER | 1:14.345
2. SVF_Sebastian Vettel | FERRARI | 1:14.788
...

Call in GitBash GitBash (CLI)

To run your report.py file with the --order option, use the following command:

race-report -p PATH_TO_DATA_FOLDER [-o asc|desc] [-d DRIVER_NAME]

Parameters:

  • -p, --path (required): path to the folder with the data files
  • -o, --order (optional): sort order (asc for ascending, desc for descending), default asc
  • -d, --driver (optional): pilot name to display information only for him/her

Examples:

  • Build the full report in ascending order:
race-report -p data/ -o asc
  • Build the full report in descending order:
race-report -p data/ -o desc
  • Get information only about a specific pilot:
race-report -p data/ -d "Sebastian Vettel"

The structure of the project

task_6_report/

├── src/
│   └── race_report/
│       ├── __init__.py
│       ├── report.py
│       └── cli.py
│
├── tests/
│   ├── __init__.py
│   ├── tests_load_data/
│   ├── tests_build_report/
│   ├── tests_print_report/
│   ├── tests_read_abbreviations/
│   └── tests_cli/
│
├── LICENSE
├── pyproject.toml
├── README.md
└── .gitignore

License

This project is licensed under the MIT License.

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

task_6_report-0.4.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

task_6_report-0.4.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file task_6_report-0.4.1.tar.gz.

File metadata

  • Download URL: task_6_report-0.4.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for task_6_report-0.4.1.tar.gz
Algorithm Hash digest
SHA256 a6f1c9acca29a77466c990e03a0f118e250136d109267ac1b0c310578d0b4802
MD5 c043d40f2bf4877e6ad1d26ca7d84520
BLAKE2b-256 f61d0b40e11a9912c25295521f4bc2cbd977aedc8af6f21c7c2e68e40ce0e0f2

See more details on using hashes here.

File details

Details for the file task_6_report-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: task_6_report-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for task_6_report-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af81aa0c9f9c147afa8c1202627e9e97e05ab66db6ee5a8c58a89f1fdd986fac
MD5 f180b534110829b888a8b88eba13be08
BLAKE2b-256 192fbd89f6e1bbac56c53f1698c413ac3ed2783f6e7bd63dc858cbc34eff7ac1

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