Skip to content

Commit c1a5a7b

Browse files
authored
Merge pull request #1 from alemazzo/copilot/restructure-project-and-add-features
Restructure to UV package with modular architecture, preview, extended characters, CI/CD, and comprehensive documentation
2 parents 14cd043 + 5cafe8e commit c1a5a7b

27 files changed

Lines changed: 3795 additions & 547 deletions

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
lint-build-test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.12']
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pytest build flake8
28+
pip install -e .
29+
30+
- name: Lint with flake8
31+
run: |
32+
# Stop the build if there are Python syntax errors or undefined names
33+
flake8 github_artist --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# Treat all other errors as warnings
35+
flake8 github_artist --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
37+
- name: Build package
38+
run: |
39+
python -m build
40+
41+
- name: Run tests
42+
run: |
43+
pytest tests/ -v

.gitignore

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
1-
temp/
1+
# Python
22
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
23+
# Virtual environments
24+
venv/
25+
env/
26+
ENV/
27+
.venv
28+
29+
# UV
30+
.uv/
31+
uv.lock
32+
33+
# IDE
34+
.vscode/
35+
.idea/
36+
*.swp
37+
*.swo
38+
*~
39+
40+
# OS
41+
.DS_Store
42+
Thumbs.db
43+
44+
# Project specific
45+
temp/
46+
*.txt
47+
github-artist-config.json
48+
example-config.json

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

