Skip to content

Latest commit

 

History

History
130 lines (93 loc) · 3.82 KB

CONTRIBUTING.md

File metadata and controls

130 lines (93 loc) · 3.82 KB

Contributing to [Project Name]

Welcome to [Project Name]! We appreciate your interest in contributing. This document outlines the guidelines and steps to contribute to our project.

Table of Contents

Getting Started

To get started with contributing to [Project Name], follow these steps:

  1. Clone the repository

    git clone https://{$YOUR_GIT_TOKEN}@github.com/mojalefakodisang/scholarly
  2. Install a virtual environment

    sudo apt-get install -y virtualenv
  3. Create a virtual environment

    cd scholarly # Change directory to scholarly
    virtualenv venv
  4. Activate the virtual environment

    source venv/bin/activate
  5. Install the dependencies

    pip install -r requirements.txt
  6. 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
  7. 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;
  8. Run the migrations

    python3 -m manage makemigrations
    python3 -m manage migrate
  9. Create a superuser

    python3 -m manage createsuperuser
  10. 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.
  11. Open your browser and navigate to http://localhost:8000/ to view the application

    Example Image

  12. You can now log in with the superuser credentials you created in step 9 or create a new one

Contributing Guidelines

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.

Code Style

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.

Submitting a Pull Request

To submit your changes for review, follow these steps:

  1. Commit your changes with a descriptive commit message.
  2. Push your changes to your forked repository.
  3. Open a pull request on the main repository.
  4. Provide a clear and detailed description of your changes in the pull request.

License

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.