Skip to content

Commit 9dcf21d

Browse files
author
il1v3y
committed
Release v1.0.0 – polished user-focused Affinity installer
0 parents  commit 9dcf21d

31 files changed

Lines changed: 3976 additions & 0 deletions
1.86 MB
Loading

.github/assets/affinity-cli.png

1.43 MB
Loading

.github/assets/release.png

1.78 MB
Loading

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install build twine
24+
25+
- name: Build package
26+
run: |
27+
python -m build
28+
29+
- name: Create Release
30+
uses: actions/create-release@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
tag_name: ${{ github.ref }}
35+
release_name: Release ${{ github.ref }}
36+
draft: false
37+
prerelease: false
38+
39+
- name: Publish to PyPI
40+
env:
41+
TWINE_USERNAME: __token__
42+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
43+
run: |
44+
twine upload dist/*

.github/workflows/tests.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, ubuntu-22.04]
16+
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install system dependencies (Ubuntu)
27+
if: runner.os == 'Linux'
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y wine winetricks
31+
32+
- name: Install Python dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -e ".[dev]"
36+
37+
- name: Lint with flake8
38+
run: |
39+
# stop the build if there are Python syntax errors or undefined names
40+
flake8 affinity_cli --count --select=E9,F63,F7,F82 --show-source --statistics
41+
# exit-zero treats all errors as warnings
42+
flake8 affinity_cli --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
43+
44+
- name: Check formatting with black
45+
run: |
46+
black --check affinity_cli/
47+
48+
- name: Run tests with pytest
49+
run: |
50+
pytest tests/ -v --cov=affinity_cli --cov-report=xml --cov-report=term
51+
52+
- name: Upload coverage to Codecov
53+
uses: codecov/codecov-action@v3
54+
with:
55+
file: ./coverage.xml
56+
flags: unittests
57+
name: codecov-umbrella
58+
fail_ci_if_error: false

.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
*.egg
7+
*.egg-info/
8+
dist/
9+
build/
10+
*.pyc
11+
12+
# Virtual environments
13+
venv/
14+
env/
15+
ENV/
16+
.venv/
17+
18+
# IDE
19+
.vscode/
20+
.idea/
21+
*.swp
22+
*.swo
23+
*~
24+
25+
# Testing
26+
.pytest_cache/
27+
.coverage
28+
htmlcov/
29+
.tox/
30+
*.cover
31+
coverage.xml
32+
33+
# OS
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Project specific
38+
*.log
39+
.cache/
40+
41+
# Development and planning files
42+
notes/
43+
drafts/
44+
# Local artifacts
45+
README.md.backup
46+
affinity-cli-v1.png
47+
affinity-installers/
48+
semver-fix.patch
49+
50+
README.md.backup

CONTRIBUTING.md

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# Affinity CLI - Personal Project Policy
2+
3+
Thank you for your interest in Affinity CLI! This document explains how the community can engage with this project.
4+
5+
## 📋 Project Status: Personal Project
6+
7+
**Affinity CLI is a personal project maintained solely by ind4skylivey.**
8+
9+
This means:
10+
-**You CAN:** Use the software freely
11+
-**You CAN:** Report bugs and issues
12+
-**You CAN:** Request features and improvements
13+
-**You CAN:** Share and promote the project
14+
-**You CANNOT:** Submit code contributions (pull requests)
15+
-**You CANNOT:** Modify or redistribute modified versions
16+
17+
## 🎯 Why This Policy?
18+
19+
This is a **personal learning and development project** where I want to:
20+
- Maintain full control over the codebase architecture
21+
- Learn and implement features myself
22+
- Keep a consistent coding style and approach
23+
- Take full responsibility for all code quality
24+
25+
## 💬 How Can I Contribute?
26+
27+
### Reporting Bugs
28+
29+
Before creating bug reports, please check existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
30+
31+
- **Use a clear and descriptive title**
32+
- **Describe the exact steps to reproduce the problem**
33+
- **Provide specific examples** (commands you ran, output you got)
34+
- **Describe the behavior you observed and what you expected**
35+
- **Include system information** (run `affinity-cli report --output report.json`)
36+
- **Include screenshots** if relevant
37+
38+
### Suggesting Enhancements
39+
40+
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
41+
42+
- **Use a clear and descriptive title**
43+
- **Provide a detailed description** of the proposed enhancement
44+
- **Explain why this enhancement would be useful**
45+
- **List some examples** of how it would be used
46+
47+
### Code Contributions
48+
49+
**Please note:** This project does not accept external code contributions (pull requests).
50+
51+
If you have coding suggestions or improvements, please:
52+
1. Open a detailed issue describing your idea
53+
2. Explain the problem it solves
54+
3. Provide examples or pseudocode if helpful
55+
4. I will review and may implement it myself
56+
57+
## Testing Locally (For Your Own Use)
58+
59+
If you want to test the software or experiment with it locally:
60+
61+
```bash
62+
# Clone the repository
63+
git clone https://github.com/ind4skylivey/affinity-cli.git
64+
cd affinity-cli
65+
66+
# Create virtual environment
67+
python3 -m venv venv
68+
source venv/bin/activate
69+
70+
# Install in development mode
71+
pip install -e .
72+
73+
# Run and test
74+
affinity-cli --help
75+
```
76+
77+
**Note:** Any modifications you make are for your personal use only and cannot be distributed.
78+
79+
## Coding Standards
80+
81+
### Python Style
82+
83+
- Follow **PEP 8** guidelines
84+
- Use **type hints** for function parameters and returns
85+
- Write **docstrings** for all classes and functions (Google style)
86+
- Keep lines under **100 characters** where reasonable
87+
- Use **meaningful variable names**
88+
89+
### Example
90+
91+
```python
92+
def install_dependency(package_name: str, version: Optional[str] = None) -> Tuple[bool, str]:
93+
"""
94+
Install a system dependency.
95+
96+
Args:
97+
package_name: Name of the package to install
98+
version: Specific version to install (optional)
99+
100+
Returns:
101+
Tuple of (success, message)
102+
"""
103+
# Implementation
104+
pass
105+
```
106+
107+
### Code Organization
108+
109+
- **Core functionality** goes in `affinity_cli/core/`
110+
- **CLI commands** go in `affinity_cli/commands/`
111+
- **Utilities** go in `affinity_cli/utils/`
112+
- **Tests** go in `tests/` with `test_` prefix
113+
114+
### Commit Messages
115+
116+
- Use present tense ("Add feature" not "Added feature")
117+
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
118+
- First line is a summary (50 chars or less)
119+
- Reference issues and PRs when relevant
120+
121+
**Examples:**
122+
```
123+
Add support for Ubuntu 24.04
124+
Fix Wine detection on Fedora 40
125+
Update dependency manager for better error handling
126+
```
127+
128+
## Testing
129+
130+
### Running Tests
131+
132+
```bash
133+
# Run all tests
134+
pytest tests/ -v
135+
136+
# Run specific test file
137+
pytest tests/test_distro_detector.py -v
138+
139+
# Run with coverage
140+
pytest tests/ --cov=affinity_cli --cov-report=html
141+
```
142+
143+
### Writing Tests
144+
145+
- Write tests for all new functionality
146+
- Aim for **70%+ code coverage**
147+
- Use **descriptive test names**
148+
- Test both success and failure cases
149+
150+
### Test Structure
151+
152+
```python
153+
class TestFeatureName:
154+
"""Test FeatureName class"""
155+
156+
def test_specific_functionality(self):
157+
"""Test that specific functionality works correctly"""
158+
# Arrange
159+
manager = FeatureName()
160+
161+
# Act
162+
result = manager.do_something()
163+
164+
# Assert
165+
assert result is not None
166+
```
167+
168+
## Distribution Support
169+
170+
When adding support for a new Linux distribution:
171+
172+
1. Add distro to `DISTRO_MAPPING` in `distro_detector.py`
173+
2. Add dependencies to appropriate method in `dependency_manager.py`
174+
3. Test on actual distribution (VM or container)
175+
4. Update documentation (README.md and docs/)
176+
177+
## Documentation
178+
179+
- Update **README.md** for user-facing changes
180+
- Update **docstrings** for code changes
181+
- Add examples for new features
182+
- Keep documentation clear and concise
183+
184+
## Community
185+
186+
- Be patient and respectful in discussions
187+
- Help others when you can
188+
- Share your success stories
189+
- Spread the word about Affinity on Linux
190+
191+
## Recognition
192+
193+
Helpful community members will be recognized:
194+
- In the project README (for valuable feedback/testing)
195+
- In release notes (when their suggestions are implemented)
196+
- Special thanks section for significant contributions to ideas
197+
198+
## Questions?
199+
200+
Feel free to open an issue with the `question` label, or reach out through GitHub discussions.
201+
202+
---
203+
204+
**Thank you for contributing to making Linux a first-class platform for creative professionals!** 🐧🎨

0 commit comments

Comments
 (0)