Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-asyncio

- name: Lint with flake8
run: |
pip install flake8
flake8 python_max_client --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 python_max_client --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: |
pytest tests/ -v

build:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: read
id-token: write # required for PyPI Trusted Publishing (OIDC)

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Build package
run: python -m build

- name: Check package
run: twine check dist/*

- name: Publish to PyPI (Trusted Publishing, OIDC)
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
25 changes: 21 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ cython_debug/
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the enitre vscode folder
# .vscode/

Expand All @@ -185,10 +185,27 @@ cython_debug/

# PyPI configuration file
.pypirc

login_token.txt
# Cursor
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
# refer to https://docs.cursor.com/context/ignore-files
.cursorignore
.cursorindexingignore
.cursorindexingignore
# Project specific files
login_token.txt
max_session.txt
*.log
.DS_Store
.vscode/
.idea/

# Local data: chat exports, sqlite state, secrets (kept on save_chats only)
chats/
*.db
bot_config.env
bot_database.db

# Documentation build
docs/_build/
site/
41 changes: 41 additions & 0 deletions ANALYZE_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Настройка анализатора чатов

## Установка зависимостей

```bash
pip install requests
```

## Настройка GigaChat API

1. Получите API ключ от GigaChat
2. Установите переменную окружения:

```bash
export GIGACHAT_API_KEY="ваш_api_ключ"
```

Или добавьте в `.bashrc` / `.zshrc`:
```bash
echo 'export GIGACHAT_API_KEY="ваш_api_ключ"' >> ~/.bashrc
source ~/.bashrc
```

## Использование

```bash
python analyze_chat.py
```

Скрипт позволит:
1. Выбрать чат из доступных
2. Выбрать дату для анализа
3. Получить краткое резюме чата от GigaChat
4. Сохранить результат в файл

## Особенности

- Автоматическая оптимизация текста для экономии токенов
- Ограничение длины текста до 8000 символов
- Структурированное резюме по темам, проблемам и решениям
- Сохранение результатов в файл
34 changes: 34 additions & 0 deletions FORK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Fork Information

**python-max-client** is a fork of the original [vkmax](https://github.com/nsdkinx/vkmax) project.

## Original Project- **Fork Repository**: https://github.com/huxuxuya/python-max-client

- **Author**: [nsdkinx](https://github.com/nsdkinx)
- **Repository**: https://github.com/nsdkinx/vkmax
- **PyPI**: https://pypi.org/project/vkmax/
- **Telegram**: https://t.me/python_max_client

## Fork Details

- **Project Name**: python-max-client
- **Fork Maintainer**: fedortimokhov

- **Purpose**: Personal development and improvements

## Changes in This Fork

This fork may contain:
- Bug fixes
- New features
- Performance improvements
- Code refactoring
- Additional documentation

## Contributing

If you want to contribute to the original project, please submit your changes to the original repository first. If you want to contribute to this fork, please create an issue or pull request in this repository.

## License

This fork maintains the same license as the original project.
23 changes: 19 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
Copyright © 2025 vkmax contributors
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright (c) 2025 huxuxuya and vkmax contributors

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 changes: 101 additions & 0 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Publishing Guide for python-max-client

## Overview
This document provides instructions for publishing the `python-max-client` library to PyPI and managing releases.

## Prerequisites
1. PyPI account with API token
2. GitHub repository access
3. Local development environment

## Publishing to PyPI

### 1. Build the package
```bash
# Install build tools
pip install build twine

# Build the package
python -m build

# Check the package
twine check dist/*
```

### 2. Upload to PyPI
```bash
# Upload to PyPI (requires API token)
twine upload dist/*

# Or upload to test PyPI first
twine upload --repository testpypi dist/*
```

### 3. Verify installation
```bash
# Install from PyPI
pip install python-max-client

# Test import
python -c "import python_max_client; print('Success!')"
```

## GitHub Releases

### 1. Create a release
1. Go to GitHub repository
2. Click "Releases" → "Create a new release"
3. Choose tag: `v1.0.0`
4. Add release notes
5. Upload distribution files from `dist/`

### 2. Automated releases
The GitHub Actions workflow will automatically:
- Run tests on multiple Python versions
- Build the package
- Upload to PyPI (if on main branch)

## Version Management

### Semantic Versioning
- `MAJOR.MINOR.PATCH`
- `1.0.0` - Initial release
- `1.1.0` - New features
- `1.1.1` - Bug fixes

### Updating version
1. Update version in `pyproject.toml`
2. Update version in `python_max_client/__init__.py`
3. Create git tag: `git tag -a v1.1.0 -m "Release v1.1.0"`
4. Push tag: `git push origin v1.1.0`

## Development Workflow

### Local development
```bash
# Install in development mode
pip install -e .

# Run tests
pytest

# Run linting
flake8 python_max_client
```

### Pre-release testing
```bash
# Install from test PyPI
pip install --index-url https://test.pypi.org/simple/ python-max-client
```

## Troubleshooting

### Common issues
1. **Package already exists**: Update version number
2. **Authentication failed**: Check PyPI API token
3. **Build fails**: Check dependencies and Python version

### Support
- GitHub Issues: https://github.com/huxuxuya/python-max-client/issues
- Email: huxuxuya@gmail.com
Loading