|
| 1 | +# 🎨✨ Contributing to NeMo Data Designer 🎨✨ |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Data Designer! |
| 4 | + |
| 5 | +We welcome contributions from the community and sincerely appreciate your efforts to improve the project. Whether you're fixing a typo, reporting a bug, proposing a new feature, or implementing a major enhancement, your work helps make Data Designer better for everyone 🎉. |
| 6 | + |
| 7 | +This guide will help you get started with the contribution process. |
| 8 | + |
| 9 | +## Table of Contents |
| 10 | + |
| 11 | +- [Getting Started](#getting-started) |
| 12 | +- [Ways to Contribute](#ways-to-contribute) |
| 13 | +- [Feature Requests](#feature-requests) |
| 14 | +- [Development Guide](#development-guide) |
| 15 | +- [Code Quality Standards](#code-quality-standards) |
| 16 | +- [Submitting Changes](#submitting-changes) |
| 17 | +- [Code of Conduct](#code-of-conduct) |
| 18 | +- [Signing off on your work](#signing-off-on-your-work) |
| 19 | + |
| 20 | + |
| 21 | +## Getting Started |
| 22 | +👋 Welcome to the Data Designer community! We're excited to have you here. |
| 23 | + |
| 24 | +Whether you're new to the project or ready to dive in, the resources below will help you get oriented and productive quickly: |
| 25 | + |
| 26 | +1. **[README.md](README.md)** – best place to start to learn the basics of the project |
| 27 | + |
| 28 | +2. **[AGENTS.md](AGENTS.md)** – context and instructions to help AI coding agents work on Data Designer (it's also useful for human developers!) |
| 29 | + |
| 30 | +3. **[Documentation](docs/)** – detailed documentation on Data Designer's capabilities and usage |
| 31 | + |
| 32 | +## Ways to Contribute |
| 33 | + |
| 34 | +There are many ways to contribute to Data Designer: |
| 35 | + |
| 36 | +### 🐛 Bug Fixes |
| 37 | + |
| 38 | +Found a bug? Before reporting, please |
| 39 | +1. Verify you're using the latest version: `uv pip install --upgrade data-designer` |
| 40 | +2. Search for duplicates in the [issue tracker](https://github.com/NVIDIA-NeMo/DataDesigner/issues) |
| 41 | + |
| 42 | +When [creating a bug report](https://github.com/NVIDIA-NeMo/DataDesigner/issues/new), please include: |
| 43 | +- Data Designer version: `python -c "import data_designer; print(data_designer.__version__)"` |
| 44 | +- Python version and operating system |
| 45 | +- Minimal reproducible example |
| 46 | +- Expected vs. actual behavior |
| 47 | +- Full error messages and stack traces |
| 48 | + |
| 49 | +If you are interested in fixing the bug yourself, that's AWESOME! Please follow the [development guide](#development-guide) to get started. |
| 50 | + |
| 51 | +### ✨ Feature Implementation |
| 52 | +Want to add new functionality? Great! Please review [our development approach](#feature-requests) and open a feature request to discuss the idea and get feedback before investing significant time on the implementation. |
| 53 | + |
| 54 | +### 📖 Documentation Improvements |
| 55 | +Documentation is crucial for user adoption. Contributions that clarify usage, add examples, or fix typos are highly valued. |
| 56 | + |
| 57 | +### 💡 Examples and Tutorials |
| 58 | +Share your use cases! Example notebooks and tutorials help others understand how to leverage Data Designer effectively. |
| 59 | + |
| 60 | +### 🧪 Test Coverage |
| 61 | +Help us improve test coverage by adding tests for untested code paths or edge cases. |
| 62 | + |
| 63 | +## Feature Requests |
| 64 | +Data Designer is designed to be as flexible and extensible as possible, and we welcome your ideas for pushing its capabilities even further! To keep the core library maintainable, while also supporting innovation, we take an incremental approach when adding new features – we explore what's already possible, extend through plugins when needed, and integrate the most broadly useful features into the core library: |
| 65 | + |
| 66 | +### How We Grow Data Designer |
| 67 | +1. 🧗 **Explore what's possible**: Can your use case be achieved with current features? We've designed Data Designer to be composable – sometimes creative combinations of existing tools can accomplish what you need. Check out our examples or open an issue if you'd like help exploring this! |
| 68 | + |
| 69 | +2. 🔌 **Extend through plugins**: If existing features aren't quite enough, consider implementing your idea as a plugin that extends the core library. Plugins let you experiment and share functionality while keeping the core library focused. |
| 70 | + |
| 71 | +3. ⚙️ **Integrate into the core library**: If your feature or plugin proves broadly useful and aligns with Data Designer's goals, we'd love to integrate it into the core library! We're happy to discuss whether it's a good fit and how to move forward together. |
| 72 | + |
| 73 | +This approach helps us grow thoughtfully while keeping Data Designer focused and maintainable. |
| 74 | + |
| 75 | +### Submitting a Feature Request |
| 76 | +Open a [new issue](https://github.com/NVIDIA-NeMo/DataDesigner/issues/new) with: |
| 77 | + |
| 78 | +- **Clear title**: Concise description of the feature |
| 79 | +- **Use case**: Explain what problem this solves and why it's important |
| 80 | +- **Proposed solution**: Describe how you envision the feature working |
| 81 | +- **Alternatives considered**: Other approaches you've thought about |
| 82 | +- **Examples**: Code examples or mockups of how users would interact with the feature |
| 83 | +- **Willingness to implement**: Are you interested in implementing this yourself? |
| 84 | + |
| 85 | +## Development Guide |
| 86 | +Data Designer uses [`uv`](https://github.com/astral-sh/uv) for dependency management. If you don't have uv installed, follow their [installation instructions](https://docs.astral.sh/uv/getting-started/installation/). |
| 87 | + |
| 88 | +### Initial Setup |
| 89 | +0. **Create or find an issue** |
| 90 | + |
| 91 | + Before starting work, ensure there's an issue tracking your contribution: |
| 92 | + - For bug fixes: Search [existing issues](https://github.com/NVIDIA-NeMo/DataDesigner/issues) or [create a new one](https://github.com/NVIDIA-NeMo/DataDesigner/issues/new) |
| 93 | + - For new features: Open a [feature request](#feature-requests) to discuss the approach first |
| 94 | + - Comment on the issue to let maintainers know you're working on it |
| 95 | + |
| 96 | +1. **Fork and clone the repository** |
| 97 | + |
| 98 | + Start by [forking the Data Designer repository](https://github.com/NVIDIA-NeMo/DataDesigner/fork), then clone your fork and add the upstream remote: |
| 99 | + |
| 100 | + ```bash |
| 101 | + git clone https://github.com/YOUR_GITHUB_USERNAME/DataDesigner.git |
| 102 | + |
| 103 | + cd DataDesigner |
| 104 | + |
| 105 | + git remote add upstream https://github.com/NVIDIA-NeMo/DataDesigner.git |
| 106 | + ``` |
| 107 | + |
| 108 | +2. **Install dependencies** |
| 109 | + |
| 110 | + ```bash |
| 111 | + # Install project with dev dependencies |
| 112 | + make install-dev |
| 113 | + |
| 114 | + # Or, if you use Jupyter / IPython for development |
| 115 | + make install-dev-notebooks |
| 116 | + ``` |
| 117 | + |
| 118 | +3. **Verify your setup** |
| 119 | + |
| 120 | + ```bash |
| 121 | + make test && make check-all |
| 122 | + ``` |
| 123 | + |
| 124 | + If no errors are reported, you're ready to develop 🚀 |
| 125 | + |
| 126 | +### Making Changes |
| 127 | + |
| 128 | +1. **Create a feature branch** |
| 129 | + |
| 130 | + ```bash |
| 131 | + git checkout main |
| 132 | + git pull upstream main |
| 133 | + git checkout -b <username>/<type-of-change>/<issue-number>-<short-description> |
| 134 | + ``` |
| 135 | + |
| 136 | + Example types of change: |
| 137 | + - `feat` for new features |
| 138 | + - `fix` for bug fixes |
| 139 | + - `docs` for documentation updates |
| 140 | + - `test` for testing changes |
| 141 | + - `refactor` for code refactoring |
| 142 | + - `chore` for chore tasks |
| 143 | + - `style` for style changes |
| 144 | + - `perf` for performance improvements |
| 145 | + |
| 146 | + Example branch name: |
| 147 | + - `johnnygreco/feat/123-add-xyz-generator` for a new feature by @johnnygreco, addressing issue #123 |
| 148 | + |
| 149 | +2. **Develop your changes** |
| 150 | + |
| 151 | + Please follow the patterns and conventions used throughout the codebase, as well as those outlined in [AGENTS.md](AGENTS.md). |
| 152 | + |
| 153 | +3. **Test and validate** |
| 154 | + |
| 155 | + ```bash |
| 156 | + make check-all-fix # Format code and fix linting issues |
| 157 | + make test # Run all tests |
| 158 | + make coverage # Check test coverage (must be >90%) |
| 159 | + ``` |
| 160 | + |
| 161 | + **Writing tests**: Place tests in [tests/](tests/) mirroring the source structure. Use fixtures from [tests/conftest.py](tests/conftest.py), mock external services with `unittest.mock` or `pytest-httpx`, and test both success and failure cases. See [AGENTS.md](AGENTS.md) for patterns and examples. |
| 162 | + |
| 163 | +4. **Commit your work** |
| 164 | + |
| 165 | + Write clear, descriptive commit messages, optionally including a brief summary (50 characters or less) and reference issue numbers when applicable (e.g., "Fixes #123"). |
| 166 | + |
| 167 | + ```bash |
| 168 | + git commit -m "Add XYZ generator for synthetic data" -m "Fixes #123" |
| 169 | + ``` |
| 170 | + |
| 171 | +5. **Stay up to date** |
| 172 | + |
| 173 | + Regularly sync your branch with upstream changes: |
| 174 | + |
| 175 | + ```bash |
| 176 | + git fetch upstream |
| 177 | + git merge upstream/main |
| 178 | + ``` |
| 179 | + |
| 180 | +## Submitting Changes |
| 181 | + |
| 182 | +### Before Submitting |
| 183 | + |
| 184 | +Ensure your changes meet the following criteria: |
| 185 | + |
| 186 | +- All tests pass (`make test`) |
| 187 | +- Code is formatted and linted (`make check-all-fix`) |
| 188 | +- New functionality includes tests |
| 189 | +- Documentation is updated (README, docstrings, examples) |
| 190 | +- License headers are present on all new files |
| 191 | +- Commit messages are clear and descriptive |
| 192 | + |
| 193 | +### Creating a Pull Request |
| 194 | + |
| 195 | +1. **Push your changes** to your fork: |
| 196 | + |
| 197 | + ```bash |
| 198 | + git push origin <username>/<type-of-change>/<issue-number>-<short-description> |
| 199 | + ``` |
| 200 | + |
| 201 | +2. **Open a pull request** on GitHub from your fork to the main repository |
| 202 | + |
| 203 | +3. **Respond to review feedback** update your PR as needed |
| 204 | + |
| 205 | +### Pull Request Review Process |
| 206 | + |
| 207 | +- Maintainers will review your PR and may request changes |
| 208 | +- Address feedback by pushing additional commits to your branch |
| 209 | +- Reply to the feedback comment with a link to the commit that addresses it. |
| 210 | +- Once approved, a maintainer will merge your PR |
| 211 | +- Your contribution will be included in the next release! |
| 212 | + |
| 213 | +## Code of Conduct |
| 214 | +Data Designer follows the Contributor Covenant Code of Conduct. We are committed to providing a welcoming and inclusive environment for all contributors. |
| 215 | + |
| 216 | +**Please read our complete [Code of Conduct](CODE_OF_CONDUCT.md)** for full details on our standards and expectations. |
| 217 | + |
| 218 | +### License File Headers |
| 219 | +All code files that are added to this repository must include the appropriate NVIDIA copyright header: |
| 220 | + |
| 221 | +```python |
| 222 | +# SPDX-FileCopyrightText: Copyright (c) {YEAR} NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 223 | +# SPDX-License-Identifier: Apache-2.0 |
| 224 | +``` |
| 225 | + |
| 226 | +Use `make update-license-headers` to add headers automatically. |
| 227 | + |
| 228 | +## Getting Help |
| 229 | +Need help with your contribution? |
| 230 | + |
| 231 | +- **Documentation**: Check the [documentation](docs/) and [AGENTS.md](AGENTS.md) for additional information |
| 232 | +- **Issues**: Browse [existing issues](https://github.com/NVIDIA-NeMo/DataDesigner/issues) for similar questions |
| 233 | +- **Contact **: Reach out to the core maintainers at [[email protected]](mailto:[email protected]) |
| 234 | + |
| 235 | + |
| 236 | +## Signing off on your work |
| 237 | + |
| 238 | +When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. All contributors are asked to sign the Data Designer [Developer Certificate of Origin (DCO)](DCO) when submitting their first pull request. The process is automated by a bot that will comment on the pull request. Our DCO is the same as the Linux Foundation requires its contributors to sign. |
| 239 | + |
| 240 | +--- |
| 241 | + |
| 242 | +Thank you for contributing to NeMo Data Designer! Your efforts help make synthetic data generation more accessible and powerful for everyone. 🎨✨ |
0 commit comments