Skip to content

Getting Started

Gianluca Zhang edited this page Feb 11, 2025 · 3 revisions

Getting Started:

1. Installing Python:

Ensure that you have Python 3.12 installed on your system by running the following command:

python3 --version

If Python is not installed, or you need a different version, follow the installation instructions for your operating system from the official Python documentation: https://www.python.org/downloads/.

2. Project Setup:

You'll need to clone the repository containing the project. Open your terminal and execute the following command:

git clone https://github.com/CApy-RPI/mvp.git
cd mvp

3. Managing Dependencies

3.1 Dependency Management

  • Use a virtual environment to manage dependencies:
python -m venv .venv
# On Windows
.venv\Scripts\activate
# On Unix/MacOS
source .venv/bin/activate

3.2 Installing Requirements

  • Use requirements.txt for production dependencies and requirements_dev.txt for development dependencies:
# Install production dependencies
pip install -r requirements.txt

# Install development dependencies
pip install -r requirements_dev.txt

3.3 requirements.txt vs requirements_dev.txt

  • requirements.txt: Contains the dependencies required for the application to run in production.
  • requirements_dev.txt: Contains additional dependencies required for development, such as testing and linting tools.

Example requirements.txt:

discord.py
pymongo

Example requirements_dev.txt:

pytest
flake8
black
mypy

4. Running the Bot

.venv\Scripts\activate
python src/capy_app/main.py