simondereuver / TARI29

Group assignment
MIT License
0 stars 0 forks source link

Add makefile and update readme accordingly #8

Closed simondereuver closed 2 months ago

simondereuver commented 2 months ago

Makefile and update readme accordingly

Summary

Makefile

Available Commands

  1. make start:

    • Purpose: Sets up the environment by creating a virtual environment (if it doesn't already exist), installs the dependencies, opens VS Code, and prints instructions for manually activating the virtual environment.

    • Steps:

      1. Creates a virtual environment called venv (if necessary).
      2. Installs the project dependencies from requirements.txt.
      3. Opens the project in VS Code.
      4. Provides instructions to manually activate the virtual environment. (There is no workaround this, so the enviroment has to be manually activated after running make start).
    • Usage: make start

  2. make lint:

    • Purpose: Runs pylint on the source code to check for code style issues and errors. This requires the virtual environment to be activated first, usefull to catch errors before you push and create a merge request (so it passes the pipeline). Note: You must manually activate the virtual environment before running this command, as the subshell created by Makefile doesn't persist the environment activation.

    • Usage: Activate the virtual enviroment: On Windows: venv\Scripts\activate On Unix-like systems (Linux, macOS): source nameofenv/bin/activate Then run: make lint.

  3. make clean:

    • Purpose: Removes the virtual environment directory, cleaning up the project.

    • Steps: Removes the virtual environment folder venv.

    • Usage: make clean

  4. IMPORTANT NOTE:

    • You need to have make installed to use it, makefile has been created with make version 4.4.