Welcome to [Project Name]! We appreciate your interest in contributing. This document outlines the guidelines and steps to contribute to our project.
To get started with contributing to [Project Name], follow these steps:
-
Clone the repository
git clone https://{$YOUR_GIT_TOKEN}@github.com/mojalefakodisang/scholarly
-
Install a virtual environment
sudo apt-get install -y virtualenv
-
Create a virtual environment
cd scholarly # Change directory to scholarly virtualenv venv
-
Activate the virtual environment
source venv/bin/activate
-
Install the dependencies
pip install -r requirements.txt
-
Set the following environment variables
export SCHOLARLY_EMAIL=email_you_want_to_use_for_development export EMAIL_PASSWORD=app_password # not email password export SECRET_KEY=your_secret_key # create a secret key export DB_ENGINE='django.db.backends.mysql' export DB_USER=your_db_username export DB_PASSWORD=your_user_db_password export DB_NAME=scholarly export DB_HOST=localhost export DB_PORT=3306
-
Create the database and user in MySQL 8.0
CREATE DATABASE scholarly; CREATE USER 'your_db_username'@'localhost'IDENTIFIED BY 'your_user_db_password'; GRANT ALL PRIVILEGES ON scholarly.* TO'your_db_username'@'localhost'; FLUSH PRIVILEGES;
-
Run the migrations
python3 -m manage makemigrations python3 -m manage migrate
-
Create a superuser
python3 -m manage createsuperuser
-
You are all set. You now going to run the server
python3 -m manage runserver
Outcome:
Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). August 25, 2024 - 12:00:00 Django version 3.2.7, using settings 'scholarly.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C.
-
Open your browser and navigate to
http://localhost:8000/
to view the application -
You can now log in with the superuser credentials you created in step 9 or create a new one
Please follow these guidelines when contributing to Scholarly:
- Before starting work on a new feature or bug fix, create an issue on GitHub to discuss the proposed changes.
- Ensure that your code adheres to the project's code style guidelines (see Code Style).
- Write clear and concise commit messages.
- Test your changes thoroughly before submitting a pull request.
Scholarly follows a specific code style to maintain consistency throughout the codebase. Please refer to the pycodestyle documentation for detailed instructions on how to format your code.
To submit your changes for review, follow these steps:
- Commit your changes with a descriptive commit message.
- Push your changes to your forked repository.
- Open a pull request on the main repository.
- Provide a clear and detailed description of your changes in the pull request.
By contributing to [Project Name], you agree that your contributions will be licensed under the project's license.
Thank you for your interest in contributing to Scholarly! We appreciate your time and effort.