In tests folders are simple questions/tasks to solve.
Translate folder contains training program which read data from inputs folder do some operation on data and writes output to output folder. The program has bug introduced, so first quest is to debug and run it. It's intentionally created not pythonic, wrongly in some places.
Exercises:
- Run translate.py script with input.txt and output.txt files
- Fix exception
- Add logger DEBUG message which print each read line in TxtReader.read_element() method
- Raise exception when input file in Reader object cannot be found. File not exists
- Raise exception when output file in Writer object exists. File exists
- Correct program by removing redundant \n in value fields
- How to secure reader/writer factory against not exists reader/writer classes
- Add property to reader/writer class which returns full path to input/output file
- Allow writer.write() method to work also with tuple type, not only List[tuple]
- Implement KeyValue(NamedTuple) class as return value from reader.read_element() method
- Implement KeyValue(NamedTuple) class as input value to writer.write() method
- Implement BinWriter class
- Why BinReader.read_element does not work when last character in input.bin file is #
- Refactor BinReader.read_element method. What should be done at first
- Implement conversion (convert to lowercase all characters in value field) as easy as possible
- Implement conversion (convert to lowercase all characters in value field) without modifying main program
- Construct list comprehensions statement in writer.write() method
Questions:
- What is abc - abstraction/interface class
- Factory design patter
- Context manager
- Generator