scitex-template 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.
Files changed (72) hide show
  1. scitex_template-0.1.0/.github/workflows/cla.yml +28 -0
  2. scitex_template-0.1.0/.github/workflows/publish-pypi.yml +27 -0
  3. scitex_template-0.1.0/.github/workflows/scitex-quality.yml +68 -0
  4. scitex_template-0.1.0/.github/workflows/test.yml +27 -0
  5. scitex_template-0.1.0/.gitignore +20 -0
  6. scitex_template-0.1.0/CLA.md +80 -0
  7. scitex_template-0.1.0/CONTRIBUTING.md +69 -0
  8. scitex_template-0.1.0/LICENSE +661 -0
  9. scitex_template-0.1.0/PKG-INFO +141 -0
  10. scitex_template-0.1.0/README.md +111 -0
  11. scitex_template-0.1.0/pyproject.toml +59 -0
  12. scitex_template-0.1.0/src/scitex_template/README.md +154 -0
  13. scitex_template-0.1.0/src/scitex_template/__init__.py +219 -0
  14. scitex_template-0.1.0/src/scitex_template/_code/__init__.py +0 -0
  15. scitex_template-0.1.0/src/scitex_template/_code/_code_templates.py +147 -0
  16. scitex_template-0.1.0/src/scitex_template/_code/templates/__init__.py +51 -0
  17. scitex_template-0.1.0/src/scitex_template/_code/templates/audio.py +233 -0
  18. scitex_template-0.1.0/src/scitex_template/_code/templates/canvas.py +312 -0
  19. scitex_template-0.1.0/src/scitex_template/_code/templates/capture.py +268 -0
  20. scitex_template-0.1.0/src/scitex_template/_code/templates/config.py +43 -0
  21. scitex_template-0.1.0/src/scitex_template/_code/templates/diagram.py +294 -0
  22. scitex_template-0.1.0/src/scitex_template/_code/templates/io.py +107 -0
  23. scitex_template-0.1.0/src/scitex_template/_code/templates/module.py +53 -0
  24. scitex_template-0.1.0/src/scitex_template/_code/templates/plt.py +202 -0
  25. scitex_template-0.1.0/src/scitex_template/_code/templates/scholar.py +267 -0
  26. scitex_template-0.1.0/src/scitex_template/_code/templates/session.py +130 -0
  27. scitex_template-0.1.0/src/scitex_template/_code/templates/session_minimal.py +43 -0
  28. scitex_template-0.1.0/src/scitex_template/_code/templates/session_plot.py +67 -0
  29. scitex_template-0.1.0/src/scitex_template/_code/templates/session_stats.py +77 -0
  30. scitex_template-0.1.0/src/scitex_template/_code/templates/stats.py +323 -0
  31. scitex_template-0.1.0/src/scitex_template/_code/templates/writer.py +296 -0
  32. scitex_template-0.1.0/src/scitex_template/_mcp/__init__.py +3 -0
  33. scitex_template-0.1.0/src/scitex_template/_mcp/handlers.py +329 -0
  34. scitex_template-0.1.0/src/scitex_template/_mcp/tool_schemas.py +167 -0
  35. scitex_template-0.1.0/src/scitex_template/_project/__init__.py +17 -0
  36. scitex_template-0.1.0/src/scitex_template/_project/_app_templates.py +405 -0
  37. scitex_template-0.1.0/src/scitex_template/_project/_clone_project.py +257 -0
  38. scitex_template-0.1.0/src/scitex_template/_project/_clone_template.py +122 -0
  39. scitex_template-0.1.0/src/scitex_template/_project/_customize.py +160 -0
  40. scitex_template-0.1.0/src/scitex_template/_project/_directory_structure.py +64 -0
  41. scitex_template-0.1.0/src/scitex_template/_project/_generate_configs.py +262 -0
  42. scitex_template-0.1.0/src/scitex_template/_project/_generate_readme.py +136 -0
  43. scitex_template-0.1.0/src/scitex_template/_project/_scholar_writer_integration.py +162 -0
  44. scitex_template-0.1.0/src/scitex_template/_project/clone_app.py +206 -0
  45. scitex_template-0.1.0/src/scitex_template/_project/clone_module.py +236 -0
  46. scitex_template-0.1.0/src/scitex_template/_project/clone_pip_project.py +107 -0
  47. scitex_template-0.1.0/src/scitex_template/_project/clone_research.py +107 -0
  48. scitex_template-0.1.0/src/scitex_template/_project/clone_research_minimal.py +124 -0
  49. scitex_template-0.1.0/src/scitex_template/_project/clone_scitex_minimal.py +103 -0
  50. scitex_template-0.1.0/src/scitex_template/_project/clone_singularity.py +107 -0
  51. scitex_template-0.1.0/src/scitex_template/_project/clone_writer_directory.py +107 -0
  52. scitex_template-0.1.0/src/scitex_template/_skills/SKILL.md +57 -0
  53. scitex_template-0.1.0/src/scitex_template/_skills/code-templates.md +263 -0
  54. scitex_template-0.1.0/src/scitex_template/_skills/config-generators.md +196 -0
  55. scitex_template-0.1.0/src/scitex_template/_skills/git-strategies.md +81 -0
  56. scitex_template-0.1.0/src/scitex_template/_skills/project-templates.md +184 -0
  57. scitex_template-0.1.0/src/scitex_template/_skills/scholar-writer-integration.md +130 -0
  58. scitex_template-0.1.0/src/scitex_template/_utils/__init__.py +0 -0
  59. scitex_template-0.1.0/src/scitex_template/_utils/_copy.py +106 -0
  60. scitex_template-0.1.0/src/scitex_template/_utils/_customize.py +117 -0
  61. scitex_template-0.1.0/src/scitex_template/_utils/_git_strategy.py +123 -0
  62. scitex_template-0.1.0/src/scitex_template/_utils/_logging_helpers.py +123 -0
  63. scitex_template-0.1.0/src/scitex_template/_utils/_rename.py +66 -0
  64. scitex_template-0.1.0/src/scitex_template/mcp_server.py +199 -0
  65. scitex_template-0.1.0/tests/TODO.md +47 -0
  66. scitex_template-0.1.0/tests/_mcp/test_template_handlers.py +174 -0
  67. scitex_template-0.1.0/tests/_project/test__customize.py +115 -0
  68. scitex_template-0.1.0/tests/_project/test__directory_structure.py +39 -0
  69. scitex_template-0.1.0/tests/_project/test__generate_configs.py +80 -0
  70. scitex_template-0.1.0/tests/_project/test__generate_readme.py +67 -0
  71. scitex_template-0.1.0/tests/run_test.sh +33 -0
  72. scitex_template-0.1.0/tests/test_clone_template.py +510 -0
