Thank you for considering contributing to SWFT! We appreciate your interest in making our web-based file sharing service even better. This document provides guidelines for contributing to the project. Please take a moment to read and follow these guidelines to ensure a smooth and collaborative development process.
Before contributing, please review our Code of Conduct. We expect all contributors to adhere to this code to create a welcoming and inclusive community.
If you encounter a bug while using SWFT or have identified a potential issue, please open a new issue on our GitHub repository. Ensure that your report includes:
- A clear and descriptive title.
- Steps to reproduce the problem.
- Any relevant error messages or screenshots.
Have an idea for improving SWFT? Create an enhancement request on GitHub. Include:
- A concise description of the enhancement.
- The problem it addresses or the value it adds.
- Any additional details or examples to support your suggestion.
To contribute code to SWFT:
- Fork the SWFT repository on GitHub.
- Create a feature branch based on the
mainbranch. - Implement your changes while adhering to coding standards.
- Test your changes thoroughly.
- Create a pull request (PR) describing your changes, including:
- The purpose of the changes.
- Any issues fixed or features added.
- Instructions for testing.
Be prepared to discuss your PR and address any requested changes.
To set up a development environment for SWFT using a virtual environment, follow these steps:
- Python 3.7 or higher
pipvirtualenv(optional, if you want to use it)
-
Clone the Repository:
git clone https://github.com/hect1k/swft cd swft -
Create and Activate the Virtual Environment:
Use Python's built-in
venvmodule to create a virtual environment:python3 -m venv env
Then, activate the virtual environment:
-
On Linux/macOS:
source env/bin/activate -
On Windows:
.\env\Scripts\activate
-
-
Install the Dependencies:
With the virtual environment activated, install the required dependencies from the
requirements.txtfile:pip install -r requirements.txt
-
Set Up the Environment:
Copy the sample
.envfile:cp sample.env .env
Edit the
.envfile to configure the development environment. Essential variables include:URL = "http://localhost:8080" # URL of the hosted app PORT = 8080 # Port of the app DB_HOST = "localhost" # Database host (you can use a local database like PostgreSQL) DB_PORT = 5432 # Database port DB_NAME = "swft_dev" # Database name DB_USER = "postgres" # Database user DB_PASSWORD = "password" # Database password
Ensure that the database host (
localhost) corresponds to the service where you are running your database.
-
Run the Application:
Start the application by running the following command:
python app.py
This should start the application on
http://localhost:8080. -
Access the Logs:
If the app has logging configured, you can view the logs from the console output when running the application.
-
Stop the App:
To stop the app, simply press
Ctrl+Cin the terminal.
If you need to run commands in the virtual environment, make sure it's activated (source env/bin/activate on macOS/Linux, .env\Scripts\activate on Windows), and execute any necessary commands from the terminal.
Thank you for your contributions! Together, we can make SWFT a more robust and user-friendly file sharing service.