Alberto-Codes / miniature-garbanzo

Toy Project Space for JN
0 stars 0 forks source link

Alberto-Codes/issue1-Update-README #2

Open Alberto-Codes opened 4 months ago

Alberto-Codes commented 4 months ago

Title: Improve Python Code Formatting and Organization

Resolves #1

Description:

This pull request introduces improvements to the Python code formatting and organization in our "Hello World" application. We've integrated black for code formatting and isort for import organization.

Changes:

  1. Updated main.py to demonstrate the effects of black and isort.
  2. Added instructions to README.md on how to use black and isort.

Instructions for Reviewer:

  1. Checkout to this branch by opening it in GitHub Codespaces. If you are reading this you simply click the period key on your keyboard and it will open up this pull request in GitHub Codespaces. There is also a button on the top right that says <> Code with a dropdown that allows you to also open up a GitHub Codespace. (Please also read the README.md there are setings you should set to maximize your GitHub Codespace usage on your account.)

  2. Open the main.py file located in src directory by clicking once on it. You will need to use the explorer. The Explorer button is the topmost icon on the left sidebar, it looks like two stacked documents. Below it, you'll find other icons for Search (magnifying glass), Source Control (branching diagram), Run (play arrow), and Extensions (square within a square).

  3. Open the integrated terminal in VS Code. You can do this by clicking on Terminal in the top menu, then New Terminal.

  4. In the terminal, run black and isort on the main.py file:

    black src/main.py
    isort src/main.py

    These commands will format the code and organize the imports in main.py. Notice that the main.py file has been edited.

  5. Run the main.py script:

    python src/main.py

    This command will run the script and generate a log.txt file.

  6. Open the log.txt file and copy its contents. You can open the file by clicking on it in the Explorer on the left side of VS Code.

  7. Paste the contents of the log.txt file in your review comment on this pull request to validate that you have run the code successfully.

Acceptance Criteria: