enhanced-git 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ [llm]
2
+ provider = "ollama" # "openai" | "ollama"
3
+ model = "qwen2.5-coder:3b" # I suggest using one of: qwen2.5-coder:3b, qwen2.5-coder:1.5b, codellama:7b, deepseek-coder:6.7b
4
+ max_tokens = 300
5
+ temperature = 0.1
6
+ timeout_seconds = 45
7
+
8
+ [commit]
9
+ style = "conventional" # "conventional" | "plain"
10
+ scope_detection = true
11
+ include_body = true
12
+ include_footers = true
13
+ wrap_width = 72
14
+
15
+ [changelog]
16
+ grouping = "type" # group by Conventional Commit type
17
+ heading_style = "keep-a-changelog"
18
+
19
+ [debug]
20
+ debug_mode = false
@@ -0,0 +1,45 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+ jobs:
4
+ pre-commit:
5
+ name: pre-commit
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - uses: actions/setup-python@v4
10
+ with:
11
+ python-version: '3.11'
12
+ - name: Install dependencies
13
+ run: |
14
+ python -m pip install --upgrade pip
15
+ pip install -e ".[dev]"
16
+ - name: Run pre-commit
17
+ run: pre-commit run --all-files
18
+ test:
19
+ name: test
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: actions/setup-python@v4
24
+ with:
25
+ python-version: '3.11'
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install -e ".[dev]"
30
+ - name: Run tests
31
+ run: pytest tests/ -v
32
+ mypy:
33
+ name: mypy
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+ - uses: actions/setup-python@v4
38
+ with:
39
+ python-version: '3.11'
40
+ - name: Install dependencies
41
+ run: |
42
+ python -m pip install --upgrade pip
43
+ pip install -e ".[dev]"
44
+ - name: Run type checking
45
+ run: mypy gitai
@@ -0,0 +1,30 @@
1
+ name: Release to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: '3.11'
18
+
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install build
23
+
24
+ - name: Build package
25
+ run: python -m build
26
+
27
+ - name: Publish to PyPI
28
+ uses: pypa/gh-action-pypi-publish@release/v1
29
+ with:
30
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,144 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # IDE
132
+ .vscode/
133
+ .idea/
134
+ *.swp
135
+ *.swo
136
+ *~
137
+
138
+ # OS
139
+ .DS_Store
140
+ Thumbs.db
141
+
142
+ # GitAI specific
143
+ .gitai-cache/
144
+ *.log
@@ -0,0 +1,22 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.6.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-added-large-files
9
+ - id: check-merge-conflict
10
+ - id: check-toml
11
+
12
+ - repo: https://github.com/psf/black
13
+ rev: 24.8.0
14
+ hooks:
15
+ - id: black
16
+ language_version: python3.11
17
+
18
+ - repo: https://github.com/pre-commit/mirrors-mypy
19
+ rev: v1.11.2
20
+ hooks:
21
+ - id: mypy
22
+ additional_dependencies: [types-requests]
@@ -0,0 +1,115 @@
1
+ # Contributing to Git-AI
2
+
3
+ Thank you for your interest in contributing to Git-AI! We welcome contributions from the community.
4
+
5
+ ## Development Setup
6
+
7
+ ### Prerequisites
8
+
9
+ - Python 3.11+
10
+ - [Poetry](https://python-poetry.org/) for dependency management
11
+ - Git
12
+
13
+ ### Setup
14
+
15
+ 1. Clone the repository:
16
+ ```bash
17
+ git clone https://github.com/yourusername/gitai.git
18
+ cd gitai
19
+ ```
20
+
21
+ 2. Install dependencies:
22
+ ```bash
23
+ poetry install
24
+ ```
25
+
26
+ 3. Install pre-commit hooks:
27
+ ```bash
28
+ poetry run pre-commit install
29
+ ```
30
+
31
+ 4. Run tests:
32
+ ```bash
33
+ poetry run pytest
34
+ ```
35
+
36
+ ## Development Workflow
37
+
38
+ 1. Create a feature branch from `main`:
39
+ ```bash
40
+ git checkout -b feature/your-feature-name
41
+ ```
42
+
43
+ 2. Make your changes and ensure tests pass:
44
+ ```bash
45
+ poetry run pytest
46
+ poetry run mypy gitai
47
+ poetry run black gitai tests
48
+ ```
49
+
50
+ 3. Commit your changes:
51
+ ```bash
52
+ git commit -m "feat: add your feature description"
53
+ ```
54
+
55
+ 4. Push and create a pull request
56
+
57
+ ## Code Style
58
+
59
+ We use:
60
+ - **Black** for code formatting
61
+ - **isort** for import sorting
62
+ - **mypy** for type checking
63
+ - **flake8** for linting
64
+ - **pytest** for testing
65
+
66
+ All of these run automatically via pre-commit hooks.
67
+
68
+ ## Testing
69
+
70
+ ### Running Tests
71
+
72
+ ```bash
73
+ # Run all tests
74
+ poetry run pytest
75
+
76
+ # Run with coverage
77
+ poetry run pytest --cov=gitai
78
+
79
+ # Run specific test file
80
+ poetry run pytest tests/test_commit.py
81
+ ```
82
+
83
+ ### Writing Tests
84
+
85
+ - Use descriptive test names
86
+ - Follow the existing test structure
87
+ - Include both unit and integration tests
88
+ - Mock external dependencies appropriately
89
+ - Test both success and failure scenarios
90
+
91
+ ### Test Coverage
92
+
93
+ Aim for high test coverage
94
+
95
+ ## Pull Request Process
96
+
97
+ 1. **Title**: Use conventional commit format (e.g., `feat: add new feature`)
98
+ 2. **Description**: Clearly describe what the PR does and why
99
+ 3. **Tests**: Include tests for new functionality
100
+ 4. **Documentation**: Update README/docs if needed
101
+ 5. **Breaking Changes**: Clearly mark any breaking changes
102
+
103
+ ## Issue Reporting
104
+
105
+ When reporting bugs or requesting features:
106
+
107
+ 1. Use the issue templates
108
+ 2. Provide clear reproduction steps
109
+ 3. Include your environment (OS, Python version, etc.)
110
+ 4. For bugs, include error messages and stack traces
111
+
112
+
113
+ ## License
114
+
115
+ By contributing to GitAI, you agree that your contributions will be licensed under the MIT License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 GitAI Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,54 @@
1
+ # Git-AI Development Makefile
2
+
3
+ .PHONY: help install test lint format clean build
4
+
5
+ help: ## Show this help message
6
+ @echo "Git-AI Development Commands:"
7
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'
8
+
9
+ install: ## Install the package in development mode
10
+ pip install -e ".[dev]"
11
+
12
+ test: ## Run the test suite
13
+ pytest tests/ -v
14
+
15
+ test-cov: ## Run tests with coverage
16
+ pytest tests/ --cov=gitai --cov-report=html
17
+
18
+ lint: ## Run linting
19
+ ruff check gitai tests
20
+ mypy gitai
21
+
22
+ format: ## Format code
23
+ ruff format gitai tests
24
+ ruff check gitai tests --fix
25
+
26
+ check: lint test ## Run linting and tests
27
+
28
+ clean: ## Clean up build artifacts
29
+ rm -rf build/
30
+ rm -rf dist/
31
+ rm -rf *.egg-info/
32
+ rm -rf .coverage
33
+ rm -rf htmlcov/
34
+ rm -rf .pytest_cache/
35
+ rm -rf gitai/__pycache__/
36
+ rm -rf tests/__pycache__/
37
+
38
+ build: ## Build the package
39
+ python -m build
40
+
41
+ install-build: build ## Build and install the package
42
+ pip install dist/*.whl
43
+
44
+ run: ## Run the CLI
45
+ python -m gitai.cli
46
+
47
+ help-dev: ## Show development help
48
+ @echo "Development Workflow:"
49
+ @echo "1. make install # Install in development mode"
50
+ @echo "2. make test # Run tests"
51
+ @echo "3. make lint # Check code quality"
52
+ @echo "4. make format # Format code"
53
+ @echo "5. make build # Build package"
54
+ @echo "6. make clean # Clean build artifacts"