Pipeline Setup
Before running or developing the pipeline, we need to ensure your IDE can properly find and execute all code modules. This setup ensures:
- Correct module imports
- Proper test execution
- Debugging capabilities
1. Prerequisite
Follow the Setup Virtual Environment guide to create a virtual environment.
2. Installing Requirements
After setting up your virtual environment, install the necessary packages:
- Activate your virtual environment
- Install requirements
make req-install
3. IDE Configuration
PyCharm Setup
project_root/
├── src/ # Source code directory
└── tests/ # Test files directory
- Configure source roots:
- Right-click src → "Mark Directory as" → "Sources Root"
- This folder will turn blue, indicating PyCharm recognizes it as source code
- Configure test roots:
- Right-click tests → "Mark Directory as" → "Test Sources Root"
- This folder will turn green, indicating PyCharm recognizes it as test code
VS Code Setup
- Create a .env file in your project root:
PYTHONPATH=src
- Update
settings.json
:
"python.envFile": "${workspaceFolder}/.env"
3. Test
To verify that your setup was completed successfully
- Run the tests from the tests directory directly using your IDE. or
- Run
make test
command in your terminal.