slugany 0.1.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.
- slugany-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- slugany-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- slugany-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +19 -0
- slugany-0.1.0/.github/dependabot.yml +12 -0
- slugany-0.1.0/.github/workflows/ci.yml +54 -0
- slugany-0.1.0/.github/workflows/docs.yml +41 -0
- slugany-0.1.0/.github/workflows/release.yml +76 -0
- slugany-0.1.0/.gitignore +44 -0
- slugany-0.1.0/CHANGELOG.md +77 -0
- slugany-0.1.0/CODE_OF_CONDUCT.md +123 -0
- slugany-0.1.0/CONTRIBUTING.md +61 -0
- slugany-0.1.0/LICENSE +21 -0
- slugany-0.1.0/PKG-INFO +193 -0
- slugany-0.1.0/README.md +158 -0
- slugany-0.1.0/SECURITY.md +28 -0
- slugany-0.1.0/docs/api/is_slug.md +1 -0
- slugany-0.1.0/docs/api/slugconfig.md +1 -0
- slugany-0.1.0/docs/api/slugify.md +1 -0
- slugany-0.1.0/docs/api/slugify_batch.md +1 -0
- slugany-0.1.0/docs/guide/contracts.md +49 -0
- slugany-0.1.0/docs/guide/migration.md +49 -0
- slugany-0.1.0/docs/guide/performance.md +34 -0
- slugany-0.1.0/docs/index.md +45 -0
- slugany-0.1.0/docs/usage/basic.md +90 -0
- slugany-0.1.0/docs/usage/cli.md +44 -0
- slugany-0.1.0/docs/usage/languages.md +28 -0
- slugany-0.1.0/docs/usage/styles.md +30 -0
- slugany-0.1.0/mkdocs.yml +77 -0
- slugany-0.1.0/pyproject.toml +67 -0
- slugany-0.1.0/slugany/__init__.py +7 -0
- slugany-0.1.0/slugany/_config.py +157 -0
- slugany-0.1.0/slugany/_pipeline.py +52 -0
- slugany-0.1.0/slugany/_slugify.py +162 -0
- slugany-0.1.0/slugany/_steps.py +220 -0
- slugany-0.1.0/slugany/_tables.py +148 -0
- slugany-0.1.0/slugany/_validator.py +35 -0
- slugany-0.1.0/slugany/cli.py +109 -0
- slugany-0.1.0/slugany/py.typed +0 -0
- slugany-0.1.0/tests/__init__.py +0 -0
- slugany-0.1.0/tests/test_batch.py +46 -0
- slugany-0.1.0/tests/test_cache.py +38 -0
- slugany-0.1.0/tests/test_cli.py +184 -0
- slugany-0.1.0/tests/test_config.py +144 -0
- slugany-0.1.0/tests/test_contracts.py +113 -0
- slugany-0.1.0/tests/test_dropin.py +45 -0
- slugany-0.1.0/tests/test_imports.py +35 -0
- slugany-0.1.0/tests/test_pipeline.py +87 -0
- slugany-0.1.0/tests/test_punctuation.py +32 -0
- slugany-0.1.0/tests/test_slugify.py +493 -0
- slugany-0.1.0/tests/test_steps_post.py +240 -0
- slugany-0.1.0/tests/test_steps_pre.py +172 -0
- slugany-0.1.0/tests/test_transliterate.py +96 -0
- slugany-0.1.0/tests/test_validator.py +69 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report a bug or unexpected behavior
|
|
4
|
+
title: "[BUG] "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
|
|
11
|
+
A clear and concise description of the bug.
|
|
12
|
+
|
|
13
|
+
## Steps to reproduce
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from slugany import slugify
|
|
17
|
+
|
|
18
|
+
# Minimal code that reproduces the issue
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Expected behavior
|
|
22
|
+
|
|
23
|
+
What you expected to happen.
|
|
24
|
+
|
|
25
|
+
## Actual behavior
|
|
26
|
+
|
|
27
|
+
What actually happened.
|
|
28
|
+
|
|
29
|
+
## Environment
|
|
30
|
+
|
|
31
|
+
- **slugany version**:
|
|
32
|
+
- **Python version**:
|
|
33
|
+
- **OS**:
|
|
34
|
+
|
|
35
|
+
## Additional context
|
|
36
|
+
|
|
37
|
+
Any other relevant information.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest a new feature or enhancement
|
|
4
|
+
title: "[FEATURE] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Motivation
|
|
10
|
+
|
|
11
|
+
Why is this feature needed? What problem does it solve?
|
|
12
|
+
|
|
13
|
+
## Proposed solution
|
|
14
|
+
|
|
15
|
+
A clear description of what you want to happen.
|
|
16
|
+
|
|
17
|
+
## Alternatives considered
|
|
18
|
+
|
|
19
|
+
Any alternative solutions or features you've considered.
|
|
20
|
+
|
|
21
|
+
## Additional context
|
|
22
|
+
|
|
23
|
+
Any other relevant information.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Brief description of the changes.
|
|
4
|
+
|
|
5
|
+
## Type of change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Refactor (no functional changes)
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
|
|
15
|
+
- [ ] Code follows the project's style guidelines (ruff check, ruff format)
|
|
16
|
+
- [ ] Type checking passes (mypy --strict)
|
|
17
|
+
- [ ] Tests pass with 100% coverage (pytest)
|
|
18
|
+
- [ ] CHANGELOG.md updated under `[Unreleased]`
|
|
19
|
+
- [ ] Documentation updated if needed
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.13"
|
|
20
|
+
cache: pip
|
|
21
|
+
- run: pip install -e ".[dev]"
|
|
22
|
+
- run: ruff check slugany/ tests/
|
|
23
|
+
- run: ruff format --check slugany/ tests/
|
|
24
|
+
|
|
25
|
+
typecheck:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.13"
|
|
32
|
+
cache: pip
|
|
33
|
+
- run: pip install -e ".[dev]"
|
|
34
|
+
- run: mypy --strict slugany/
|
|
35
|
+
|
|
36
|
+
test:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
strategy:
|
|
39
|
+
matrix:
|
|
40
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
- uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: ${{ matrix.python-version }}
|
|
46
|
+
cache: pip
|
|
47
|
+
- run: pip install -e ".[dev]"
|
|
48
|
+
- run: pytest tests/ -v --cov=slugany --cov-report=term-missing --cov-report=xml --cov-fail-under=100
|
|
49
|
+
- name: Upload coverage
|
|
50
|
+
if: matrix.python-version == '3.13'
|
|
51
|
+
uses: codecov/codecov-action@v4
|
|
52
|
+
with:
|
|
53
|
+
file: ./coverage.xml
|
|
54
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.13"
|
|
25
|
+
cache: pip
|
|
26
|
+
- run: pip install -e ".[docs]"
|
|
27
|
+
- run: mkdocs build --strict
|
|
28
|
+
- uses: actions/upload-pages-artifact@v3
|
|
29
|
+
with:
|
|
30
|
+
path: site
|
|
31
|
+
|
|
32
|
+
deploy:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment:
|
|
36
|
+
name: github-pages
|
|
37
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
38
|
+
steps:
|
|
39
|
+
- name: Deploy to GitHub Pages
|
|
40
|
+
id: deployment
|
|
41
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.13"
|
|
20
|
+
cache: pip
|
|
21
|
+
- run: pip install build
|
|
22
|
+
- run: python -m build
|
|
23
|
+
- uses: actions/upload-artifact@v4
|
|
24
|
+
with:
|
|
25
|
+
name: dist
|
|
26
|
+
path: dist/
|
|
27
|
+
|
|
28
|
+
publish-pypi:
|
|
29
|
+
needs: build
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
environment: pypi
|
|
32
|
+
permissions:
|
|
33
|
+
id-token: write
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/download-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: dist
|
|
38
|
+
path: dist/
|
|
39
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
40
|
+
with:
|
|
41
|
+
attestations: true
|
|
42
|
+
|
|
43
|
+
github-release:
|
|
44
|
+
needs: build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
permissions:
|
|
47
|
+
contents: write
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 0
|
|
52
|
+
- name: Extract changelog
|
|
53
|
+
id: changelog
|
|
54
|
+
run: |
|
|
55
|
+
TAG="${GITHUB_REF#refs/tags/}"
|
|
56
|
+
VERSION="${TAG#v}"
|
|
57
|
+
BODY=$(awk -v ver="## [$VERSION]" '
|
|
58
|
+
$0 ~ ver {found=1; next}
|
|
59
|
+
/^## \[/ && found {exit}
|
|
60
|
+
found {print}
|
|
61
|
+
' CHANGELOG.md)
|
|
62
|
+
echo "body<<EOF" >> "$GITHUB_OUTPUT"
|
|
63
|
+
echo "$BODY" >> "$GITHUB_OUTPUT"
|
|
64
|
+
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
65
|
+
- uses: actions/download-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: dist
|
|
68
|
+
path: dist/
|
|
69
|
+
- uses: softprops/action-gh-release@v2
|
|
70
|
+
with:
|
|
71
|
+
tag_name: ${{ github.ref_name }}
|
|
72
|
+
name: ${{ github.ref_name }}
|
|
73
|
+
body: ${{ steps.changelog.outputs.body }}
|
|
74
|
+
files: dist/*
|
|
75
|
+
draft: false
|
|
76
|
+
prerelease: false
|
slugany-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Reference materials (local only)
|
|
2
|
+
ref/
|
|
3
|
+
|
|
4
|
+
# Python
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
*.so
|
|
9
|
+
*.egg-info/
|
|
10
|
+
*.egg
|
|
11
|
+
dist/
|
|
12
|
+
build/
|
|
13
|
+
.eggs/
|
|
14
|
+
|
|
15
|
+
# Virtual environments
|
|
16
|
+
.venv/
|
|
17
|
+
venv/
|
|
18
|
+
env/
|
|
19
|
+
|
|
20
|
+
# Testing
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.coverage
|
|
23
|
+
htmlcov/
|
|
24
|
+
.tox/
|
|
25
|
+
|
|
26
|
+
# Type checking
|
|
27
|
+
.mypy_cache/
|
|
28
|
+
.pyre/
|
|
29
|
+
|
|
30
|
+
# Linting
|
|
31
|
+
.ruff_cache/
|
|
32
|
+
|
|
33
|
+
# Docs build
|
|
34
|
+
site/
|
|
35
|
+
|
|
36
|
+
# IDE
|
|
37
|
+
.idea/
|
|
38
|
+
.vscode/
|
|
39
|
+
*.swp
|
|
40
|
+
*.swo
|
|
41
|
+
|
|
42
|
+
# OS
|
|
43
|
+
.DS_Store
|
|
44
|
+
Thumbs.db
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- `slugify()` and `slugify_batch()` parameters are now properly typed (no more `Any` sentinel pattern) — IDE autocompletion and type checking now work correctly for all 14 keyword arguments
|
|
13
|
+
- `slugify_batch()` now accepts explicit keyword arguments instead of `**kwargs: Any`
|
|
14
|
+
- `SlugConfig.from_kwargs()` no longer uses `type: ignore` comments — validation constants extracted to module-level `frozenset`s
|
|
15
|
+
- `_STYLE_PRESETS` and validation constants moved before `SlugConfig` class definition
|
|
16
|
+
- `is_slug()` now raises `TypeError` for non-string `separator` input
|
|
17
|
+
- CLI `_build_kwargs` return type changed from `dict[str, object]` to `dict[str, Any]` to eliminate `type: ignore` on `slugify` calls
|
|
18
|
+
- `pyproject.toml` description translated to English; license changed to SPDX expression with `license-files`
|
|
19
|
+
- README.md and docs/index.md translated from Spanish to English
|
|
20
|
+
- `mkdocs.yml` site description translated to English
|
|
21
|
+
- Development status classifier updated from Alpha to Beta
|
|
22
|
+
- Removed redundant `re.UNICODE` flag from `_UNICODE_ALNUM_RE` (default in Python 3)
|
|
23
|
+
- `_CONFIG_DEFAULTS` now computed from dataclass fields instead of hardcoded values (DRY)
|
|
24
|
+
- Fixed pipeline step count in documentation (16, not 17)
|
|
25
|
+
- Fixed benchmark numbers in performance documentation
|
|
26
|
+
- Fixed incorrect emoji_mode examples in README
|
|
27
|
+
- README expanded with advanced examples, documentation links, and contributing section
|
|
28
|
+
- `docs/index.md` rewritten as a proper landing page with feature list and navigation
|
|
29
|
+
- `CONTRIBUTING.md` updated with full dev setup (dev+docs) and Code of Conduct reference
|
|
30
|
+
- CI/CD workflows now use pip dependency caching
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- `SlugConfig` API reference page in documentation
|
|
35
|
+
- `CONTRIBUTING.md` with development setup, PR process, and code style guidelines
|
|
36
|
+
- `SECURITY.md` with vulnerability reporting policy
|
|
37
|
+
- `CODE_OF_CONDUCT.md` based on Contributor Covenant 2.1
|
|
38
|
+
- GitHub issue templates (bug report, feature request)
|
|
39
|
+
- GitHub pull request template with checklist
|
|
40
|
+
- Dependabot configuration for pip and GitHub Actions
|
|
41
|
+
- Documentation URL in `pyproject.toml` project URLs
|
|
42
|
+
- `__version__` attribute exported from package
|
|
43
|
+
|
|
44
|
+
### Removed
|
|
45
|
+
|
|
46
|
+
- `_verify.py` — redundant sanity-check script duplicated by the test suite
|
|
47
|
+
- `docs/changelog.md` — duplicate of root `CHANGELOG.md`; mkdocs now references the original
|
|
48
|
+
|
|
49
|
+
## [0.1.0] - 2026-08-18
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- `slugify()` function with keyword-only API and `TypeError` on non-string input
|
|
54
|
+
- `slugify_batch()` for batch processing of multiple texts
|
|
55
|
+
- `is_slug()` validator with `allow_unicode` support
|
|
56
|
+
- `SlugConfig` frozen dataclass with `from_kwargs()` factory and style presets
|
|
57
|
+
- Transliteration tables for es, pt, de, fr, it
|
|
58
|
+
- Smart punctuation normalization (curly quotes, em-dash, NBSP, zero-width, bullets)
|
|
59
|
+
- HTML entity decoding (`&` → `&`)
|
|
60
|
+
- Emoji stripping via regex
|
|
61
|
+
- Confusable character detection (Cyrillic → Latin)
|
|
62
|
+
- Case styles: kebab, snake, camel, pascal, dot, train, filename, url
|
|
63
|
+
- Stopwords removal
|
|
64
|
+
- Pre/post replacements (dict or iterable of tuples)
|
|
65
|
+
- `max_length` with optional `word_boundary` truncation
|
|
66
|
+
- `allow_unicode` mode to preserve non-ASCII characters
|
|
67
|
+
- `fallback` parameter for empty slug results
|
|
68
|
+
- `css_safe` mode to prefix digit-leading slugs
|
|
69
|
+
- `emoji_mode` (strip, text, keep)
|
|
70
|
+
- `html_entities` and `smart_punctuation` toggles
|
|
71
|
+
- `lru_cache` built-in (maxsize=512) with `cache_info()` and `cache_clear()`
|
|
72
|
+
- Pipeline architecture with 16 pure-function steps
|
|
73
|
+
- CLI with argparse, auto-stdin detection, and batch mode
|
|
74
|
+
- `py.typed` marker (PEP 561)
|
|
75
|
+
- CI/CD: lint (ruff), typecheck (mypy), test (3.11/3.12/3.13), release, docs
|
|
76
|
+
- MkDocs Material documentation with mkdocstrings API reference
|
|
77
|
+
- Idempotency, determinism, ASCII output, and no-double-separator contracts
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes
|
|
24
|
+
- Focusing on what is best for the overall community, not just us as individuals
|
|
25
|
+
|
|
26
|
+
Examples of unacceptable behavior include:
|
|
27
|
+
|
|
28
|
+
- The use of sexualized language or imagery, and sexual attention or advances
|
|
29
|
+
of any kind
|
|
30
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
31
|
+
- Public or private harassment
|
|
32
|
+
- Publishing others' private information, such as a physical or email address,
|
|
33
|
+
without their explicit permission
|
|
34
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
35
|
+
professional setting
|
|
36
|
+
|
|
37
|
+
## Enforcement Responsibilities
|
|
38
|
+
|
|
39
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
40
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
41
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
42
|
+
or harmful.
|
|
43
|
+
|
|
44
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
45
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
46
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
47
|
+
decisions when appropriate.
|
|
48
|
+
|
|
49
|
+
## Scope
|
|
50
|
+
|
|
51
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
52
|
+
an individual is officially representing the community in public spaces.
|
|
53
|
+
Examples of representing our community include using an official email address,
|
|
54
|
+
posting via an official social media account, or acting as an appointed
|
|
55
|
+
representative at an online or offline event.
|
|
56
|
+
|
|
57
|
+
## Enforcement
|
|
58
|
+
|
|
59
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
60
|
+
reported to the community leaders responsible for enforcement at
|
|
61
|
+
`mathias.paulenko@outlook.com`.
|
|
62
|
+
|
|
63
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
64
|
+
|
|
65
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
66
|
+
reporter of any incident.
|
|
67
|
+
|
|
68
|
+
## Enforcement Guidelines
|
|
69
|
+
|
|
70
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
71
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
72
|
+
|
|
73
|
+
### 1. Correction
|
|
74
|
+
|
|
75
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
76
|
+
unprofessional or unwelcome in the community.
|
|
77
|
+
|
|
78
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
79
|
+
clarity around the nature of the violation and an explanation of why the
|
|
80
|
+
behavior was inappropriate. A public apology may be requested.
|
|
81
|
+
|
|
82
|
+
### 2. Warning
|
|
83
|
+
|
|
84
|
+
**Community Impact**: A violation through a single incident or series of
|
|
85
|
+
actions.
|
|
86
|
+
|
|
87
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
88
|
+
interaction with the people involved, including unsolicited interaction with
|
|
89
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
90
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
91
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
92
|
+
ban.
|
|
93
|
+
|
|
94
|
+
### 3. Temporary Ban
|
|
95
|
+
|
|
96
|
+
**Community Impact**: A serious violation of community standards, including
|
|
97
|
+
sustained inappropriate behavior.
|
|
98
|
+
|
|
99
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
100
|
+
communication with the community for a specified period of time. No public or
|
|
101
|
+
private interaction with the people involved, including unsolicited
|
|
102
|
+
interaction with those enforcing the Code of Conduct, is allowed during this
|
|
103
|
+
period. Violating these terms may lead to a permanent ban.
|
|
104
|
+
|
|
105
|
+
### 4. Permanent Ban
|
|
106
|
+
|
|
107
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
108
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
109
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
110
|
+
|
|
111
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
112
|
+
community.
|
|
113
|
+
|
|
114
|
+
## Attribution
|
|
115
|
+
|
|
116
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
117
|
+
version 2.1, available at
|
|
118
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
|
119
|
+
|
|
120
|
+
[homepage]: https://www.contributor-covenant.org
|
|
121
|
+
|
|
122
|
+
Community Impact Guidelines were inspired by
|
|
123
|
+
[Mozilla's code of conduct enforcement ladder](https://www.mozilla.org/en-US/about/governance/policies/participation/).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Contributing to slugany
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to slugany! This document
|
|
4
|
+
outlines the process for contributing to the project.
|
|
5
|
+
|
|
6
|
+
## Development setup
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
git clone https://github.com/MathiasPaulenko/slugany.git
|
|
10
|
+
cd slugany
|
|
11
|
+
pip install -e ".[dev,docs]"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Running checks
|
|
15
|
+
|
|
16
|
+
Before submitting a pull request, ensure all checks pass:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
ruff check slugany/ tests/
|
|
20
|
+
ruff format --check slugany/ tests/
|
|
21
|
+
mypy --strict slugany/
|
|
22
|
+
pytest tests/
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Pull request process
|
|
26
|
+
|
|
27
|
+
1. Create a feature branch from `main`.
|
|
28
|
+
2. Make your changes with clear, descriptive commit messages.
|
|
29
|
+
3. Add or update tests to maintain 100% coverage.
|
|
30
|
+
4. Ensure all checks pass (ruff, mypy, pytest).
|
|
31
|
+
5. Update the CHANGELOG.md under the `[Unreleased]` section.
|
|
32
|
+
6. Open a pull request with a clear description of the changes.
|
|
33
|
+
|
|
34
|
+
## Code style
|
|
35
|
+
|
|
36
|
+
- Follow PEP 8, PEP 257, and PEP 484.
|
|
37
|
+
- Use `ruff` for linting and formatting.
|
|
38
|
+
- Use type hints for all public APIs.
|
|
39
|
+
- Keep functions small and focused (single responsibility).
|
|
40
|
+
- Write docstrings for all public functions, classes, and methods.
|
|
41
|
+
|
|
42
|
+
## Testing
|
|
43
|
+
|
|
44
|
+
- Maintain 100% test coverage.
|
|
45
|
+
- Write tests that are readable, deterministic, and independent.
|
|
46
|
+
- Use descriptive test method names (`test_<behavior>`).
|
|
47
|
+
- Test edge cases: empty input, None, invalid types, boundary conditions.
|
|
48
|
+
|
|
49
|
+
## Changelog
|
|
50
|
+
|
|
51
|
+
Follow the [Keep a Changelog](https://keepachangelog.com/) format.
|
|
52
|
+
Entries go under `[Unreleased]` until a release is cut.
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
By contributing, you agree that your contributions will be licensed
|
|
57
|
+
under the MIT License.
|
|
58
|
+
|
|
59
|
+
## Code of Conduct
|
|
60
|
+
|
|
61
|
+
Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
|
slugany-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mathias Paulenko
|
|
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.
|