|
| 1 | +# Contributing to FIMserv |
| 2 | + |
| 3 | +Thank you for your interest in contributing to **FIMserv**! This tool is developed and maintained by the Surface Dynamics Modeling Lab (SDML) at The University of Alabama. Contributions of all kinds are welcome — bug reports, feature requests, documentation improvements, and code. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +1. **Fork** the repository on GitHub and clone your fork: |
| 8 | + |
| 9 | + ```bash |
| 10 | + git clone https://github.com/<your-username>/FIMserv.git |
| 11 | + cd FIMserv |
| 12 | + ``` |
| 13 | + |
| 14 | +2. **Create a virtual environment** (recommended) and install the package in editable mode with the development dependencies: |
| 15 | + |
| 16 | + ```bash |
| 17 | + conda create --name fimserve python==3.10 |
| 18 | + conda activate fimserve |
| 19 | + |
| 20 | + pip install -e ".[dev]" |
| 21 | + ``` |
| 22 | + |
| 23 | +3. **Create a branch** for your change: |
| 24 | + |
| 25 | + ```bash |
| 26 | + git checkout -b my-feature |
| 27 | + ``` |
| 28 | + |
| 29 | +## Code Style and Linting |
| 30 | + |
| 31 | +This project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formatting. The configuration lives in `pyproject.toml`. |
| 32 | + |
| 33 | +Before opening a pull request, run: |
| 34 | + |
| 35 | +```bash |
| 36 | +# Lint the codebase (auto-fix what is safe to fix) |
| 37 | +ruff check src tests --fix |
| 38 | + |
| 39 | +# Format the codebase |
| 40 | +ruff format src tests |
| 41 | +``` |
| 42 | + |
| 43 | +Both commands must pass cleanly for a pull request to be accepted. |
| 44 | + |
| 45 | +## Running Tests |
| 46 | + |
| 47 | +Tests are written with [pytest](https://docs.pytest.org/) and live in the `tests/` directory: |
| 48 | + |
| 49 | +```bash |
| 50 | +pytest |
| 51 | +``` |
| 52 | + |
| 53 | +Please add or update tests for any code you change, and make sure the existing test suite still passes. |
| 54 | + |
| 55 | +## Submitting a Pull Request |
| 56 | + |
| 57 | +1. Keep pull requests focused — one feature or fix per PR. |
| 58 | +2. Write a clear description of **what** the change does and **why** it is needed. |
| 59 | +3. Make sure `ruff check`, `ruff format --check`, and `pytest` all pass. |
| 60 | +4. Reference any related issues (e.g., `Fixes #123`). |
| 61 | + |
| 62 | +## Reporting Issues |
| 63 | + |
| 64 | +Found a bug or have a feature request? Please open an issue at |
| 65 | +[github.com/sdmlua/FIMserv/issues](https://github.com/sdmlua/FIMserv/issues) and include: |
| 66 | + |
| 67 | +- A clear description of the problem or request |
| 68 | +- Steps to reproduce (for bugs), including the HUC8 ID and date range used |
| 69 | +- Your Python version and operating system |
| 70 | + |
| 71 | +## Contact |
| 72 | + |
| 73 | +- Dr. Sagy Cohen (sagy.cohen@ua.edu) |
| 74 | +- Dr. Anupal Baruah (abaruah@ua.edu) |
| 75 | +- Supath Dhital (sdhital@crimson.ua.edu) |
0 commit comments