Skip to content

Commit 421106f

Browse files
authored
Merge pull request microsoft#680 from microsoft/copilot/fix-0de5e46c-afe2-43ab-8c38-67d5a3358ccc
[WIP] Add missing documentation
2 parents 5e7d2d1 + 50f6c21 commit 421106f

File tree

5 files changed

+1584
-6
lines changed

5 files changed

+1584
-6
lines changed

CONTRIBUTING.md

Lines changed: 344 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,338 @@
1-
# Contributing
1+
# Contributing to Data Science for Beginners
2+
3+
Thank you for your interest in contributing to the Data Science for Beginners curriculum! We welcome contributions from the community.
4+
5+
## Table of Contents
6+
7+
- [Code of Conduct](#code-of-conduct)
8+
- [How Can I Contribute?](#how-can-i-contribute)
9+
- [Getting Started](#getting-started)
10+
- [Contribution Guidelines](#contribution-guidelines)
11+
- [Pull Request Process](#pull-request-process)
12+
- [Style Guidelines](#style-guidelines)
13+
- [Contributor License Agreement](#contributor-license-agreement)
14+
15+
## Code of Conduct
16+
17+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
18+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
19+
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
20+
21+
## How Can I Contribute?
22+
23+
### Reporting Bugs
24+
25+
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
26+
27+
- **Use a clear and descriptive title**
28+
- **Describe the exact steps to reproduce the problem**
29+
- **Provide specific examples** (code snippets, screenshots)
30+
- **Describe the behavior you observed and what you expected**
31+
- **Include your environment details** (OS, Python version, browser)
32+
33+
### Suggesting Enhancements
34+
35+
Enhancement suggestions are welcome! When suggesting enhancements:
36+
37+
- **Use a clear and descriptive title**
38+
- **Provide a detailed description of the suggested enhancement**
39+
- **Explain why this enhancement would be useful**
40+
- **List any similar features in other projects, if applicable**
41+
42+
### Contributing to Documentation
43+
44+
Documentation improvements are always appreciated:
45+
46+
- **Fix typos and grammatical errors**
47+
- **Improve clarity of explanations**
48+
- **Add missing documentation**
49+
- **Update outdated information**
50+
- **Add examples or use cases**
51+
52+
### Contributing Code
53+
54+
We welcome code contributions including:
55+
56+
- **New lessons or exercises**
57+
- **Bug fixes**
58+
- **Improvements to existing notebooks**
59+
- **New datasets or examples**
60+
- **Quiz application enhancements**
61+
62+
## Getting Started
63+
64+
### Prerequisites
65+
66+
Before contributing, ensure you have:
67+
68+
1. A GitHub account
69+
2. Git installed on your system
70+
3. Python 3.7+ and Jupyter installed
71+
4. Node.js and npm (for quiz app contributions)
72+
5. Familiarity with the curriculum structure
73+
74+
See [INSTALLATION.md](INSTALLATION.md) for detailed setup instructions.
75+
76+
### Fork and Clone
77+
78+
1. **Fork the repository** on GitHub
79+
2. **Clone your fork** locally:
80+
```bash
81+
git clone https://github.com/YOUR-USERNAME/Data-Science-For-Beginners.git
82+
cd Data-Science-For-Beginners
83+
```
84+
3. **Add upstream remote**:
85+
```bash
86+
git remote add upstream https://github.com/microsoft/Data-Science-For-Beginners.git
87+
```
88+
89+
### Create a Branch
90+
91+
Create a new branch for your work:
92+
93+
```bash
94+
git checkout -b feature/your-feature-name
95+
# or
96+
git checkout -b fix/your-bug-fix
97+
```
98+
99+
Branch naming conventions:
100+
- `feature/` - New features or lessons
101+
- `fix/` - Bug fixes
102+
- `docs/` - Documentation changes
103+
- `refactor/` - Code refactoring
104+
105+
## Contribution Guidelines
106+
107+
### For Lesson Content
108+
109+
When contributing lessons or modifying existing ones:
110+
111+
1. **Follow the existing structure**:
112+
- README.md with lesson content
113+
- Jupyter notebook with exercises
114+
- Assignment (if applicable)
115+
- Link to pre and post quizzes
116+
117+
2. **Include these elements**:
118+
- Clear learning objectives
119+
- Step-by-step explanations
120+
- Code examples with comments
121+
- Exercises for practice
122+
- Links to additional resources
123+
124+
3. **Ensure accessibility**:
125+
- Use clear, simple language
126+
- Provide alt text for images
127+
- Include code comments
128+
- Consider different learning styles
129+
130+
### For Jupyter Notebooks
131+
132+
1. **Clear all outputs** before committing:
133+
```bash
134+
jupyter nbconvert --clear-output --inplace notebook.ipynb
135+
```
136+
137+
2. **Include markdown cells** with explanations
138+
139+
3. **Use consistent formatting**:
140+
```python
141+
# Import libraries at the top
142+
import pandas as pd
143+
import numpy as np
144+
import matplotlib.pyplot as plt
145+
146+
# Use meaningful variable names
147+
# Add comments for complex operations
148+
# Follow PEP 8 style guidelines
149+
```
150+
151+
4. **Test your notebook** completely before submitting
152+
153+
### For Python Code
154+
155+
Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guidelines:
156+
157+
```python
158+
# Good practices
159+
import pandas as pd
160+
161+
def calculate_mean(data):
162+
"""Calculate the mean of a dataset.
163+
164+
Args:
165+
data (list): List of numerical values
166+
167+
Returns:
168+
float: Mean of the dataset
169+
"""
170+
return sum(data) / len(data)
171+
```
172+
173+
### For Quiz App Contributions
174+
175+
When modifying the quiz application:
176+
177+
1. **Test locally**:
178+
```bash
179+
cd quiz-app
180+
npm install
181+
npm run serve
182+
```
183+
184+
2. **Run linter**:
185+
```bash
186+
npm run lint
187+
```
188+
189+
3. **Build successfully**:
190+
```bash
191+
npm run build
192+
```
193+
194+
4. **Follow Vue.js style guide** and existing patterns
195+
196+
### For Translations
197+
198+
When adding or updating translations:
199+
200+
1. Follow the structure in `translations/` folder
201+
2. Use the language code as folder name (e.g., `fr` for French)
202+
3. Maintain the same file structure as English version
203+
4. Update quiz links to include language parameter: `?loc=fr`
204+
5. Test all links and formatting
205+
206+
## Pull Request Process
207+
208+
### Before Submitting
209+
210+
1. **Update your branch** with latest changes:
211+
```bash
212+
git fetch upstream
213+
git rebase upstream/main
214+
```
215+
216+
2. **Test your changes**:
217+
- Run all modified notebooks
218+
- Test quiz app if modified
219+
- Verify all links work
220+
- Check for spelling and grammar errors
221+
222+
3. **Commit your changes**:
223+
```bash
224+
git add .
225+
git commit -m "Brief description of changes"
226+
```
227+
228+
Write clear commit messages:
229+
- Use present tense ("Add feature" not "Added feature")
230+
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
231+
- Limit first line to 72 characters
232+
- Reference issues and pull requests when relevant
233+
234+
4. **Push to your fork**:
235+
```bash
236+
git push origin feature/your-feature-name
237+
```
238+
239+
### Creating the Pull Request
240+
241+
1. Go to the [repository](https://github.com/microsoft/Data-Science-For-Beginners)
242+
2. Click "Pull requests" → "New pull request"
243+
3. Click "compare across forks"
244+
4. Select your fork and branch
245+
5. Click "Create pull request"
246+
247+
### PR Title Format
248+
249+
Use clear, descriptive titles following this format:
250+
251+
```
252+
[Component] Brief description
253+
```
254+
255+
Examples:
256+
- `[Lesson 7] Fix Python notebook import error`
257+
- `[Quiz App] Add German translation`
258+
- `[Docs] Update README with new prerequisites`
259+
- `[Fix] Correct data path in visualization lesson`
260+
261+
### PR Description
262+
263+
Include in your PR description:
264+
265+
- **What**: What changes did you make?
266+
- **Why**: Why are these changes necessary?
267+
- **How**: How did you implement the changes?
268+
- **Testing**: How did you test the changes?
269+
- **Screenshots**: Include screenshots for visual changes
270+
- **Related Issues**: Link to related issues (e.g., "Fixes #123")
271+
272+
### Review Process
273+
274+
1. **Automated checks** will run on your PR
275+
2. **Maintainers will review** your contribution
276+
3. **Address feedback** by making additional commits
277+
4. Once approved, a **maintainer will merge** your PR
278+
279+
### After Your PR is Merged
280+
281+
1. Delete your branch:
282+
```bash
283+
git branch -d feature/your-feature-name
284+
git push origin --delete feature/your-feature-name
285+
```
286+
287+
2. Update your fork:
288+
```bash
289+
git checkout main
290+
git pull upstream main
291+
git push origin main
292+
```
293+
294+
## Style Guidelines
295+
296+
### Markdown
297+
298+
- Use consistent heading levels
299+
- Include blank lines between sections
300+
- Use code blocks with language specifiers:
301+
````markdown
302+
```python
303+
import pandas as pd
304+
```
305+
````
306+
- Add alt text to images: `![Alt text](image.png)`
307+
- Keep line lengths reasonable (around 80-100 characters)
308+
309+
### Python
310+
311+
- Follow PEP 8 style guide
312+
- Use meaningful variable names
313+
- Add docstrings to functions
314+
- Include type hints where appropriate:
315+
```python
316+
def process_data(df: pd.DataFrame) -> pd.DataFrame:
317+
"""Process the input dataframe."""
318+
return df
319+
```
320+
321+
### JavaScript/Vue.js
322+
323+
- Follow Vue.js 2 style guide
324+
- Use ESLint configuration provided
325+
- Write modular, reusable components
326+
- Add comments for complex logic
327+
328+
### File Organization
329+
330+
- Keep related files together
331+
- Use descriptive file names
332+
- Follow existing directory structure
333+
- Don't commit unnecessary files (.DS_Store, .pyc, node_modules, etc.)
334+
335+
## Contributor License Agreement
2336

3337
This project welcomes contributions and suggestions. Most contributions require you to
4338
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
@@ -9,6 +343,12 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
9343
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
10344
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
11345

12-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
13-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
14-
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
346+
## Questions?
347+
348+
- Check our [Discord Channel #data-science-for-beginners](https://aka.ms/ds4beginners/discord)
349+
- Join our [Discord community](https://aka.ms/ds4beginners/discord)
350+
- Review existing [issues](https://github.com/microsoft/Data-Science-For-Beginners/issues) and [pull requests](https://github.com/microsoft/Data-Science-For-Beginners/pulls)
351+
352+
## Thank You!
353+
354+
Your contributions make this curriculum better for everyone. Thank you for taking the time to contribute!

0 commit comments

Comments
 (0)