betacord / METAR-chatbots-py

Tests for METAR parser generated by GPT-3.5 and Google Bard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

METAR parser

Source code showing the ability of ChatGPT (GPT-3.5) and Google Bard to generate unit tests for a function that extracts information from raw METAR reports. In both cases, the chatbots were asked to generate 100 test cases for the code located in the main.py module.

The entire implementation was placed in one module (main.py), which is not a good practice, but it is much easier to provide such a single-module code to the chatbot.

How to run?

  1. Open terminal
  2. Install all required packages:
pip install -r requirements.txt
  1. Run main script providing raw metar report in the international format:
python main.py [METAR REPORT]

Unfortunately, the tests generated by both chatbots are not valid and should not be run. I only included them for the sake of showing the full experiment.

About

Tests for METAR parser generated by GPT-3.5 and Google Bard


Languages

Language:Python 100.0%