You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Package management (with [pip](https://pip.pypa.io/) and [pyproject.toml](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/))
13
+
- An open source license ([MIT](https://opensource.org/licenses/MIT))
11
14
12
15
## Features
13
16
14
17
### 1. Data Processing and Visualization
15
-
The main script ([starter_repo/plot_data.py](starter_repo/plot_data.py)) demonstrates:
16
-
- Reading CSV files using pandas
17
-
- Creating plots with matplotlib
18
-
- Modern Python type annotations
19
-
- Command-line argument parsing with argparse
20
18
21
-
Example usage:
19
+
The main script ([starter_repo/plot_data.py](starter_repo/plot_data.py)) can be replaced with any code that you want to write.
20
+
21
+
Installation can be done as follows:
22
+
22
23
```bash
23
24
# Install the package
24
25
pip install .
@@ -28,59 +29,44 @@ python -m starter_repo.plot_data data/sample.csv year population --title "Popula
28
29
```
29
30
30
31
### 2. Testing
31
-
The project uses pytest for testing. Test files are located in the [tests/](tests/) directory.
32
+
33
+
Writing unit tests is a good way to ensure that your code behaves as expected, and you can write unit tests before you write the code that you want to test (aka "test-driven development"). Test files are located in the [tests/](tests/) directory.
32
34
33
35
To run tests:
36
+
34
37
```bash
35
38
pip install ".[dev]"# Install development dependencies
36
39
pytest
37
40
```
38
41
39
42
### 3. Code Quality Tools
43
+
40
44
This project uses several tools to maintain code quality:
41
45
42
46
#### Pre-commit Hooks
47
+
43
48
We use [pre-commit](.pre-commit-config.yaml) with:
49
+
44
50
-[Ruff](https://github.com/charliermarsh/ruff) for linting and formatting
45
51
-[mypy](https://mypy.readthedocs.io/) for static type checking
46
52
47
53
To set up pre-commit:
54
+
48
55
```bash
49
56
pip install pre-commit
50
57
pre-commit install
51
58
```
52
59
53
60
### 4. Continuous Integration
61
+
54
62
GitHub Actions workflows are set up for:
63
+
55
64
-[Linting](.github/workflows/lint.yml): Runs Ruff and mypy
56
65
-[Testing](.github/workflows/test.yml): Runs pytest on multiple Python versions
57
66
58
-
### 5. Project Structure
59
-
```
60
-
.
61
-
|- starter_repo/ # Source code
62
-
| |- plot_data.py # Main script
63
-
|- tests/ # Test files
64
-
| |- test_plot_data.py
65
-
|- data/ # Sample data
66
-
| |- sample.csv
67
-
|- .github/workflows/ # CI configuration
68
-
|- pyproject.toml # Project metadata and dependencies
2. Install development dependencies: `pip install -e ".[dev]"`
86
72
3. Install pre-commit hooks: `pre-commit install`
@@ -94,11 +80,9 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
94
80
95
81
> **Note**: Without a license, the code is under exclusive copyright by default. This means no one can copy, distribute, or modify your work without facing potential legal consequences. Adding a license (like MIT) explicitly grants these permissions, making it clear how others can use your code.
0 commit comments