Contributing to SpectroChemPy
General Principles
Any kind of contribution is welcome! While we encourage following these guidelines, don’t let them prevent you from contributing. This guide covers both basic contributions like issue reporting and advanced topics like code development.
For information about reporting issues, please see the issues page.
Getting Started with Development
Version Control Setup
- Create a GitHub account if you haven’t already 
- Install Git: - macOS: Via XCode or git-scm.com or Homebrew using - brew install git
- Windows: From git-scm.com 
- Linux: - sudo apt-get install gitor- pip install gitpython
 
Optional: Install a GUI client like SourceTree or GitHub Desktop
Setting Up Your Development Environment
- Fork the repository on GitHub 
- Clone your fork: - git clone https://github.com/your-user-name/spectrochempy.git cd spectrochempy git remote add upstream https://github.com/spectrochempy/spectrochempy.git 
- Create a Python virtual environment: - python3 -m venv .venv source .venv/bin/activate - python -m venv .venv .venv\Scripts\activate 
- Install SpectroChemPy in development mode: - python -m pip install --upgrade pip python -m pip install -e ".[dev]" # Installs development and test dependencies # or python -m pip install -e ".[dev, docs]" # Installs development, test and documentation dependencies 
Making Changes
- Create a feature branch: - git checkout -b my-new-feature 
- Make your changes and commit them: - git add modified-files git commit -m "ENH: Your descriptive commit message" - Commit prefix conventions: * ENH: Enhancement * FIX: Bug fix * DOC: Documentation * TEST: Testing * BUILD: Build changes * PERF: Performance * MAINT: Maintenance 
- Push to GitHub: - git push origin my-new-feature 
- Create a Pull Request on GitHub 
Maintaining Your PR
To update your PR with upstream changes:
git checkout my-new-feature
git fetch upstream
git merge upstream/master
git push origin my-new-feature
Tips for Success
- Reference related issues 
- Keep changes focused and PRs small 
- Ensure tests pass 
- Update your PR regularly 
- Follow the code style guidelines