Welcome to the Mercor Hackathon project! Follow the instructions below to set up your development environment and get started.
Before you begin, ensure you have the following:
- Python version >= 3.8.1 installed on your machine. Make sure to add Python to your system PATH during installation.
- A valid OpenAI API key set in
main.py
.
-
Fork the Repository
- Click on the “Fork” button in the top right corner of the repository page.
-
Clone the Repository
- Use the following command to clone the repository to your local machine:
git clone <your_forked_repo_url>
- Use the following command to clone the repository to your local machine:
-
Open the Repository in Visual Studio Code
- Launch VS Code and open the folder containing the cloned repository.
-
Upgrade Python Version
- If you haven’t already, download Python version >= 3.8.1 from python.org and ensure it’s added to your PATH during installation.
-
Install Poetry
- Poetry is a Python package manager that simplifies dependency management. To install it, run the following command in your terminal:
pip install poetry
- Poetry is a Python package manager that simplifies dependency management. To install it, run the following command in your terminal:
-
Set Default Terminal Profile
- Press
Ctrl + Shift + P
to open the command palette. - Search for and select Terminal: Select Default Profile and choose Command Prompt.
- Press
-
Configure Poetry for VS Code
- Inside the VS Code terminal, navigate to your project folder and run:
poetry config virtualenvs.in-project true
- This command sets up the virtual environment within your project folder, allowing for better management of dependencies.
- Inside the VS Code terminal, navigate to your project folder and run:
-
Activate the Poetry Environment
- To activate the Poetry virtual environment, run:
poetry shell
- To activate the Poetry virtual environment, run:
-
Select the Poetry Interpreter
- Press
Ctrl + Shift + P
, then search for Python: Select Interpreter. - Ensure you select the interpreter associated with Poetry.
- Press
-
Install Dependencies
- Run the following command to install the project dependencies:
poetry install .
- Run the following command to install the project dependencies:
-
Run the Application
- Finally, run the application using:
poetry run python textbase/textbase_cli.py test main.py .
- Finally, run the application using:
- Remember to set your OpenAI API key in
main.py
to enable functionality. - If you encounter any issues, please refer to the official Poetry documentation for troubleshooting.
Happy coding!