Skip to content

Commit 8348d45

Browse files
committed
🎨 perf data-collection
1 parent 3868c82 commit 8348d45

3 files changed

Lines changed: 447 additions & 78 deletions

File tree

Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
---
2+
title: Contribution Guide
3+
description: Welcome to the DataMate project. We welcome all forms of contributions including documentation, code, testing, translation, etc.
4+
weight: 10
5+
---
6+
7+
{{% pageinfo %}}
8+
9+
DataMate is an enterprise-level open source data processing project dedicated to providing efficient data solutions for model training, AI applications, and data flywheel scenarios. We welcome all developers, document creators, and test engineers to participate through code commits, documentation optimization, issue feedback, and community support.
10+
11+
If this is your first time contributing to an open source project, we recommend reading [Open Source Contribution Newbie Guide](https://opensource.guide/how-to-contribute/) first, then proceed with this guide. All contributions must follow the [DataMate Code of Conduct]().
12+
{{% /pageinfo %}}
13+
14+
## Contribution Scope and Methods
15+
16+
DataMate open source project contributions cover the following core scenarios. You can choose your participation based on your expertise:
17+
18+
| Contribution Type | Specific Content | Suitable For |
19+
|-----------------|-----------------|---------------|
20+
| **Code Contribution** | Core feature development, bug fixes, performance optimization, new feature proposals | Backend/frontend developers, data engineers |
21+
| **Documentation Contribution** | User manual updates, API documentation improvements, tutorial writing, contribution guide optimization | Technical document creators, experienced users |
22+
| **Testing Contribution** | Write unit/integration tests, feedback test issues, participate in compatibility testing | Test engineers, QA personnel |
23+
| **Community Contribution** | Answer GitHub Issues, participate in community discussions, share use cases | All users, tech enthusiasts |
24+
| **Design Contribution** | UI/UX optimization, logo/icon design, documentation visual upgrade | UI/UX designers, visual designers |
25+
26+
Thank you for choosing to participate in the DataMate open source project! Whether it's code, documentation, or community support, every contribution helps the project grow and advances enterprise-level data processing technology. If you encounter any issues during the contribution process, feel free to seek help through community channels.
27+
28+
## Getting Started
29+
30+
### Development Environment
31+
32+
Before contributing, please set up your development environment:
33+
34+
1. **Clone Repository**
35+
36+
```bash
37+
git clone https://github.com/ModelEngine-Group/DataMate.git
38+
cd DataMate
39+
```
40+
41+
2. **Install Dependencies**
42+
43+
```bash
44+
# Backend dependencies
45+
cd backend
46+
mvn clean install
47+
48+
# Frontend dependencies
49+
cd frontend
50+
pnpm install
51+
52+
# Python dependencies
53+
cd runtime
54+
pip install -r requirements.txt
55+
```
56+
57+
3. **Start Services**
58+
59+
```bash
60+
# Start basic services
61+
make install dev=true
62+
```
63+
64+
For detailed setup instructions, see:
65+
- [Development Environment Setup](/docs/getting-started/development/) - Local development configuration
66+
- [Backend Architecture](/docs/developer-guide/backend-architecture/) - Backend architecture
67+
- [Frontend Architecture](/docs/developer-guide/frontend-architecture/) - Frontend architecture
68+
69+
## Code Contribution
70+
71+
### Code Standards
72+
73+
#### Java Code Standards
74+
75+
- **Naming Conventions**:
76+
- Class name: PascalCase `UserService`
77+
- Method name: camelCase `getUserById`
78+
- Constants: UPPER_CASE `MAX_SIZE`
79+
- Variables: camelCase `userName`
80+
81+
- **Documentation**: Add Javadoc comments for public APIs
82+
83+
```java
84+
/**
85+
* User service
86+
*
87+
* @author Your Name
88+
* @since 1.0.0
89+
*/
90+
public class UserService {
91+
/**
92+
* Get user by ID
93+
*
94+
* @param userId user ID
95+
* @return user information
96+
*/
97+
public User getUserById(Long userId) {
98+
// ...
99+
}
100+
}
101+
```
102+
103+
#### TypeScript Code Standards
104+
105+
- **Naming Conventions**:
106+
- Components: PascalCase `UserProfile`
107+
- Types/Interfaces: PascalCase `UserData`
108+
- Functions: camelCase `getUserData`
109+
- Constants: UPPER_CASE `API_BASE_URL`
110+
111+
#### Python Code Standards
112+
113+
Follow PEP 8:
114+
115+
```python
116+
def get_user(user_id: int) -> dict:
117+
"""
118+
Get user information
119+
120+
Args:
121+
user_id: User ID
122+
123+
Returns:
124+
User information dictionary
125+
"""
126+
# ...
127+
```
128+
129+
### Submitting Code
130+
131+
#### 1. Create Branch
132+
133+
```bash
134+
git checkout -b feature/your-feature-name
135+
```
136+
137+
Branch naming convention:
138+
- `feature/` - New features
139+
- `fix/` - Bug fixes
140+
- `docs/` - Documentation updates
141+
- `refactor/` - Refactoring
142+
143+
#### 2. Make Changes
144+
145+
Follow the code standards mentioned above.
146+
147+
#### 3. Write Tests
148+
149+
```bash
150+
# Backend tests
151+
mvn test
152+
153+
# Frontend tests
154+
pnpm test
155+
156+
# Python tests
157+
pytest
158+
```
159+
160+
#### 4. Commit Changes
161+
162+
```bash
163+
git add .
164+
git commit -m "feat: add new feature description"
165+
```
166+
167+
Commit message format:
168+
- `feat:` - New feature
169+
- `fix:` - Bug fix
170+
- `docs:` - Documentation changes
171+
- `style:` - Code style changes
172+
- `refactor:` - Refactoring
173+
- `test:` - Adding tests
174+
- `chore:` - Other changes
175+
176+
#### 5. Push and Create PR
177+
178+
```bash
179+
git push origin feature/your-feature-name
180+
```
181+
182+
Then create a Pull Request on GitHub.
183+
184+
## Documentation Contribution
185+
186+
### Documentation Structure
187+
188+
Documentation is located in the `/docs` directory:
189+
190+
```
191+
docs/
192+
├── getting-started/ # Quick start
193+
├── user-guide/ # User guide
194+
├── api-reference/ # API reference
195+
├── developer-guide/ # Developer guide
196+
└── appendix/ # Appendix
197+
```
198+
199+
### Writing Documentation
200+
201+
#### 1. Choose Language
202+
203+
Documents support bilingual (Chinese and English). When updating documentation, please update both language versions.
204+
205+
#### 2. Follow Format
206+
207+
Use Markdown format with Hugo front matter:
208+
209+
```markdown
210+
---
211+
title: Page Title
212+
description: Page description
213+
weight: 1
214+
---
215+
216+
Content here...
217+
```
218+
219+
#### 3. Add Examples
220+
221+
Include code examples, commands, and use cases to help users understand.
222+
223+
#### 4. Cross-Reference
224+
225+
Add links to related documentation:
226+
227+
```markdown
228+
See [Data Management](/docs/user-guide/data-management/) for details.
229+
```
230+
231+
## Testing Contribution
232+
233+
### Test Coverage
234+
235+
We aim for comprehensive test coverage:
236+
237+
- **Unit Tests**: Test individual functions and classes
238+
- **Integration Tests**: Test service interactions
239+
- **E2E Tests**: Test complete workflows
240+
241+
### Writing Tests
242+
243+
#### Backend Tests (JUnit)
244+
245+
```java
246+
@Test
247+
public void testGetDataset() {
248+
// Arrange
249+
String datasetId = "test-dataset";
250+
251+
// Act
252+
Dataset result = datasetService.getDataset(datasetId);
253+
254+
// Assert
255+
assertNotNull(result);
256+
assertEquals("test-dataset", result.getId());
257+
}
258+
```
259+
260+
#### Frontend Tests (Jest + React Testing Library)
261+
262+
```typescript
263+
test('renders data management page', () => {
264+
render(<DataManagement />);
265+
expect(screen.getByText('Data Management')).toBeInTheDocument();
266+
});
267+
```
268+
269+
### Reporting Issues
270+
271+
When finding bugs:
272+
273+
1. Search existing [GitHub Issues](https://github.com/ModelEngine-Group/DataMate/issues)
274+
2. If not found, create new issue with:
275+
- Clear title
276+
- Detailed description
277+
- Steps to reproduce
278+
- Expected vs actual behavior
279+
- Environment info
280+
281+
## Design Contribution
282+
283+
### UI/UX Guidelines
284+
285+
We use **Ant Design** as the UI component library. When contributing design changes:
286+
287+
1. Follow Ant Design principles
288+
2. Ensure consistency with existing design
289+
3. Consider accessibility
290+
4. Test on different screen sizes
291+
292+
### Design Assets
293+
294+
Design assets should be placed in:
295+
- Frontend assets: `frontend/src/assets/`
296+
- Documentation images: `content/en/docs/images/`
297+
298+
## Community Guidelines
299+
300+
### Code of Conduct
301+
302+
- Be respectful and inclusive
303+
- Welcome newcomers and help them learn
304+
- Focus on constructive feedback
305+
- Collaborate openly
306+
307+
### Communication Channels
308+
309+
- **GitHub Issues**: Bug reports and feature requests
310+
- **GitHub Discussions**: General discussions
311+
- **Pull Requests**: Code and documentation contributions
312+
313+
## Getting Help
314+
315+
If you need help:
316+
317+
1. Check existing [documentation](/docs/)
318+
2. Search [GitHub Issues](https://github.com/ModelEngine-Group/DataMate/issues)
319+
3. Start a [GitHub Discussion](https://github.com/ModelEngine-Group/DataMate/discussions)
320+
321+
## Recognition
322+
323+
Contributors will be recognized in:
324+
- **Contributors List**: In the documentation
325+
- **Release Notes**: For significant contributions
326+
- **Community Highlights**: For outstanding contributions
327+
328+
## License
329+
330+
By contributing to DataMate, you agree that your contributions will be licensed under the [MIT License](https://github.com/ModelEngine-Group/DataMate/blob/main/LICENSE).
331+
332+
---
333+
334+
Thank you for contributing to DataMate! Your contributions help make DataMate better for everyone. 🎉

0 commit comments

Comments
 (0)