adamdoty / ta-dah-morse-code-translator

Translator that encrypts and decrypts morse code
MIT License
1 stars 0 forks source link

Restructuring the project files into a more conventional pattern #1

Open adamdoty opened 2 years ago

adamdoty commented 2 years ago

Using an article titled "Hypermodern Python" as a guide for restructuring the project.

adamdoty commented 2 years ago
adamdoty commented 2 years ago
JnyJny commented 2 years ago

Another thing to move around are the tests that live in src/ta_dah_morse_code_translator/test_* to a top-level tests directory. This keeps the tests from being included in the package that someone would install on their machine and taking up space that isn't necessary (tests are generally run in the development environment or the CI/CD pipeline).

So from this:

src
└── ta_dah_morse_code_translator
    ├── __init__.py
    ├── console.py
    ├── morse_code_characters.py
    ├── morse_to_text.py
    ├── test_morse_to_text.py
    ├── test_text_to_morse.py
    └── text_to_morse.py

To this:

src
└── ta_dah_morse_code_translator
    ├── __init__.py
    ├── console.py
    ├── morse_code_characters.py
    ├── morse_to_text.py
    └── text_to_morse.py
tests
├── __init__.py
├── test_morse_to_text.py
└── test_text_to_morse.py
adamdoty commented 2 years ago

@JnyJny thank you! I'm into the testing section of the Hypermodern Python guide and I realized I hadn't the commit restructuring the location of test directory. Will push as soon as I get through the testing section (part 2 of the guide).