RSCE / CONTRIBUTING.md
LP1205's picture
Deploy RSCE backend to Hugging Face Space
5e952bb
|
Raw
History Blame Contribute Delete
2.18 kB

Contributing to RSCE

Thank you for your interest in contributing to the Research Synthesis & Contradiction Engine (RSCE)! To ensure a smooth and productive collaboration, please follow the guidelines below.


πŸ› οΈ Development Setup

RSCE requires Python 3.11+ and Node.js 18+.

1. Clone the Repository

git clone https://github.com/Laaksh1205/RSCE.git
cd RSCE

2. Set Up the Backend

Create a virtual environment, activate it, and install the package along with its development dependencies:

# Create virtual environment
python -m venv .venv

# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows (PowerShell):
.venv\Scripts\Activate.ps1
# On Windows (Command Prompt):
.venv\Scripts\activate.bat

# Install package in editable mode with development dependencies
pip install -e ".[dev]"

# (Optional) Install NLP dependencies for scispaCy MeSH Entity Normalization
pip install -e ".[nlp]"

Configure your environment variables by copying .env.example to .env and adding your API keys:

cp .env.example .env

3. Set Up the Frontend

cd frontend
npm install

πŸ§ͺ Testing

We require all contributions to pass our unit and integration test suite before merging.

  • Run the full test suite locally:
    pytest tests/
    
  • Run tests with verbose output:
    pytest tests/ -v
    
  • Run a specific test file:
    pytest tests/test_pipeline.py -v
    

🎨 Code Style & Quality

We use Ruff for linting and code formatting.

  • Run the linter:
    ruff check .
    
  • Format your code:
    ruff format .
    

πŸš€ Submitting Changes

  1. Create a branch for your feature or bug fix:
    git checkout -b feature/your-feature-name
    
  2. Make your changes and write/update unit tests to cover them.
  3. Run tests and linter to verify everything passes locally.
  4. Commit your changes with clear and descriptive commit messages.
  5. Push to your fork and open a Pull Request against the main branch.

Thank you for contributing!