Skip to content

Latest commit

 

History

History
111 lines (74 loc) · 2.77 KB

File metadata and controls

111 lines (74 loc) · 2.77 KB

🌟 Contributing to PictoPy

Hi there! Thank you for considering contributing to PictoPy – we’re excited to collaborate with you. Whether you're fixing a bug, improving documentation, or suggesting a new feature — you're welcome here!

🛠 Setting Up the Project

Setup

  1. Setup Using Script (Recommended only for Windows and Debian-based OS like Ubuntu): Guide
  2. Setup Manually(Recommended for other OSes): Guide

Docs Website Setup

PictoPy documentation uses MkDocs with the Material theme and the Swagger UI plugin.

To set up and run the docs website on your local machine:

  1. Ensure you have Python 3 and pip installed. Navigate to the /docs folder.
  2. Create a virtual environment:
python -m venv .docs-env
  1. Activate the virtual environment:
# On macOS/Linux:
source .docs-env/bin/activate
# On Windows:
.docs-env\Scripts\activate
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Start the local MkDocs server:
mkdocs serve -f ../mkdocs.yml
  1. Open your browser and navigate to: http://127.0.0.1:8000.

  2. Edit Markdown files inside the docs/ folder. The site will automatically reload when changes are saved.

  3. To build the static site for production deployment, run:

mkdocs build -f ../mkdocs.yml

Testing

Frontend

cd frontend
npm test

Backend

  • FastAPI

    cd backend
    pytest
  • Tauri

    cd frontend/src-tauri/
    cargo test

Building for Production

Create Signing Keys for tauri using the command:

npm run tauri signer generate

Set the public key in tauri.conf.json as pubkey and private key and password in Environment Variables(of your terminal) as TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PASSWORD

As an example of the private key would look like this:

TAURI_SIGNING_PRIVATE_KEY=dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5NlF2SjE3cWNXOVlQQ0JBTlNITEpOUVoyQ3ZuNTdOSkwyNE1NN2RmVWQ1a0FBQkFBQUFBQUFBQUFBQUlBQUFBQU9XOGpTSFNRd0Q4SjNSbm5Oc1E0OThIUGx6SS9lWXI3ZjJxN3BESEh1QTRiQXlkR2E5aG1oK1g0Tk5kcmFzc0IvZFZScEpubnptRkxlbDlUR2R1d1Y5OGRSYUVmUGoxNTFBcHpQZ1dSS2lHWklZVHNkV1Byd1VQSnZCdTZFWlVGOUFNVENBRlgweUU9Cg==
TAURI_SIGNING_PRIVATE_KEY_PASSWORD=pass
npm run tauri build

Additional Resources

Troubleshooting

If you encounter any issues, please check the respective documentation for Tauri, React, and FastAPI. For persistent problems, feel free to open an issue in the project repository.