CONTRIBUTING.md

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
# Contributing to GitHub Artist
2+
3+
Thank you for your interest in contributing to GitHub Artist! This document provides guidelines and instructions for contributing.
4+
5+
## 🚀 Getting Started
6+
7+
### Prerequisites
8+
9+
- Python 3.12 or higher
10+
- Git
11+
- UV package manager (recommended) or pip
12+
13+
### Setting Up Development Environment
14+
15+
1. Fork and clone the repository:
16+
```bash
17+
git clone https://github.com/your-username/github-artist.git
18+
cd github-artist
19+
```
20+
21+
2. Install UV (if not already installed):
22+
```bash
23+
pip install uv
24+
```
25+
26+
3. Install the package in development mode:
27+
```bash
28+
uv pip install -e .
29+
```
30+
31+
4. Install development dependencies:
32+
```bash
33+
pip install pytest
34+
```
35+
36+
## 🧪 Running Tests
37+
38+
Run the test suite to ensure everything works:
39+
40+
```bash
41+
# Run all tests
42+
pytest tests/
43+
44+
# Run with verbose output
45+
pytest tests/ -v
46+
47+
# Run specific test file
48+
pytest tests/test_characters.py
49+
50+
# Run with coverage
51+
pytest tests/ --cov=github_artist
52+
```
53+
54+
## 📝 Code Style
55+
56+
- Follow PEP 8 style guidelines
57+
- Use type hints where appropriate
58+
- Add docstrings to functions and classes
59+
- Keep lines under 100 characters when practical
60+
- Use meaningful variable and function names
61+
62+
### Example Function Style
63+
64+
```python
65+
def calculate_something(value: int, option: str = "default") -> dict:
66+
"""
67+
Brief description of what the function does.
68+
69+
Args:
70+
value: Description of the value parameter
71+
option: Description of the option parameter (default: "default")
72+
73+
Returns:
74+
Dictionary with the results
75+
76+
Raises:
77+
ValueError: When value is negative
78+
"""
79+
if value < 0:
80+
raise ValueError("Value must be non-negative")
81+
82+
return {"result": value}
83+
```
84+
85+
## 🎨 Adding New Characters
86+
87+
To add support for new characters:
88+
89+
1. Edit `github_artist/data/characters.py`
90+
2. Add your character matrix to the `CHAR_MATRICES` dictionary
91+
3. Ensure the matrix is exactly 7 rows tall
92+
4. Each cell should be 0 (empty) or 1 (filled)
93+
94+
Example:
95+
```python
96+
"X": [
97+
[1, 0, 0, 1],
98+
[1, 0, 0, 1],
99+
[0, 1, 1, 0],
100+
[0, 1, 1, 0],
101+
[0, 1, 1, 0],
102+
[1, 0, 0, 1],
103+
[1, 0, 0, 1],
104+
],
105+
```
106+
107+
3. Test your character:
108+
```bash
109+
python -m github_artist.cli preview "X"
110+
```
111+
112+
4. Add tests in `tests/test_characters.py` if appropriate
113+
114+
## 🐛 Bug Reports
115+
116+
When reporting bugs, please include:
117+
118+
- Python version
119+
- Operating system
120+
- Steps to reproduce the bug
121+
- Expected behavior
122+
- Actual behavior
123+
- Error messages (if any)
124+
125+
Use the GitHub issue template and label the issue as "bug".
126+
127+
## 💡 Feature Requests
128+
129+
For feature requests:
130+
131+
- Check if the feature has already been requested
132+
- Clearly describe the feature and its use case
133+
- Explain why it would be valuable
134+
- Consider providing examples or mockups
135+
136+
Label the issue as "enhancement".
137+
138+
## 🔧 Pull Request Process
139+
140+
1. **Create a branch**: Use a descriptive name
141+
```bash
142+
git checkout -b feature/my-new-feature
143+
# or
144+
git checkout -b fix/bug-description
145+
```
146+
147+
2. **Make your changes**:
148+
- Write clean, documented code
149+
- Add tests for new functionality
150+
- Update documentation as needed
151+
152+
3. **Test your changes**:
153+
```bash
154+
pytest tests/
155+
```
156+
157+
4. **Commit your changes**:
158+
```bash
159+
git add .
160+
git commit -m "feat: add new feature description"
161+
# or
162+
git commit -m "fix: bug description"
163+
```
164+
165+
Use conventional commit messages:
166+
- `feat:` for new features
167+
- `fix:` for bug fixes
168+
- `docs:` for documentation changes
169+
- `test:` for adding tests
170+
- `refactor:` for code refactoring
171+
172+
5. **Push to your fork**:
173+
```bash
174+
git push origin feature/my-new-feature
175+
```
176+
177+
6. **Open a Pull Request**:
178+
- Provide a clear description of the changes
179+
- Reference any related issues
180+
- Ensure all tests pass
181+
- Wait for review
182+
183+
## 📚 Documentation
184+
185+
When adding features:
186+
187+
- Update the README.md if the feature is user-facing
188+
- Add docstrings to new functions and classes
189+
- Update examples if behavior changes
190+
- Consider adding usage examples
191+
192+
## 🎯 Areas for Contribution
193+
194+
Here are some areas where contributions are especially welcome:
195+
196+
### High Priority
197+
- [ ] Additional character designs
198+
- [ ] Improved character matrices for better visibility
199+
- [ ] More emoji support
200+
- [ ] Better error messages
201+
202+
### Medium Priority
203+
- [ ] Performance optimizations
204+
- [ ] Additional output formats
205+
- [ ] Template system for common patterns
206+
- [ ] Interactive mode improvements
207+
208+
### Low Priority
209+
- [ ] Web interface
210+
- [ ] CI/CD improvements
211+
- [ ] Additional documentation
212+
- [ ] More examples
213+
214+
## 🤝 Code of Conduct
215+
216+
### Our Standards
217+
218+
- Be respectful and inclusive
219+
- Welcome newcomers
220+
- Accept constructive criticism
221+
- Focus on what's best for the community
222+
- Show empathy towards others
223+
224+
### Unacceptable Behavior
225+
226+
- Harassment or discriminatory language
227+
- Personal attacks
228+
- Trolling or insulting comments
229+
- Publishing others' private information
230+
- Other unethical or unprofessional conduct
231+
232+
## 📞 Getting Help
233+
234+
- Open an issue for bugs or features
235+
- Join discussions in existing issues
236+
- Reach out to maintainers for questions
237+
238+
## 🏆 Recognition
239+
240+
Contributors will be:
241+
- Listed in the project's contributors
242+
- Mentioned in release notes for significant contributions
243+
- Credited in the README for major features
244+
245+
## 📄 License
246+
247+
By contributing, you agree that your contributions will be licensed under the MIT License.
248+
249+
---
250+
251+
Thank you for contributing to GitHub Artist! Your efforts help make this project better for everyone. 🎨✨

0 commit comments

Comments
 (0)