@mseep/csv-editor 1.0.0
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.
- package/.github/ISSUE_TEMPLATE/bug_report.md +53 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +38 -0
- package/.github/workflows/deploy-docs.yml +62 -0
- package/.github/workflows/publish-github.yml +52 -0
- package/.github/workflows/publish.yml +44 -0
- package/.github/workflows/test.yml +32 -0
- package/.pre-commit-config.yaml +157 -0
- package/ALTERNATIVE_PUBLISHING.md +175 -0
- package/ARCHITECTURE.md +1011 -0
- package/CHANGELOG.md +99 -0
- package/CODE_OF_CONDUCT.md +41 -0
- package/CONTRIBUTING.md +427 -0
- package/Dockerfile +22 -0
- package/LICENSE +21 -0
- package/MCP_CONFIG.md +505 -0
- package/PUBLISHING.md +210 -0
- package/README.md +400 -0
- package/SECURITY.md +61 -0
- package/docs/README.md +41 -0
- package/docs/blog/2019-05-28-first-blog-post.md +12 -0
- package/docs/blog/2019-05-29-long-blog-post.md +44 -0
- package/docs/blog/2021-08-01-mdx-blog-post.mdx +24 -0
- package/docs/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
- package/docs/blog/2021-08-26-welcome/index.md +29 -0
- package/docs/blog/authors.yml +25 -0
- package/docs/blog/tags.yml +19 -0
- package/docs/docs/api/overview.md +183 -0
- package/docs/docs/installation.md +252 -0
- package/docs/docs/intro.md +87 -0
- package/docs/docs/tutorial-basics/_category_.json +8 -0
- package/docs/docs/tutorial-basics/congratulations.md +23 -0
- package/docs/docs/tutorial-basics/create-a-blog-post.md +34 -0
- package/docs/docs/tutorial-basics/create-a-document.md +57 -0
- package/docs/docs/tutorial-basics/create-a-page.md +43 -0
- package/docs/docs/tutorial-basics/deploy-your-site.md +31 -0
- package/docs/docs/tutorial-basics/markdown-features.mdx +152 -0
- package/docs/docs/tutorial-extras/_category_.json +7 -0
- package/docs/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
- package/docs/docs/tutorial-extras/img/localeDropdown.png +0 -0
- package/docs/docs/tutorial-extras/manage-docs-versions.md +55 -0
- package/docs/docs/tutorial-extras/translate-your-site.md +88 -0
- package/docs/docs/tutorials/quickstart.md +365 -0
- package/docs/docusaurus.config.ts +163 -0
- package/docs/package-lock.json +17493 -0
- package/docs/package.json +48 -0
- package/docs/sidebars.ts +33 -0
- package/docs/src/components/HomepageFeatures/index.tsx +71 -0
- package/docs/src/components/HomepageFeatures/styles.module.css +11 -0
- package/docs/src/css/custom.css +30 -0
- package/docs/src/pages/index.module.css +23 -0
- package/docs/src/pages/index.tsx +44 -0
- package/docs/src/pages/markdown-page.md +7 -0
- package/docs/static/.nojekyll +0 -0
- package/docs/static/img/docusaurus-social-card.jpg +0 -0
- package/docs/static/img/docusaurus.png +0 -0
- package/docs/static/img/favicon.ico +0 -0
- package/docs/static/img/logo.svg +1 -0
- package/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/docs/static/img/undraw_docusaurus_react.svg +170 -0
- package/docs/static/img/undraw_docusaurus_tree.svg +40 -0
- package/docs/tsconfig.json +8 -0
- package/examples/README.md +48 -0
- package/examples/auto_save_demo.py +206 -0
- package/examples/auto_save_overwrite.py +201 -0
- package/examples/basic_usage.py +135 -0
- package/examples/demo.py +139 -0
- package/examples/history_demo.py +317 -0
- package/examples/test_default_autosave.py +124 -0
- package/examples/update_consignee_example.py +179 -0
- package/package.json +51 -0
- package/plans/2026-04-19-fastmcp3-migration-plan.md +1045 -0
- package/pyproject.toml +331 -0
- package/requirements-dev.txt +30 -0
- package/requirements.txt +22 -0
- package/scripts/publish.py +67 -0
- package/smithery.yaml +15 -0
- package/specs/2026-04-19-fastmcp3-migration-design.md +243 -0
- package/src/csv_editor/__init__.py +8 -0
- package/src/csv_editor/models/__init__.py +39 -0
- package/src/csv_editor/models/auto_save.py +246 -0
- package/src/csv_editor/models/csv_session.py +468 -0
- package/src/csv_editor/models/data_models.py +244 -0
- package/src/csv_editor/models/history_manager.py +456 -0
- package/src/csv_editor/prompts/__init__.py +0 -0
- package/src/csv_editor/prompts/data_prompts.py +13 -0
- package/src/csv_editor/resources/__init__.py +0 -0
- package/src/csv_editor/resources/csv_resources.py +22 -0
- package/src/csv_editor/server.py +640 -0
- package/src/csv_editor/tools/__init__.py +5 -0
- package/src/csv_editor/tools/analytics.py +700 -0
- package/src/csv_editor/tools/auto_save_operations.py +235 -0
- package/src/csv_editor/tools/data_operations.py +3 -0
- package/src/csv_editor/tools/history_operations.py +315 -0
- package/src/csv_editor/tools/io_operations.py +431 -0
- package/src/csv_editor/tools/transformations.py +663 -0
- package/src/csv_editor/tools/validation.py +822 -0
- package/src/csv_editor/utils/__init__.py +0 -0
- package/src/csv_editor/utils/validators.py +205 -0
- package/tests/README.md +65 -0
- package/tests/__init__.py +7 -0
- package/tests/conftest.py +50 -0
- package/tests/test_auto_save.py +378 -0
- package/tests/test_basic.py +103 -0
- package/tests/test_integration.py +356 -0
- package/tests/test_server_boot.py +50 -0
- package/tests/test_settings.py +184 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: 'bug'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Install CSV Editor with '...'
|
|
16
|
+
2. Run command '....'
|
|
17
|
+
3. Process CSV file '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Error message**
|
|
24
|
+
```
|
|
25
|
+
Paste the full error message here
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**CSV file sample**
|
|
29
|
+
If possible, provide a minimal CSV file that reproduces the issue:
|
|
30
|
+
```csv
|
|
31
|
+
header1,header2,header3
|
|
32
|
+
value1,value2,value3
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Environment:**
|
|
36
|
+
- OS: [e.g. Ubuntu 22.04, macOS 13, Windows 11]
|
|
37
|
+
- Python version: [e.g. 3.11.0]
|
|
38
|
+
- CSV Editor version: [e.g. 1.0.1]
|
|
39
|
+
- Installation method: [e.g. pip install git+https://github.com/santoshray02/csv-editor.git]
|
|
40
|
+
|
|
41
|
+
**MCP Configuration**
|
|
42
|
+
If using with an AI assistant, please share your MCP configuration:
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"csv-editor": {
|
|
46
|
+
"command": "csv-editor",
|
|
47
|
+
"args": []
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Additional context**
|
|
53
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: 'enhancement'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Use case**
|
|
20
|
+
Describe the specific use case for this feature:
|
|
21
|
+
- What type of CSV operations would this enable?
|
|
22
|
+
- How would this integrate with AI assistants?
|
|
23
|
+
- What data analysis workflows would this support?
|
|
24
|
+
|
|
25
|
+
**Example**
|
|
26
|
+
If possible, provide an example of how this feature would work:
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
# Example usage
|
|
30
|
+
csv_editor.new_feature(
|
|
31
|
+
input_file="data.csv",
|
|
32
|
+
operation="your_feature",
|
|
33
|
+
parameters={"param1": "value1"}
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context, screenshots, or examples about the feature request here.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Deploy Docs to GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'docs/**'
|
|
9
|
+
- '.github/workflows/deploy-docs.yml'
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pages: write
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: "pages"
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Setup Node.js
|
|
29
|
+
uses: actions/setup-node@v4
|
|
30
|
+
with:
|
|
31
|
+
node-version: '20'
|
|
32
|
+
cache: 'npm'
|
|
33
|
+
cache-dependency-path: docs/package-lock.json
|
|
34
|
+
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
run: |
|
|
37
|
+
cd docs
|
|
38
|
+
npm ci
|
|
39
|
+
|
|
40
|
+
- name: Build website
|
|
41
|
+
run: |
|
|
42
|
+
cd docs
|
|
43
|
+
npm run build
|
|
44
|
+
|
|
45
|
+
- name: Setup Pages
|
|
46
|
+
uses: actions/configure-pages@v4
|
|
47
|
+
|
|
48
|
+
- name: Upload artifact
|
|
49
|
+
uses: actions/upload-pages-artifact@v3
|
|
50
|
+
with:
|
|
51
|
+
path: docs/build
|
|
52
|
+
|
|
53
|
+
deploy:
|
|
54
|
+
environment:
|
|
55
|
+
name: github-pages
|
|
56
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
needs: build
|
|
59
|
+
steps:
|
|
60
|
+
- name: Deploy to GitHub Pages
|
|
61
|
+
id: deployment
|
|
62
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Publish to GitHub Packages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch: # Allow manual triggering
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish-github:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
packages: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v4
|
|
20
|
+
with:
|
|
21
|
+
version: "latest"
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
run: uv python install 3.11
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: uv sync --dev
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: uv build
|
|
31
|
+
|
|
32
|
+
- name: Check package
|
|
33
|
+
run: uv run twine check dist/*
|
|
34
|
+
|
|
35
|
+
- name: Publish to GitHub Packages
|
|
36
|
+
env:
|
|
37
|
+
TWINE_USERNAME: __token__
|
|
38
|
+
TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
39
|
+
run: |
|
|
40
|
+
# Configure for GitHub Packages
|
|
41
|
+
echo "Publishing to GitHub Packages..."
|
|
42
|
+
uv run twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
|
|
43
|
+
|
|
44
|
+
- name: Create GitHub Release Assets
|
|
45
|
+
uses: softprops/action-gh-release@v1
|
|
46
|
+
if: github.event_name == 'release'
|
|
47
|
+
with:
|
|
48
|
+
files: |
|
|
49
|
+
dist/*.whl
|
|
50
|
+
dist/*.tar.gz
|
|
51
|
+
env:
|
|
52
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch: # Allow manual triggering
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write # Required for trusted publishing
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v4
|
|
20
|
+
with:
|
|
21
|
+
version: "latest"
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
run: uv python install 3.11
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: uv sync --dev
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: uv build
|
|
31
|
+
|
|
32
|
+
- name: Check package
|
|
33
|
+
run: uv run twine check dist/*
|
|
34
|
+
|
|
35
|
+
- name: Publish to Test PyPI
|
|
36
|
+
if: github.event_name == 'workflow_dispatch'
|
|
37
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
38
|
+
with:
|
|
39
|
+
repository-url: https://test.pypi.org/legacy/
|
|
40
|
+
skip-existing: true
|
|
41
|
+
|
|
42
|
+
- name: Publish to PyPI
|
|
43
|
+
if: github.event_name == 'release'
|
|
44
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pytest:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
25
|
+
with:
|
|
26
|
+
enable-cache: true
|
|
27
|
+
|
|
28
|
+
- name: Sync dependencies
|
|
29
|
+
run: uv sync --all-extras
|
|
30
|
+
|
|
31
|
+
- name: Run pytest
|
|
32
|
+
run: uv run pytest tests/ -v --tb=short
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Pre-commit hooks for code quality and consistency
|
|
2
|
+
# Install: pip install pre-commit && pre-commit install
|
|
3
|
+
# Run manually: pre-commit run --all-files
|
|
4
|
+
# Update hooks: pre-commit autoupdate
|
|
5
|
+
|
|
6
|
+
default_language_version:
|
|
7
|
+
python: python3.11
|
|
8
|
+
|
|
9
|
+
repos:
|
|
10
|
+
# General file checks
|
|
11
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
12
|
+
rev: v5.0.0
|
|
13
|
+
hooks:
|
|
14
|
+
- id: check-added-large-files
|
|
15
|
+
args: ['--maxkb=1000']
|
|
16
|
+
- id: check-ast
|
|
17
|
+
- id: check-builtin-literals
|
|
18
|
+
- id: check-case-conflict
|
|
19
|
+
- id: check-docstring-first
|
|
20
|
+
- id: check-executables-have-shebangs
|
|
21
|
+
- id: check-json
|
|
22
|
+
- id: check-merge-conflict
|
|
23
|
+
- id: check-symlinks
|
|
24
|
+
- id: check-toml
|
|
25
|
+
- id: check-vcs-permalinks
|
|
26
|
+
- id: check-xml
|
|
27
|
+
- id: check-yaml
|
|
28
|
+
args: ['--unsafe']
|
|
29
|
+
- id: debug-statements
|
|
30
|
+
- id: detect-private-key
|
|
31
|
+
- id: end-of-file-fixer
|
|
32
|
+
- id: fix-byte-order-marker
|
|
33
|
+
- id: fix-encoding-pragma
|
|
34
|
+
args: ['--remove']
|
|
35
|
+
- id: mixed-line-ending
|
|
36
|
+
args: ['--fix=lf']
|
|
37
|
+
- id: name-tests-test
|
|
38
|
+
args: ['--pytest-test-first']
|
|
39
|
+
- id: trailing-whitespace
|
|
40
|
+
|
|
41
|
+
# Python code formatting with Black
|
|
42
|
+
- repo: https://github.com/psf/black
|
|
43
|
+
rev: 24.10.0
|
|
44
|
+
hooks:
|
|
45
|
+
- id: black
|
|
46
|
+
language_version: python3.11
|
|
47
|
+
args: ['--config', 'pyproject.toml']
|
|
48
|
+
|
|
49
|
+
# Python linting with Ruff (fast!)
|
|
50
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
51
|
+
rev: v0.7.4
|
|
52
|
+
hooks:
|
|
53
|
+
- id: ruff
|
|
54
|
+
args: ['--fix', '--exit-non-zero-on-fix']
|
|
55
|
+
- id: ruff-format
|
|
56
|
+
|
|
57
|
+
# Type checking with MyPy
|
|
58
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
59
|
+
rev: v1.13.0
|
|
60
|
+
hooks:
|
|
61
|
+
- id: mypy
|
|
62
|
+
additional_dependencies:
|
|
63
|
+
- pandas-stubs>=2.2.3
|
|
64
|
+
- types-aiofiles>=24.1.0
|
|
65
|
+
- types-tabulate>=0.9.0
|
|
66
|
+
- types-pytz>=2024.2
|
|
67
|
+
args: ['--config-file', 'pyproject.toml']
|
|
68
|
+
pass_filenames: false
|
|
69
|
+
args: ['src/']
|
|
70
|
+
|
|
71
|
+
# Security checks with Bandit
|
|
72
|
+
- repo: https://github.com/PyCQA/bandit
|
|
73
|
+
rev: 1.7.10
|
|
74
|
+
hooks:
|
|
75
|
+
- id: bandit
|
|
76
|
+
args: ['-r', 'src/', '-ll', '-x', 'tests/']
|
|
77
|
+
|
|
78
|
+
# Markdown formatting
|
|
79
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
80
|
+
rev: v0.43.0
|
|
81
|
+
hooks:
|
|
82
|
+
- id: markdownlint
|
|
83
|
+
args: ['--fix']
|
|
84
|
+
|
|
85
|
+
# YAML formatting
|
|
86
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
87
|
+
rev: v4.0.0-alpha.8
|
|
88
|
+
hooks:
|
|
89
|
+
- id: prettier
|
|
90
|
+
types_or: [yaml, json]
|
|
91
|
+
exclude: ^(.*\.min\.(js|css)|package-lock\.json)$
|
|
92
|
+
|
|
93
|
+
# Check for outdated Python syntax
|
|
94
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
95
|
+
rev: v3.19.0
|
|
96
|
+
hooks:
|
|
97
|
+
- id: pyupgrade
|
|
98
|
+
args: ['--py38-plus']
|
|
99
|
+
|
|
100
|
+
# Remove unused imports
|
|
101
|
+
- repo: https://github.com/PyCQA/autoflake
|
|
102
|
+
rev: v2.3.1
|
|
103
|
+
hooks:
|
|
104
|
+
- id: autoflake
|
|
105
|
+
args:
|
|
106
|
+
- --in-place
|
|
107
|
+
- --remove-all-unused-imports
|
|
108
|
+
- --remove-unused-variables
|
|
109
|
+
- --remove-duplicate-keys
|
|
110
|
+
- --ignore-init-module-imports
|
|
111
|
+
|
|
112
|
+
# Sort imports
|
|
113
|
+
- repo: https://github.com/PyCQA/isort
|
|
114
|
+
rev: 5.13.2
|
|
115
|
+
hooks:
|
|
116
|
+
- id: isort
|
|
117
|
+
args: ['--profile', 'black', '--line-length', '100']
|
|
118
|
+
|
|
119
|
+
# Docstring formatting
|
|
120
|
+
- repo: https://github.com/PyCQA/docformatter
|
|
121
|
+
rev: v1.7.5
|
|
122
|
+
hooks:
|
|
123
|
+
- id: docformatter
|
|
124
|
+
args:
|
|
125
|
+
- --in-place
|
|
126
|
+
- --wrap-summaries=100
|
|
127
|
+
- --wrap-descriptions=100
|
|
128
|
+
|
|
129
|
+
# Check for common security issues
|
|
130
|
+
- repo: https://github.com/Yelp/detect-secrets
|
|
131
|
+
rev: v1.5.0
|
|
132
|
+
hooks:
|
|
133
|
+
- id: detect-secrets
|
|
134
|
+
args: ['--baseline', '.secrets.baseline']
|
|
135
|
+
|
|
136
|
+
# License headers
|
|
137
|
+
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
|
138
|
+
rev: v1.5.5
|
|
139
|
+
hooks:
|
|
140
|
+
- id: insert-license
|
|
141
|
+
files: \.py$
|
|
142
|
+
args:
|
|
143
|
+
- --license-filepath
|
|
144
|
+
- LICENSE
|
|
145
|
+
- --comment-style
|
|
146
|
+
- "#"
|
|
147
|
+
exclude: ^(tests/|examples/|__pycache__/)
|
|
148
|
+
|
|
149
|
+
ci:
|
|
150
|
+
autofix_prs: true
|
|
151
|
+
autofix_commit_msg: |
|
|
152
|
+
[pre-commit.ci] auto fixes from pre-commit hooks
|
|
153
|
+
|
|
154
|
+
for more information, see https://pre-commit.ci
|
|
155
|
+
autoupdate_schedule: weekly
|
|
156
|
+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
|
|
157
|
+
skip: [mypy, bandit] # These can be slow in CI
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Alternative Publishing Strategy for CSV Editor
|
|
2
|
+
|
|
3
|
+
Since the name `csv-editor` conflicts with existing PyPI packages, we'll use alternative distribution methods while keeping our preferred name.
|
|
4
|
+
|
|
5
|
+
## 🎯 Publishing Strategy
|
|
6
|
+
|
|
7
|
+
### 1. **GitHub Releases** (Primary Distribution)
|
|
8
|
+
- **Direct downloads** of wheel and source files
|
|
9
|
+
- **Easy installation** via pip from GitHub
|
|
10
|
+
- **No naming conflicts**
|
|
11
|
+
|
|
12
|
+
**Installation**:
|
|
13
|
+
```bash
|
|
14
|
+
# Install directly from GitHub
|
|
15
|
+
pip install git+https://github.com/santoshray02/csv-editor.git
|
|
16
|
+
|
|
17
|
+
# Or using uv
|
|
18
|
+
uv pip install git+https://github.com/santoshray02/csv-editor.git
|
|
19
|
+
|
|
20
|
+
# Install specific version
|
|
21
|
+
pip install git+https://github.com/santoshray02/csv-editor.git@v1.0.1
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. **GitHub Packages** (Python Package Registry)
|
|
25
|
+
- **GitHub's package registry**
|
|
26
|
+
- **Integrated with repository**
|
|
27
|
+
- **Professional distribution**
|
|
28
|
+
|
|
29
|
+
**Setup**:
|
|
30
|
+
```bash
|
|
31
|
+
# Configure pip for GitHub Packages
|
|
32
|
+
pip config set global.extra-index-url https://pypi.pkg.github.com/santoshray02/
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3. **Conda-Forge** (Future)
|
|
36
|
+
- **Popular in data science community**
|
|
37
|
+
- **Better for scientific Python packages**
|
|
38
|
+
- **No naming conflicts typically**
|
|
39
|
+
|
|
40
|
+
### 4. **Alternative Package Indices**
|
|
41
|
+
- **fury.io** - Private package hosting
|
|
42
|
+
- **gemfury.com** - Package hosting service
|
|
43
|
+
- **devpi** - Self-hosted PyPI server
|
|
44
|
+
|
|
45
|
+
## 🚀 Current Publishing Workflow
|
|
46
|
+
|
|
47
|
+
### Manual Publishing
|
|
48
|
+
```bash
|
|
49
|
+
# Build package
|
|
50
|
+
uv build
|
|
51
|
+
|
|
52
|
+
# Publish to GitHub Releases (manual)
|
|
53
|
+
# 1. Go to https://github.com/santoshray02/csv-editor/releases
|
|
54
|
+
# 2. Create new release with tag v1.0.1
|
|
55
|
+
# 3. Upload dist/*.whl and dist/*.tar.gz files
|
|
56
|
+
|
|
57
|
+
# Or use GitHub CLI
|
|
58
|
+
gh release create v1.0.1 dist/*.whl dist/*.tar.gz --title "CSV Editor v1.0.1" --notes-file CHANGELOG.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Automated Publishing
|
|
62
|
+
- **GitHub Actions** automatically publishes on release
|
|
63
|
+
- **Creates release assets** with wheel and source files
|
|
64
|
+
- **No manual intervention needed**
|
|
65
|
+
|
|
66
|
+
## 📦 Installation Methods for Users
|
|
67
|
+
|
|
68
|
+
### Method 1: Direct from GitHub (Recommended)
|
|
69
|
+
```bash
|
|
70
|
+
pip install git+https://github.com/santoshray02/csv-editor.git
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Method 2: Download and Install
|
|
74
|
+
```bash
|
|
75
|
+
# Download from releases page
|
|
76
|
+
wget https://github.com/santoshray02/csv-editor/releases/download/v1.0.1/csv_editor-1.0.1-py3-none-any.whl
|
|
77
|
+
pip install csv_editor-1.0.1-py3-none-any.whl
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Method 3: Clone and Install
|
|
81
|
+
```bash
|
|
82
|
+
git clone https://github.com/santoshray02/csv-editor.git
|
|
83
|
+
cd csv-editor
|
|
84
|
+
pip install -e .
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 🌟 Promotion Strategy
|
|
88
|
+
|
|
89
|
+
### 1. **GitHub Community**
|
|
90
|
+
- **GitHub Topics**: Add relevant tags to repository
|
|
91
|
+
- **Awesome Lists**: Submit to awesome-python, awesome-mcp lists
|
|
92
|
+
- **GitHub Trending**: Optimize for discovery
|
|
93
|
+
|
|
94
|
+
### 2. **Documentation Sites**
|
|
95
|
+
- **Read the Docs**: Host comprehensive documentation
|
|
96
|
+
- **GitHub Pages**: Create project website
|
|
97
|
+
- **MCP Documentation**: Get listed in official MCP tools
|
|
98
|
+
|
|
99
|
+
### 3. **Community Platforms**
|
|
100
|
+
- **Reddit**: r/Python, r/MachineLearning, r/datascience
|
|
101
|
+
- **Discord/Slack**: MCP community, Python communities
|
|
102
|
+
- **Stack Overflow**: Answer questions, mention tool when relevant
|
|
103
|
+
|
|
104
|
+
### 4. **Blog Posts and Articles**
|
|
105
|
+
- **Dev.to**: Technical tutorials
|
|
106
|
+
- **Medium**: Deep-dive articles
|
|
107
|
+
- **Personal blog**: Case studies and examples
|
|
108
|
+
|
|
109
|
+
## 📈 Advantages of This Approach
|
|
110
|
+
|
|
111
|
+
### ✅ **Benefits**
|
|
112
|
+
- **Keep preferred name** (`csv-editor`)
|
|
113
|
+
- **No naming conflicts**
|
|
114
|
+
- **Direct GitHub integration**
|
|
115
|
+
- **Professional appearance**
|
|
116
|
+
- **Easy version management**
|
|
117
|
+
- **Automatic CI/CD**
|
|
118
|
+
|
|
119
|
+
### ✅ **User Benefits**
|
|
120
|
+
- **Simple installation** from GitHub
|
|
121
|
+
- **Always latest version** available
|
|
122
|
+
- **Clear release notes**
|
|
123
|
+
- **Direct access to source**
|
|
124
|
+
- **Issue tracking integration**
|
|
125
|
+
|
|
126
|
+
## 🔄 Future Migration to PyPI
|
|
127
|
+
|
|
128
|
+
If we want to publish to PyPI later:
|
|
129
|
+
|
|
130
|
+
### Option 1: **Request Name Release**
|
|
131
|
+
- Contact current `csv-editor` package owner
|
|
132
|
+
- Request name transfer if package is abandoned
|
|
133
|
+
|
|
134
|
+
### Option 2: **Alternative Names**
|
|
135
|
+
- `csv-mcp-editor`
|
|
136
|
+
- `mcp-csv-editor`
|
|
137
|
+
- `csv-editor-mcp`
|
|
138
|
+
- `fastmcp-csv`
|
|
139
|
+
|
|
140
|
+
### Option 3: **Namespace Package**
|
|
141
|
+
- `santoshray02-csv-editor`
|
|
142
|
+
- Use personal/org namespace
|
|
143
|
+
|
|
144
|
+
## 📊 Success Metrics
|
|
145
|
+
|
|
146
|
+
### Short-term (1-3 months):
|
|
147
|
+
- [ ] 100+ GitHub stars
|
|
148
|
+
- [ ] 50+ direct installations
|
|
149
|
+
- [ ] 10+ community issues/discussions
|
|
150
|
+
- [ ] Featured in MCP documentation
|
|
151
|
+
|
|
152
|
+
### Medium-term (3-6 months):
|
|
153
|
+
- [ ] 500+ GitHub stars
|
|
154
|
+
- [ ] 200+ installations
|
|
155
|
+
- [ ] 5+ contributors
|
|
156
|
+
- [ ] Conda-forge package
|
|
157
|
+
- [ ] Read the Docs site
|
|
158
|
+
|
|
159
|
+
### Long-term (6+ months):
|
|
160
|
+
- [ ] 1000+ GitHub stars
|
|
161
|
+
- [ ] 1000+ installations
|
|
162
|
+
- [ ] Active community
|
|
163
|
+
- [ ] PyPI package (if name becomes available)
|
|
164
|
+
- [ ] Conference presentations
|
|
165
|
+
|
|
166
|
+
## 🎉 Getting Started
|
|
167
|
+
|
|
168
|
+
1. **Push current changes** to GitHub
|
|
169
|
+
2. **Create first release** (v1.0.1)
|
|
170
|
+
3. **Update README** with installation instructions
|
|
171
|
+
4. **Announce on social media**
|
|
172
|
+
5. **Submit to awesome lists**
|
|
173
|
+
6. **Engage with MCP community**
|
|
174
|
+
|
|
175
|
+
This approach gives you full control over your package name and distribution while building a strong community around your project!
|