|
1 | 1 | # Contributing |
2 | 2 |
|
3 | | -Thank you for your interest in contributing to Jumpstarter! This document outlines the process for contributing to the project and provides guidelines to make the contribution process smooth. |
| 3 | +Thank you for your interest in contributing to Jumpstarter! |
4 | 4 |
|
5 | 5 | ## Getting Help |
6 | 6 |
|
7 | | -If you have questions or need help, here are the best ways to connect with the community: |
8 | | - |
9 | | -### Community Resources |
10 | | - |
11 | | -- **Matrix Chat**: Join our [Matrix community](https://matrix.to/#/#jumpstarter:matrix.org) for real-time discussions and support |
12 | | -- **Weekly Meetings**: Participate in our [weekly community meetings](https://meet.google.com/gzd-hhbd-hpu) to discuss development and get help |
13 | | -- **Etherpad**: Check our [Etherpad](https://etherpad.jumpstarter.dev/pad-lister) for meeting notes and collaborative documentation |
14 | | -- **GitHub Issues**: [Open an issue](https://github.com/jumpstarter-dev/jumpstarter/issues) in the repository for bug reports and feature requests |
15 | | -- **Documentation**: Visit our [documentation](https://jumpstarter.dev/) for comprehensive guides and tutorials |
16 | | - |
17 | | -## Code of Conduct |
18 | | - |
19 | | -Please be respectful and considerate of others when contributing to the project. |
| 7 | +- **Matrix Chat**: Join our [Matrix community](https://matrix.to/#/#jumpstarter:matrix.org) |
| 8 | +- **GitHub Issues**: [Open an issue](https://github.com/jumpstarter-dev/jumpstarter/issues) |
| 9 | +- **Documentation**: Visit our [documentation](https://jumpstarter.dev/) |
| 10 | +- **Weekly Meetings**: [Google Meet](https://meet.google.com/gzd-hhbd-hpu) |
| 11 | +- **Etherpad**: [Collaborative docs](https://etherpad.jumpstarter.dev/pad-lister) |
20 | 12 |
|
21 | 13 | ## Getting Started |
22 | 14 |
|
23 | 15 | 1. Fork the repository |
24 | 16 | 2. Clone your fork locally |
25 | | -3. Set up the development environment |
26 | | -4. Make your changes on a new branch |
| 17 | +3. Set up the development environment: `make sync` and `make test` |
| 18 | +4. Make changes on a new branch |
27 | 19 | 5. Test your changes thoroughly |
28 | 20 | 6. Submit a pull request |
29 | 21 |
|
30 | | -## Development Setup |
31 | | - |
32 | | -```shell |
33 | | -# Install dependencies |
34 | | -make sync |
35 | | - |
36 | | -# Run tests |
37 | | -make test |
38 | | -``` |
39 | | - |
40 | 22 | ## Contribution Guidelines |
41 | 23 |
|
42 | 24 | ### Making Changes |
43 | 25 |
|
44 | | -- Keep changes focused and related to a single issue |
45 | | -- Follow the existing code style and conventions |
46 | | -- Add tests for new features or bug fixes |
47 | | -- Update documentation as needed |
| 26 | +- Focus on a single issue |
| 27 | +- Follow existing code style |
| 28 | +- Add tests and update documentation |
48 | 29 |
|
49 | 30 | ### Commit Messages |
50 | 31 |
|
51 | | -- Use clear and descriptive commit messages |
| 32 | +- Use clear, descriptive messages |
52 | 33 | - Reference issue numbers when applicable |
53 | 34 | - Follow conventional commit format when possible |
54 | 35 |
|
55 | 36 | ### Pull Requests |
56 | 37 |
|
57 | | -- Provide a clear description of the changes |
58 | | -- Link to any relevant issues |
59 | | -- Ensure all tests pass before submitting |
60 | | -- Be responsive to feedback and questions |
| 38 | +- Provide a clear description |
| 39 | +- Link to relevant issues |
| 40 | +- Ensure all tests pass |
61 | 41 |
|
62 | 42 | ## Types of Contributions |
63 | 43 |
|
64 | 44 | ### Code Contributions |
65 | | - |
66 | | -We welcome contributions to the core codebase, including bug fixes, features, and improvements. |
| 45 | +We welcome bug fixes, features, and improvements to the core codebase. |
67 | 46 |
|
68 | 47 | ### Contributing Drivers |
69 | 48 |
|
70 | | -If you are working on a driver or adapter library of general interest, please consider submitting it to this repository, as it will become available to all Jumpstarter users. |
71 | | - |
72 | | -To create a new driver scaffold, you can use the `create_driver.sh` script: |
| 49 | +To create a new driver scaffold: |
73 | 50 |
|
74 | 51 | ```shell |
75 | | -./__templates__/create_driver.sh vendor_name driver_name "Your Name" "your.email@example.com" |
76 | | -``` |
77 | | - |
78 | | -This will create the necessary files and structure for your driver in the `packages/` directory. For example: |
79 | | - |
80 | | -```shell |
81 | | -./__templates__/create_driver.sh yepkit Ykush "Your Name" "your.email@example.com" |
82 | | -``` |
83 | | - |
84 | | -Creates: |
85 | | -``` |
86 | | -packages/jumpstarter_driver_yepkit/jumpstarter_driver_yepkit/__init__.py |
87 | | -packages/jumpstarter_driver_yepkit/jumpstarter_driver_yepkit/client.py |
88 | | -packages/jumpstarter_driver_yepkit/jumpstarter_driver_yepkit/driver_test.py |
89 | | -packages/jumpstarter_driver_yepkit/jumpstarter_driver_yepkit/driver.py |
90 | | -packages/jumpstarter_driver_yepkit/.gitignore |
91 | | -packages/jumpstarter_driver_yepkit/pyproject.toml |
92 | | -packages/jumpstarter_driver_yepkit/README.md |
93 | | -packages/jumpstarter_driver_yepkit/examples/exporter.yaml |
| 52 | +$ ./__templates__/create_driver.sh driver_package DriverClass "Your Name" "your.email@example.com" |
94 | 53 | ``` |
95 | 54 |
|
96 | | -#### Driver Structure |
97 | | - |
98 | | -A Jumpstarter driver typically consists of: |
99 | | - |
100 | | -1. **Driver Implementation**: The core functionality that interfaces with the device or service |
101 | | -2. **Client Implementation**: Client code to interact with the driver |
102 | | -3. **Tests**: Tests to verify the driver's functionality |
103 | | -4. **Examples**: Example configurations showing how to use the driver |
104 | | -5. **Documentation**: Clear documentation on setup and usage |
105 | | - |
106 | | -#### Private Drivers |
107 | | - |
108 | | -If you are creating a driver or adapter library for a specific need, not of general interest, or that needs to be private, please consider forking our [jumpstarter-driver-template](https://github.com/jumpstarter-dev/jumpstarter-driver-template). |
109 | | - |
110 | | -#### Driver Development Workflow |
111 | | - |
112 | | -After creating your driver skeleton: |
113 | | - |
114 | | -1. Implement the driver functionality according to the Jumpstarter driver interface |
115 | | -2. Write comprehensive tests for your driver |
116 | | -3. Create example configurations |
117 | | -4. Document the setup and usage in the README.md |
118 | | -5. Submit a pull request to the main Jumpstarter repository |
119 | | - |
120 | | -#### Testing Your Driver |
121 | | - |
122 | | -To test your driver during development: |
123 | | - |
124 | | -```shell |
125 | | -# From the project root |
126 | | -make sync # Synchronize dependencies |
127 | | -cd packages/your_driver_package |
128 | | -pytest # Run tests for your driver |
129 | | -``` |
130 | | - |
131 | | -#### Driver Best Practices |
132 | | - |
133 | | -- Follow the existing code style and conventions |
134 | | -- Write comprehensive documentation |
135 | | -- Include thorough test coverage |
136 | | -- Create example configurations for common use cases |
137 | | -- Keep dependencies minimal and well-justified |
138 | | - |
139 | | -### Documentation Contributions |
140 | | - |
141 | | -We welcome improvements to our documentation. |
142 | | - |
143 | | -#### Documentation System Overview |
| 55 | +For private drivers, consider forking our [jumpstarter-driver-template](https://github.com/jumpstarter-dev/jumpstarter-driver-template). |
144 | 56 |
|
145 | | -Jumpstarter uses [Sphinx](https://www.sphinx-doc.org/en/master/) with Markdown support for its documentation. The documentation is organized into various sections covering different aspects of the project. |
| 57 | +Test your driver: `make pkg-test-${package_name}` |
146 | 58 |
|
147 | | -#### Setting Up Documentation Environment |
| 59 | +### Contributing Documentation |
148 | 60 |
|
149 | | -To contribute to the documentation, you'll need to set up your development environment: |
150 | | - |
151 | | -1. Clone the Jumpstarter repository |
152 | | -2. Navigate to the docs directory |
153 | | -3. Install dependencies (if not already installed with the main project) |
154 | | - |
155 | | -#### Building the Documentation Locally |
156 | | - |
157 | | -To build and preview the documentation locally: |
| 61 | +Jumpstarter uses Sphinx with Markdown. Build and preview locally: |
158 | 62 |
|
159 | 63 | ```shell |
160 | | -cd docs |
161 | | -make html # Build HTML documentation |
162 | | -make docs-serve # Serve documentation locally for preview |
163 | | -``` |
164 | | - |
165 | | -The documentation will be available at http://localhost:8000 in your web browser. |
166 | | - |
167 | | -#### Documentation Structure |
168 | | - |
169 | | -- `docs/source/`: Root directory for documentation source files |
170 | | - - `index.md`: Main landing page |
171 | | - - `*.md`: Various markdown files for documentation sections |
172 | | - - `_static/`: Static assets like images and CSS |
173 | | - - `_templates/`: Custom templates |
174 | | - |
175 | | -#### Writing Documentation |
176 | | - |
177 | | -Documentation is written in Markdown with some Sphinx-specific extensions. Common syntax includes: |
178 | | - |
179 | | -```markdown |
180 | | -# Heading 1 |
181 | | -## Heading 2 |
182 | | -### Heading 3 |
183 | | - |
184 | | -*italic text* |
185 | | -**bold text** |
186 | | - |
187 | | -- Bullet list item |
188 | | -- Another item |
189 | | - |
190 | | -1. Numbered list |
191 | | -2. Second item |
192 | | - |
193 | | -[Link text](URL) |
194 | | - |
195 | | - |
196 | | - |
197 | | -```{note} |
198 | | -This is a note admonition |
199 | | -``` |
200 | | - |
201 | | -```{warning} |
202 | | -This is a warning admonition |
| 64 | +$ make docs-serve |
203 | 65 | ``` |
204 | 66 |
|
205 | | -```python |
206 | | -# This is a code block |
207 | | -def example(): |
208 | | - print("Hello, world!") |
209 | | -``` |
210 | | -``` |
211 | | - |
212 | | -#### Documentation Style Guide |
213 | | - |
214 | | -Please follow these guidelines when writing documentation: |
215 | | - |
216 | | -1. Use clear, concise language |
217 | | -2. Write in the present tense |
218 | | -3. Use active voice when possible |
219 | | -4. Include practical examples |
220 | | -5. Break up text with headers, lists, and code blocks |
221 | | -6. Target both beginners and advanced users with appropriate sections |
222 | | -7. Provide cross-references to related documentation |
223 | | - |
224 | | -#### Adding New Documentation Pages |
225 | | - |
226 | | -To add a new documentation page: |
227 | | - |
228 | | -1. Create a new Markdown (`.md`) file in the appropriate directory |
229 | | -2. Add the page to the relevant `index.md` or `toctree` directive |
230 | | -3. Build the documentation to ensure it appears correctly |
231 | | - |
232 | | -#### Documentation Versioning |
233 | | - |
234 | | -Documentation is versioned alongside the main Jumpstarter releases. When making changes, consider whether they apply to the current version or future versions. |
235 | | - |
236 | | -#### Documentation Tips |
237 | | - |
238 | | -- **Screenshots**: Include screenshots for complex UI operations |
239 | | -- **Command Examples**: Always include example commands with expected output |
240 | | -- **Troubleshooting**: Add common issues and their solutions |
241 | | -- **Links**: Link to relevant external resources when appropriate |
242 | | - |
243 | | -#### Submitting Documentation Changes |
244 | | - |
245 | | -Once your documentation changes are complete: |
246 | | - |
247 | | -1. Build the documentation to verify there are no errors |
248 | | -2. Submit a pull request with your changes |
249 | | -3. Respond to feedback during the review process |
250 | | - |
251 | | -### Example Contributions |
252 | | - |
253 | | -To add a new example: |
| 67 | +Documentation recommended practices: |
254 | 68 |
|
255 | | -1. Create a new directory in the `examples/` folder with a descriptive name |
256 | | -2. Include a comprehensive `README.md` with setup and usage instructions |
257 | | -3. Follow the structure of existing examples |
258 | | -4. Ensure the example is well-documented and easy to follow |
| 69 | +- Use clear, concise language |
| 70 | +- Include practical examples |
| 71 | +- Break up text with headers, lists, and code blocks |
| 72 | +- Target both beginners and advanced users |
0 commit comments