-
Notifications
You must be signed in to change notification settings - Fork 94
docs: add contributing guide #1425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6c3f590
docs: add contributing guide
ianna 888ec31
style: pre-commit fixes
pre-commit-ci[bot] 57e64cd
Update CONTRIBUTING.md
ianna 2252d57
Update CONTRIBUTING.md
ianna 6badec1
Update CONTRIBUTING.md
ianna 7cbb97e
use pre-commit
ianna 1ed72a1
build local documentation howto
ianna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| # Contributing to uproot | ||
|
|
||
| Thank you for your interest in contributing to **uproot**! uproot is a community-driven project, and we welcome contributions of all kinds, including bug reports, feature requests, documentation improvements, and code contributions. | ||
|
|
||
| This guide will help you get started with contributing. | ||
|
|
||
| --- | ||
|
|
||
| ## 🚀 Quick Start | ||
|
|
||
| 1. **Fork** the repository on GitHub. | ||
| 2. **Clone** your fork locally: | ||
| ```bash | ||
| git clone https://github.com/YOUR_USERNAME/uproot.git | ||
| cd uproot | ||
| ``` | ||
|
|
||
| 3. **Set up the development environment**: | ||
|
|
||
| We recommend using a conda environment. You can reproduce the full developer environment with: | ||
|
|
||
| ```bash | ||
| conda create -n uproot-py313 python=3.13 | ||
| conda activate uproot-py313 | ||
|
|
||
| # Add conda-forge channel and prioritize it | ||
| conda config --add channels conda-forge | ||
| conda config --set channel_priority strict | ||
|
|
||
| # Install dependencies | ||
| conda install xrootd | ||
| conda install root | ||
| conda install pandas | ||
| conda install dask | ||
| conda install minio | ||
|
|
||
| # pip-only dependencies | ||
| pip install scikit-hep-testdata | ||
| pip install rangehttpserver | ||
| pip install boost_histogram | ||
| pip install hist | ||
| pip install dask_awkward | ||
| pip install awkward-pandas | ||
| pip install pytest-timeout | ||
| pip install fsspec-xrootd | ||
|
|
||
| # Run local HTTP server (if needed for test data) | ||
| python -m RangeHTTPServer | ||
| ``` | ||
|
|
||
| 4. **Install Uproot in editable mode**: | ||
| ```bash | ||
| pip install -e . | ||
ianna marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🌿 Branching and Naming Conventions | ||
|
|
||
| - Always work on a **feature branch**: | ||
| ```bash | ||
| git checkout -b YOUR_USERNAME/my-cool-feature | ||
| ``` | ||
| - Use descriptive names, such as: | ||
| - `fix_streamer-parsing` | ||
| - `feature_custom-interpretation-api` | ||
| - `docs_improve-tutorials` | ||
|
|
||
| --- | ||
|
|
||
| ## 🎨 Code Style | ||
|
|
||
| - Follow **PEP8** where applicable. | ||
| - Use **Black** for automatic formatting: | ||
| ```bash | ||
| black src tests | ||
| ``` | ||
| - Use **isort** for import sorting: | ||
| ```bash | ||
| isort src tests | ||
| ``` | ||
| - Run **flake8** to check for style issues. | ||
ianna marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| --- | ||
|
|
||
| ## ✅ Running Tests | ||
|
|
||
| Uproot uses **pytest** for testing. | ||
|
|
||
| To run the full test suite: | ||
| ```bash | ||
| python -m pytest tests -ss -vv | ||
| ``` | ||
|
|
||
| To run a specific test module: | ||
| ```bash | ||
| pytest tests/test_my_module.py | ||
| ``` | ||
|
|
||
| Some tests may depend on having ROOT or XRootD installed. These are covered in the environment setup. | ||
|
|
||
| --- | ||
|
|
||
| ## 🔃 Submitting a Pull Request | ||
|
|
||
| 1. Make sure all tests pass and your code is cleanly formatted. | ||
| 2. Push your changes to your fork: | ||
| ```bash | ||
| git push origin YOUR_USERNAME/my-cool-feature | ||
| ``` | ||
| 3. Open a pull request (PR) from your fork to the `main` branch of [scikit-hep/uproot](https://github.com/scikit-hep/uproot). | ||
| 4. Fill in the PR template and explain what you did and why. | ||
| 5. Be responsive to feedback from reviewers—we’re all here to help! | ||
|
|
||
| --- | ||
|
|
||
| ## 🐛 Reporting Bugs | ||
|
|
||
| 1. Check if the bug is already reported on the [issue tracker](https://github.com/scikit-hep/uproot/issues). | ||
| 2. If not, [open a new issue](https://github.com/scikit-hep/uproot/issues/new/choose) and provide: | ||
| - A minimal reproducible example | ||
| - Expected vs. actual behavior | ||
| - Version info (`python -m uproot --version`) | ||
| - Any relevant stack trace or logs | ||
|
|
||
| --- | ||
|
|
||
| ## 💡 Requesting Features | ||
|
|
||
| 1. Search the issues to see if a similar feature has been discussed. | ||
| 2. If not, open a **Feature Request** issue and describe: | ||
| - What problem the feature solves | ||
| - A suggested implementation or interface (if applicable) | ||
| - Any related prior art in other libraries or experiments | ||
|
|
||
| --- | ||
|
|
||
| ## 📚 Improving Documentation | ||
|
|
||
| Documentation lives in the `docs/` folder and is built using **Sphinx**. To build locally: | ||
| ```bash | ||
| cd docs | ||
| make html | ||
| ``` | ||
|
|
||
| You can also suggest improvements to examples, tutorials, and API references. | ||
ianna marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| --- | ||
|
|
||
| ## 🙌 Thanks! | ||
|
|
||
| uproot thrives on its community. Whether you're fixing a typo, contributing a feature, or suggesting a design—you're making a difference! | ||
ianna marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.