Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 51 additions & 32 deletions docs/Manual_Setup_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ cd PictoPy
git remote add upstream https://github.com/AOSSIE-Org/PictoPy
```

### Prerequisites:

#### Install and Setup Miniconda

Before setting up the Python backend and sync-microservice, you need to have **Miniconda** installed and set up on your system.

1. **Download and Install Miniconda:**
- Visit the [Miniconda installation guide](https://www.anaconda.com/docs/getting-started/miniconda/install#quickstart-install-instructions)
- Follow the quickstart install instructions for your operating system
- Make sure `conda` is available in your terminal after installation

2. **Verify Installation:**
```bash
conda --version
```
You should see the conda version number if installed correctly.

### Tauri Frontend Setup:

1. **Install Tauri prerequisites based on your OS using this** [guide](https://tauri.app/start/prerequisites/).
Expand All @@ -43,7 +60,7 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy

### Python (FastAPI) Backend Setup Steps:

> **Note:** For backend setup make sure that you have **Python version 3.12**. Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.
> **Note:** For backend setup make sure that you have **Miniconda installed** (see Prerequisites section above). Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.

1. **Navigate to the Backend Directory:** Open your terminal and use `cd` to change directories:

Expand All @@ -53,47 +70,47 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
cd backend
```

2. **Set Up a Virtual Environment (Highly Recommended):** Virtual environments isolate project dependencies. Create one using:
2. **Create a Conda Environment:** Create a new conda environment with Python 3.12:

Bash(Linux/MacOS)
Bash/Powershell

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add language specifiers to fenced code blocks.

Markdown linting requires language specifiers for all fenced code blocks. Update the backticks to include the language identifier (e.g., ```bash or ```powershell).

For example, the block at lines 77-79:

Bash/Powershell

conda create -n .env python=3.12

Should be:

Bash

```bash
conda create -n .env python=3.12

Powershell

conda create -n .env python=3.12

This applies to all 10 code blocks flagged by the linter.

<details>
<summary>🔎 Proposed fixes for code block language specifiers</summary>

All code blocks need language identifiers added. Below are the affected lines with proposed changes:

**Backend Setup (lines 77-111):**
```diff
- ```
+ ```bash
  conda create -n .env python=3.12

```diff
- ```
+ ```bash
  conda activate ./.env

```diff
- ```
+ ```bash
  export PATH="$CONDA_PREFIX/bin:$PATH"

```diff
- ```
+ ```powershell
  $env:PATH = "$env:CONDA_PREFIX\Scripts;$env:PATH"

```diff
- ```
+ ```bash
  pip install -r requirements.txt

**Sync-Microservice Setup (lines 141-175):**
Apply the same language specifier additions to the matching code blocks in the sync-microservice section.
</details>



Also applies to: 85-85, 93-93, 99-99, 109-109, 141-141, 149-149, 157-157, 163-163, 173-173

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>

77-77: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @docs/Manual_Setup_Guide.md at line 77, Markdown code fences in the "Backend
Setup" and "Sync-Microservice Setup" sections are missing language specifiers;
update each of the 10 flagged fenced code blocks to include the appropriate
language identifier (e.g., bash or powershell) so the snippets like the
conda create/activate commands, export PATH, $env:PATH, pip install, and their
counterparts in the sync-microservice section are fenced as ```bash or

python3 -m venv .env
conda create -n .env python=3.12
```

Powershell(Windows)
3. **Activate the Conda Environment:**

Bash/Powershell

```
python -m venv .env
conda activate ./.env
```

3. **Activate the Virtual Environment:**
4. **Update PATH (Important):** Ensure the conda environment's binaries are prioritized:

Bash(Linux/MacOS)
Bash (Linux/MacOS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Correct macOS spelling (not "MacOS").

Update both instances to use the correct capitalization: macOS (not MacOS).

🔎 Proposed fixes

Line 91:

- Bash (Linux/MacOS)
+ Bash (Linux/macOS)

Line 155:

- Bash (Linux/MacOS)
+ Bash (Linux/macOS)

Also applies to: 155-155

🧰 Tools
🪛 LanguageTool

[uncategorized] ~91-~91: The operating system from Apple is written “macOS”.
Context: ...aries are prioritized: Bash (Linux/MacOS) ``` export PATH="$CONDA_PREFI...

(MAC_OS)

🤖 Prompt for AI Agents
In @docs/Manual_Setup_Guide.md at line 91, Replace the incorrect "MacOS"
capitalization with the correct "macOS" in both places mentioned (the "Bash
(Linux/MacOS)" heading at the occurrence around the "Bash" line and the second
instance around line 155); update both instances so they read "macOS" exactly,
preserving surrounding text and formatting.


```
source .env/bin/activate
export PATH="$CONDA_PREFIX/bin:$PATH"
```

Powershell(Windows)
Powershell (Windows)

```
.env\Scripts\Activate.ps1
$env:PATH = "$env:CONDA_PREFIX\Scripts;$env:PATH"
```

After activating, you should be able to see the virtual environment's name before the current path. Something like this:
After activating, you should be able to see the conda environment's name before the current path.

![alt text](/docs/assets/screenshots/virtualEnv.png)
5. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:

4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:

Bash
Bash/Powershell

```
pip install -r requirements.txt
```

5. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the virtual environment activated:
6. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the conda environment activated:

Bash/Powershell

Expand All @@ -107,7 +124,7 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy

### Sync-Microservice Setup Steps:

> **Note:** For sync-microservice setup make sure that you have **Python version 3.12**. Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.
> **Note:** For sync-microservice setup make sure that you have **Miniconda installed** (see Prerequisites section above). Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.

1. **Navigate to the Sync-Microservice Directory:** Open your terminal and use `cd` to change directories:

Expand All @@ -117,45 +134,47 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
cd sync-microservice
```

2. **Set Up a Virtual Environment (Highly Recommended):** Virtual environments isolate project dependencies. Create one using:
2. **Create a Conda Environment:** Create a new conda environment with Python 3.12:

Bash(Linux/MacOS)
Bash/Powershell

```
python3 -m venv .sync-env
conda create -n .sync-env python=3.12
```

Powershell(Windows)
3. **Activate the Conda Environment:**

Bash/Powershell

```
python -m venv .sync-env
conda activate ./.sync-env
```

3. **Activate the Virtual Environment:**
4. **Update PATH (Important):** Ensure the conda environment's binaries are prioritized:

Bash(Linux/MacOS)
Bash (Linux/MacOS)

```
source .sync-env/bin/activate
export PATH="$CONDA_PREFIX/bin:$PATH"
```

Powershell(Windows)
Powershell (Windows)

```
.sync-env\Scripts\Activate.ps1
$env:PATH = "$env:CONDA_PREFIX\Scripts;$env:PATH"
```

After activating, you should be able to see the virtual environment's name before the current path.
After activating, you should be able to see the conda environment's name before the current path.

4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
5. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:

Bash
Bash/Powershell

```
pip install -r requirements.txt
```

5. **Running the sync-microservice:** To start the sync-microservice in development mode, run this command while being in the sync-microservice folder and the virtual environment activated:
6. **Running the sync-microservice:** To start the sync-microservice in development mode, run this command while being in the sync-microservice folder and the conda environment activated:

Bash/Powershell

Expand Down
Loading