@@ -0,0 +1,28 @@
1
+ name: CLA Assistant
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_target:
7
+ types: [opened, closed, synchronize]
8
+
9
+ permissions:
10
+ actions: write
11
+ contents: write
12
+ pull-requests: write
13
+ statuses: write
14
+
15
+ jobs:
16
+ CLAssistant:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: CLA Assistant
20
+ uses: contributor-assistant/github-action@v2.6.1
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23
+ PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
24
+ with:
25
+ path-to-signatures: "signatures/cla.json"
26
+ path-to-document: "https://github.com/ywatanabe1989/scitex-scholar/blob/main/CLA.md"
27
+ branch: "cla-signatures"
28
+ allowlist: bot*,ywatanabe1989
@@ -0,0 +1,27 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org/p/scitex-template
14
+ permissions:
15
+ id-token: write
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+ - name: Install build tools
23
+ run: pip install build
24
+ - name: Build distribution
25
+ run: python -m build
26
+ - name: Publish to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,68 @@
1
+ # SciTeX ecosystem quality audit.
2
+ #
3
+ # Runs weekly (Mondays 06:00 UTC) and on every push to main/develop.
4
+ # Warn-only by default: the job surfaces violations in the Actions summary
5
+ # but does not fail the build. Flip `continue-on-error: false` on individual
6
+ # steps once your package is clean and you want the gate enforced.
7
+ #
8
+ # Rules checked:
9
+ # - audit-cli noun-verb convention for Click subcommands
10
+ # - audit-frontmatter YAML frontmatter on every _skills/*.md (FM-0..FM-6)
11
+ # - audit-docs drift between SKILL.md examples and real code
12
+ # - audit-lines per-file line-count allowlist
13
+ # - audit-scope public API covered by tests
14
+ name: SciTeX Quality
15
+
16
+ on:
17
+ push:
18
+ branches: [main, develop]
19
+ pull_request:
20
+ branches: [main, develop]
21
+ schedule:
22
+ - cron: "0 6 * * 1" # Mondays 06:00 UTC
23
+ workflow_dispatch:
24
+
25
+ jobs:
26
+ audit:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - name: Set up Python
32
+ uses: actions/setup-python@v4
33
+ with:
34
+ python-version: "3.11"
35
+
36
+ - name: Install package + scitex-dev audit extras
37
+ run: |
38
+ pip install -e . || true
39
+ pip install "scitex-dev[cli-audit] @ git+https://github.com/scitex-project/scitex-dev.git@main"
40
+
41
+ - name: Detect package name
42
+ id: pkg
43
+ run: |
44
+ pkg=$(python -c "import tomllib,sys; d=tomllib.load(open('pyproject.toml','rb')); print(d['project']['name'])")
45
+ echo "name=$pkg" >> "$GITHUB_OUTPUT"
46
+ echo "import_name=$(echo $pkg | tr - _)" >> "$GITHUB_OUTPUT"
47
+
48
+ - name: audit-cli
49
+ continue-on-error: true
50
+ run: scitex-dev quality audit-cli ${{ steps.pkg.outputs.name }} | tee -a "$GITHUB_STEP_SUMMARY"
51
+
52
+ - name: audit-frontmatter
53
+ continue-on-error: true
54
+ run: |
55
+ skills_dir="src/${{ steps.pkg.outputs.import_name }}/_skills"
56
+ [ -d "$skills_dir" ] && scitex-dev quality audit-frontmatter "$skills_dir" | tee -a "$GITHUB_STEP_SUMMARY" || echo "no _skills dir, skipping" >> "$GITHUB_STEP_SUMMARY"
57
+
58
+ - name: audit-docs
59
+ continue-on-error: true
60
+ run: scitex-dev quality audit-docs ${{ steps.pkg.outputs.name }} | tee -a "$GITHUB_STEP_SUMMARY"
61
+
62
+ - name: audit-lines
63
+ continue-on-error: true
64
+ run: scitex-dev quality audit-lines | tee -a "$GITHUB_STEP_SUMMARY"
65
+
66
+ - name: audit-scope
67
+ continue-on-error: true
68
+ run: scitex-dev quality audit-scope ${{ steps.pkg.outputs.name }} | tee -a "$GITHUB_STEP_SUMMARY"
@@ -0,0 +1,27 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ pull_request:
7
+ branches: [main, develop]
8
+ schedule:
9
+ - cron: "0 7 * * *" # nightly 07:00 UTC
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ - name: Install dependencies
25
+ run: pip install -e ".[dev]"
26
+ - name: Run tests
27
+ run: python -m pytest tests/ -v --tb=short
@@ -0,0 +1,20 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .pytest_cache/
8
+ .testmondata*
9
+ .coverage*
10
+ htmlcov/
11
+ .venv/
12
+ .env
13
+ .env.*
14
+ !.env.example
15
+ .scitex/
16
+ .claude/
17
+ .playwright-cli/
18
+ logs/
19
+ *.log
20
+ .DS_Store
@@ -0,0 +1,80 @@
1
+ # SciTeX Contributor License Agreement (CLA)
2
+
3
+ Version 1.0 — Effective 2026-03-12
4
+
5
+ ## Purpose
6
+
7
+ SciTeX is licensed under AGPL-3.0 and follows a dual-licensing model:
8
+
9
+ - **Researchers and individuals**: Free forever under AGPL-3.0.
10
+ - **Enterprises and institutions**: Commercial license available upon request.
11
+
12
+ To maintain the ability to offer dual licensing and ensure the long-term
13
+ sustainability of the project, we ask contributors to sign this CLA before
14
+ their first contribution is merged.
15
+
16
+ ## Agreement
17
+
18
+ By submitting a pull request or other contribution to any SciTeX repository,
19
+ you agree to the following terms:
20
+
21
+ ### 1. You retain copyright
22
+
23
+ You retain full copyright ownership of your contributions.
24
+
25
+ ### 2. You grant a broad license to the project
26
+
27
+ You grant Yusuke Watanabe, and any successor entity operating the SciTeX
28
+ project (the "Project Lead"), a perpetual, worldwide, non-exclusive,
29
+ royalty-free, irrevocable license to:
30
+
31
+ - Use, reproduce, modify, and distribute your contributions.
32
+ - Sublicense your contributions under alternative licenses, including
33
+ dual-licensing for institutional and commercial use, for the purpose of
34
+ sustaining the SciTeX project.
35
+
36
+ ### 3. You confirm originality
37
+
38
+ You confirm that:
39
+
40
+ - Your contributions are your original work.
41
+ - You have the legal right to grant the above license.
42
+ - Your contributions do not infringe on third-party rights.
43
+
44
+ If any portion is based on existing work, you have disclosed the source and
45
+ confirmed its license is compatible with AGPL-3.0.
46
+
47
+ ### 4. No obligation
48
+
49
+ This agreement does not create any obligation for the Project Lead to use,
50
+ merge, or maintain your contributions.
51
+
52
+ ## How to sign
53
+
54
+ When you open your first pull request, the CLA Assistant bot will ask you to
55
+ sign electronically. This is a one-time process per contributor.
56
+
57
+ Alternatively, you may sign by adding the following statement to your pull
58
+ request description:
59
+
60
+ > I have read and agree to the [SciTeX CLA](CLA.md).
61
+
62
+ ## Why a CLA?
63
+
64
+ SciTeX aims to be free for researchers forever. A CLA ensures the project can:
65
+
66
+ - Offer institutional/campus licenses to universities and companies.
67
+ - Change licenses if needed to protect the community (e.g., against
68
+ proprietary forks).
69
+ - Provide legal clarity for institutions adopting SciTeX.
70
+
71
+ Revenue from commercial licensing accrues to the Project Lead and is used to
72
+ sustain the SciTeX project.
73
+
74
+ This is the same approach used by MongoDB, Elasticsearch, and many other
75
+ successful open-source projects with dual-licensing models.
76
+
77
+ ## Questions
78
+
79
+ If you have questions about this CLA, please open an issue or contact
80
+ ywatanabe@scitex.ai.
@@ -0,0 +1,69 @@
1
+ # Contributing to SciTeX
2
+
3
+ Thank you for your interest in contributing to SciTeX. This guide covers the
4
+ process for reporting issues, suggesting features, and submitting code.
5
+
6
+ ## Contributor License Agreement
7
+
8
+ Before your first contribution can be merged, you must agree to the
9
+ [SciTeX CLA](CLA.md). This is a one-time process. The CLA ensures that:
10
+
11
+ - You retain copyright of your work.
12
+ - The project can continue to offer dual licensing (free for researchers,
13
+ commercial for enterprises).
14
+
15
+ See [CLA.md](CLA.md) for full details.
16
+
17
+ ## Reporting Issues
18
+
19
+ - Search [existing issues](https://github.com/ywatanabe1989/scitex-scholar/issues)
20
+ before opening a new one.
21
+ - Include a minimal reproducible example when reporting bugs.
22
+ - Specify your Python version, OS, and `scitex` version.
23
+
24
+ ## Development Setup
25
+
26
+ ```bash
27
+ git clone git@github.com:ywatanabe1989/scitex-scholar.git
28
+ cd scitex-scholar
29
+ pip install -e ".[dev]"
30
+ ```
31
+
32
+ ## Branch Workflow
33
+
34
+ - `main` — stable releases only. Do not push directly.
35
+ - `develop` — integration branch. PRs target here.
36
+ - Feature branches — create from `develop`, name as `feature/<description>`.
37
+
38
+ ```bash
39
+ git checkout develop
40
+ git checkout -b feature/my-change
41
+ # ... make changes ...
42
+ git push origin feature/my-change
43
+ # Open PR targeting develop
44
+ ```
45
+
46
+ ## Code Style
47
+
48
+ - Follow existing conventions in the codebase.
49
+ - Use `_` prefix for internal/private modules and functions.
50
+ - Keep files under 512 lines.
51
+ - Run tests before submitting:
52
+
53
+ ```bash
54
+ pytest tests/ -x -q
55
+ ```
56
+
57
+ ## Pull Request Process
58
+
59
+ 1. Ensure your branch is up to date with `develop`.
60
+ 2. Write tests for new functionality.
61
+ 3. Run the test suite and confirm all tests pass.
62
+ 4. Open a PR targeting `develop` with a clear description.
63
+ 5. The CLA bot will check your CLA status on your first PR.
64
+
65
+ ## License
66
+
67
+ By contributing, you agree to the terms of the [CLA](CLA.md), which includes
68
+ licensing under AGPL-3.0 (see [LICENSE](LICENSE)) and the dual-licensing
69
+ provisions described therein.