sheaflab 0.0.1a1__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.
@@ -0,0 +1,29 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.10", "3.11", "3.12"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install package
25
+ run: python -m pip install --upgrade pip && python -m pip install -e .
26
+
27
+ - name: Run tests
28
+ run: python -m unittest discover -s tests -v
29
+
@@ -0,0 +1,29 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ id-token: write
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.11"
21
+
22
+ - name: Install build tools
23
+ run: python -m pip install --upgrade build
24
+
25
+ - name: Build distributions
26
+ run: python -m build
27
+
28
+ - name: Publish to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,7 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SheafLab
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.
22
+
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: sheaflab
3
+ Version: 0.0.1a1
4
+ Summary: Bootstrap namespace and metadata helpers for the SheafLab project.
5
+ Project-URL: Homepage, https://sheaflab.com
6
+ Project-URL: Repository, https://github.com/SheafLab/sheaflab-python
7
+ Project-URL: Issues, https://github.com/SheafLab/sheaflab-python/issues
8
+ Author: SheafLab
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: bootstrap,metadata,naming,research,utilities
12
+ Classifier: Development Status :: 2 - Pre-Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+
23
+ # sheaflab
24
+
25
+ `sheaflab` is the official Python package namespace for the SheafLab project.
26
+
27
+ This initial public release is intentionally small. It provides stable naming
28
+ helpers, a tiny metadata surface, and a CLI entry point while the broader
29
+ SheafLab codebase remains private and under active development.
30
+
31
+ ## Status
32
+
33
+ - Project stage: pre-alpha
34
+ - Package scope: bootstrap utilities only
35
+ - Main project site: https://sheaflab.com
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install sheaflab
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ```bash
46
+ sheaflab
47
+ sheaflab --version
48
+ ```
49
+
50
+ ```python
51
+ from sheaflab import artifact_name, canonical_name, dotted_path, project_info
52
+
53
+ canonical_name("Sheaf Lab")
54
+ artifact_name("SheafLab", "Core Engine", "0.1.0")
55
+ dotted_path("SheafLab", "Core Engine")
56
+ project_info()
57
+ ```
58
+
59
+ ## Notes
60
+
61
+ This package intentionally exposes only a minimal public surface at this stage.
62
+ Future releases may expand functionality and may be published from a different
63
+ official SheafLab repository.
64
+
@@ -0,0 +1,42 @@
1
+ # sheaflab
2
+
3
+ `sheaflab` is the official Python package namespace for the SheafLab project.
4
+
5
+ This initial public release is intentionally small. It provides stable naming
6
+ helpers, a tiny metadata surface, and a CLI entry point while the broader
7
+ SheafLab codebase remains private and under active development.
8
+
9
+ ## Status
10
+
11
+ - Project stage: pre-alpha
12
+ - Package scope: bootstrap utilities only
13
+ - Main project site: https://sheaflab.com
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install sheaflab
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ sheaflab
25
+ sheaflab --version
26
+ ```
27
+
28
+ ```python
29
+ from sheaflab import artifact_name, canonical_name, dotted_path, project_info
30
+
31
+ canonical_name("Sheaf Lab")
32
+ artifact_name("SheafLab", "Core Engine", "0.1.0")
33
+ dotted_path("SheafLab", "Core Engine")
34
+ project_info()
35
+ ```
36
+
37
+ ## Notes
38
+
39
+ This package intentionally exposes only a minimal public surface at this stage.
40
+ Future releases may expand functionality and may be published from a different
41
+ official SheafLab repository.
42
+
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.26"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "sheaflab"
7
+ version = "0.0.1a1"
8
+ description = "Bootstrap namespace and metadata helpers for the SheafLab project."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ license-files = ["LICENSE"]
13
+ authors = [
14
+ { name = "SheafLab" },
15
+ ]
16
+ keywords = ["bootstrap", "metadata", "naming", "research", "utilities"]
17
+ classifiers = [
18
+ "Development Status :: 2 - Pre-Alpha",
19
+ "Intended Audience :: Science/Research",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3 :: Only",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = "https://sheaflab.com"
30
+ Repository = "https://github.com/SheafLab/sheaflab-python"
31
+ Issues = "https://github.com/SheafLab/sheaflab-python/issues"
32
+
33
+ [project.scripts]
34
+ sheaflab = "sheaflab.__main__:main"
35
+
36
+ [tool.hatch.build.targets.wheel]
37
+ packages = ["src/sheaflab"]
38
+
@@ -0,0 +1,6 @@
1
+ from .info import project_info
2
+ from .naming import artifact_name, canonical_name, dotted_path
3
+
4
+ __all__ = ["artifact_name", "canonical_name", "dotted_path", "project_info"]
5
+ __version__ = "0.0.1a1"
6
+
@@ -0,0 +1,26 @@
1
+ import argparse
2
+ import json
3
+
4
+ from . import __version__
5
+ from .info import project_info
6
+
7
+
8
+ def build_parser() -> argparse.ArgumentParser:
9
+ parser = argparse.ArgumentParser(prog="sheaflab")
10
+ parser.add_argument("--version", action="store_true", help="print the package version")
11
+ return parser
12
+
13
+
14
+ def main() -> None:
15
+ args = build_parser().parse_args()
16
+ if args.version:
17
+ print(__version__)
18
+ return
19
+
20
+ payload = project_info() | {"version": __version__}
21
+ print(json.dumps(payload, indent=2, sort_keys=True))
22
+
23
+
24
+ if __name__ == "__main__":
25
+ main()
26
+
@@ -0,0 +1,8 @@
1
+ def project_info() -> dict[str, str]:
2
+ return {
3
+ "name": "sheaflab",
4
+ "stage": "bootstrap",
5
+ "homepage": "https://sheaflab.com",
6
+ "repository": "https://github.com/SheafLab/sheaflab-python",
7
+ }
8
+
@@ -0,0 +1,19 @@
1
+ import re
2
+
3
+ _NON_ALNUM_RE = re.compile(r"[^a-z0-9]+")
4
+
5
+
6
+ def canonical_name(text: str) -> str:
7
+ normalized = _NON_ALNUM_RE.sub("-", text.strip().lower())
8
+ return normalized.strip("-")
9
+
10
+
11
+ def artifact_name(project: str, component: str, version: str | None = None) -> str:
12
+ base = f"{canonical_name(project)}-{canonical_name(component)}"
13
+ return base if version is None else f"{base}-{version}"
14
+
15
+
16
+ def dotted_path(*parts: str) -> str:
17
+ cleaned = [canonical_name(part).replace("-", "_") for part in parts if part.strip()]
18
+ return ".".join(cleaned)
19
+
@@ -0,0 +1,25 @@
1
+ import unittest
2
+
3
+ from sheaflab import artifact_name, canonical_name, dotted_path, project_info
4
+
5
+
6
+ class NamingTests(unittest.TestCase):
7
+ def test_canonical_name(self) -> None:
8
+ self.assertEqual(canonical_name("Sheaf Lab"), "sheaf-lab")
9
+
10
+ def test_artifact_name(self) -> None:
11
+ self.assertEqual(
12
+ artifact_name("SheafLab", "Core Engine", "0.1.0"),
13
+ "sheaflab-core-engine-0.1.0",
14
+ )
15
+
16
+ def test_dotted_path(self) -> None:
17
+ self.assertEqual(dotted_path("SheafLab", "Core Engine"), "sheaflab.core_engine")
18
+
19
+ def test_project_info(self) -> None:
20
+ self.assertEqual(project_info()["name"], "sheaflab")
21
+
22
+
23
+ if __name__ == "__main__":
24
+ unittest.main()
25
+