Thank you for your interest in contributing to ClassiPyR! This document provides guidelines for contributing to the project.
Getting Started
Prerequisites
- R (>= 4.0.0)
- devtools package for development
- Python with
scipy(required for .mat file operations)
Setting Up the Development Environment
Fork the repository on GitHub
-
Clone your fork locally:
-
Install the package in development mode:
devtools::install_deps(dependencies = TRUE) devtools::load_all() -
Set up Python environment (required for .mat file support):
library(iRfcb) ifcb_py_install(envname = "./venv")
Package Structure
ClassiPyR/
├── R/ # Package functions (exported)
│ ├── run_app.R # App launcher
│ ├── utils.R # Utility functions
│ ├── sample_loading.R # Sample loading logic
│ └── sample_saving.R # Sample saving logic
├── inst/
│ ├── app/ # Shiny application
│ │ ├── app.R # Entry point
│ │ ├── global.R # Initialization
│ │ ├── server.R # Server logic
│ │ └── ui.R # User interface
│ └── CITATION # Citation info
├── tests/testthat/ # Test suite
├── vignettes/ # Documentation articles
├── man/ # Function documentation (auto-generated)
└── docs/ # pkgdown site (auto-generated)
How to Contribute
Reporting Bugs
Before submitting a bug report: - Check existing issues to avoid duplicates - Collect information about the bug (R version, OS, error messages)
When submitting a bug report, please include: - A clear, descriptive title - Steps to reproduce the issue - Expected vs actual behavior - R session info (sessionInfo() output) - Screenshots if applicable
Suggesting Features
Feature suggestions are welcome! Please: - Check existing issues for similar suggestions - Describe the feature and its use case - Explain how it would benefit IFCB researchers
Code Style Guidelines
Testing
Run the test suite before submitting:
devtools::test()Check for R CMD check issues:
devtools::check()Tests are located in tests/testthat/. When adding new functionality, please include appropriate tests.
Documentation
- Function documentation uses roxygen2 (in R/ files)
- User guides are in
vignettes/as R Markdown - The pkgdown site is built automatically via GitHub Actions
To preview documentation locally:
devtools::document()
pkgdown::build_site()