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
90 changes: 90 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Virtual environments
venv/
ENV/
env/
.venv/
.env

# IDEs
.idea/
.vscode/
*.swp
*.swo
*~
.DS_Store

# Alfred workflow specific
*.alfredworkflow
workflow.log

# Claude settings
.claude/*

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Local development
.local/
tmp/
17 changes: 17 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CLAUDE.md

## Project Context
This is a Python-based Alfred workflow for WeChat integration.

## Key Commands
- Test: `poetry run test` or `poetry run tests`
- Install dependencies: `poetry install`
- Lint: Not configured yet (could add flake8, black, or ruff)
- Type check: Not configured yet (could add mypy)

## Important Notes
- This is an Alfred workflow project
- Main source code is in the `src/` directory
- Testing infrastructure uses Poetry for dependency management
- Tests are located in the `tests/` directory
- Coverage reports are generated in `htmlcov/` and `coverage.xml`
451 changes: 451 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[tool.poetry]
name = "wechat-alfred-workflow"
version = "3.0.0"
description = "An Alfred workflow for WeChat integration"
authors = ["WeChat Alfred Workflow Contributors"]
readme = "README.md"
license = "MIT"
packages = [
{ include = "src" }
]

[tool.poetry.dependencies]
python = "^3.8"
requests = "^2.31.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.3"
pytest-cov = "^4.1.0"
pytest-mock = "^3.12.0"

[tool.poetry.scripts]
test = "pytest:main"
tests = "pytest:main"

[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = """
-ra
--strict-markers
--strict-config
--cov=src
--cov-branch
--cov-report=term-missing:skip-covered
--cov-report=html:htmlcov
--cov-report=xml:coverage.xml
--cov-fail-under=0
"""
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests that should be run less frequently"
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning"
]

[tool.coverage.run]
source = ["src"]
branch = true
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/workflow/*", # Exclude the bundled workflow library from coverage
"*/site-packages/*"
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod"
]
show_missing = true
precision = 2
fail_under = 0

[tool.coverage.html]
directory = "htmlcov"

[tool.coverage.xml]
output = "coverage.xml"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Empty file added tests/__init__.py
Empty file.
Loading