bash git clone https://github.com/Examon-AI/quesgen-v.git cd quesgen-v
On macOS, a common approach is: bash brew install pipx pipx install poetry
For other platforms or methods, see Poetry's official docs.
-
Install dependencies and create a virtual environment:
bash poetry install
-
(Optional) Confirm your new virtual environment:
bash poetry env list poetry env info --path
If you're able to use poetry shell, do so:
bash
poetry shell
If you receive an error that the shell command does not exist, run your commands with:
bash
poetry run python <your_script>.py
or manually activate the environment:
-
Find the path of the Poetry venv: bash poetry env info --path
Example output:
/Users//Library/Caches/pypoetry/virtualenvs/quesgen-v-XXXX-py3.11
-
Activate it manually: bash source /Users//Library/Caches/pypoetry/virtualenvs/quesgen-v-XXXX-py3.11/bin/activate
Inside the quesgen-v project folder:
bash
poetry shell python scripts/generate.py <template_id>
poetry run python scripts/generate.py <template_id>
- Example: bash poetry run python scripts/generate.py template1 "Biology"
This script will:
- Load a JSON template from
quesgen_v/templates/<template_id>.json - Optionally filter PPQs (Past Paper Questions) from
quesgen_v/data/ppqs.csv - Generate a question, then store it in
quesgen_v/workspace/<template_id>/q_<n>.txt
-
Add a dependency: bash poetry add requests
This updates your
pyproject.tomlandpoetry.lock. -
Remove a dependency: bash poetry remove requests
-
Upgrade dependencies to latest allowed versions: bash poetry update
To get proper IntelliSense and import highlighting in Visual Studio Code:
-
Install the official Python extension in VS Code.
-
In the command palette (
Cmd + Shift + Pon macOS), select:-
Python: Select Interpreter
-
Choose Enter interpreter path... (or Find/ Browse).
-
Point to Poetry's virtual environment Python, e.g.:
/Users//Library/Caches/pypoetry/virtualenvs/quesgen-v-XXXX-py3.11/bin/python
-
-
VS Code should now recognize the environment and show correct import resolution.