MichaelPGudz / music-library-python-test

Music Library Python Repo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checkpoint 1

CODECOOL MUSIC LIBRARY ver. 0.7

Codecoolers want to play some music during breaks. They need your help to manage their music library.

Running program

To run all tests with tests' names instead of '.', 'F' or 'E' at the beginning use:

python3 tests.py -v

To run tests and stop at first failing use:

python3 tests.py -f

To run the program itself use:

python3 main_program.py

Structure

CODECOOL MUSIC LIBRARY structure consists of these modules:

To modify

file_handling.py - importing and exporting data from/to file

music_reports.py - generating reports from given data

main_program.py - handling user interactions

To not modify

tests.py - unit tests - DO NOT MODIFY

test_helpers.py - helper functions used in tests - DO NOT MODIFY

display.py - printing data on screen - you may only change the body of print_program_menu function if you use another data structure

Data

Program has to import .txt file with values separated by commas. Each line of file represents album data in given order:

artist name,album name,release year,genre,length

Data exported to file should have the same format.

For your implementation operate only on albums_data.txt Rest of .txt files are for testing purposes only - DO NOT MODIFY THEM!

Requirements

  1. Implement all functions from file_handling, music_reports and main_program modules
  2. Code must pass all tests
  3. Every empty function should be implemented as it was described in docstrings - PLEASE READ THEM CAREFULLY
  4. Don't use built-in function print() in file_handling and music_reports modules
  5. Menu in main_program module offers at least 4 options for user (you can choose which one from music_reports or main_program module, for instance: 1. Delete album, 2. Get albums by genre, 3. Display oldest album, 4. Show genre stats)
  6. At least one function should be foolproof
  7. At least one function should be able to handle potential exceptions (you can choose which one)
  8. Use functions from display module to display data and menu, but only in main_program
  9. If you read this last requirement, smile and keep your head up! You can do it! :)

NOTE: You can add your own functions to any module if you feel they are needed to make your code cleaner. You may add test cases for the extra functions you write.

About

Music Library Python Repo.


Languages

Language:Python 100.0%