OSlash 0.6.3__tar.gz → 2.0.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.
- oslash-2.0.0/.gitattributes +1 -0
- oslash-2.0.0/.github/release-please-config.json +12 -0
- oslash-2.0.0/.github/workflows/ci.yml +69 -0
- oslash-2.0.0/.github/workflows/python-publish.yml +32 -0
- oslash-2.0.0/.github/workflows/release-please.yml +42 -0
- oslash-2.0.0/.gitignore +27 -0
- oslash-2.0.0/.pre-commit-config.yaml +26 -0
- oslash-2.0.0/.release-please-manifest.json +3 -0
- oslash-2.0.0/CHANGELOG.md +51 -0
- oslash-2.0.0/CLAUDE.md +1001 -0
- oslash-2.0.0/LICENSE +20 -0
- oslash-2.0.0/PKG-INFO +172 -0
- {OSlash-0.6.3 → oslash-2.0.0}/README.md +25 -7
- oslash-2.0.0/examples/hello.py +18 -0
- oslash-2.0.0/examples/hello2.py +16 -0
- oslash-2.0.0/examples/hello3.py +16 -0
- oslash-2.0.0/examples/issue.py +8 -0
- oslash-2.0.0/notebooks/README.md +4 -0
- oslash-2.0.0/notebooks/Reader.ipynb +351 -0
- oslash-2.0.0/oslash/__init__.py +69 -0
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/cont.py +30 -26
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/do.py +47 -39
- oslash-2.0.0/oslash/either.py +200 -0
- oslash-2.0.0/oslash/identity.py +76 -0
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/ioaction.py +82 -70
- oslash-2.0.0/oslash/list.py +400 -0
- oslash-2.0.0/oslash/maybe.py +354 -0
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/monadic.py +5 -2
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/observable.py +38 -28
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/reader.py +35 -39
- oslash-2.0.0/oslash/state.py +92 -0
- oslash-2.0.0/oslash/typing/__init__.py +10 -0
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/typing/applicative.py +14 -24
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/typing/functor.py +17 -21
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/typing/monad.py +20 -36
- {OSlash-0.6.3 → oslash-2.0.0}/oslash/typing/monoid.py +14 -10
- oslash-2.0.0/oslash/util/__init__.py +8 -0
- oslash-2.0.0/oslash/util/basic.py +19 -0
- oslash-2.0.0/oslash/util/fn.py +81 -0
- oslash-2.0.0/oslash/util/numerals.py +128 -0
- oslash-2.0.0/oslash/writer.py +137 -0
- oslash-2.0.0/pyproject.toml +148 -0
- oslash-2.0.0/release-please-config.json +11 -0
- oslash-2.0.0/tests/__init__.py +0 -0
- oslash-2.0.0/tests/test_cont.py +126 -0
- oslash-2.0.0/tests/test_do.py +56 -0
- oslash-2.0.0/tests/test_either.py +66 -0
- oslash-2.0.0/tests/test_identity.py +116 -0
- oslash-2.0.0/tests/test_ioaction.py +37 -0
- oslash-2.0.0/tests/test_list.py +397 -0
- oslash-2.0.0/tests/test_maybe.py +322 -0
- oslash-2.0.0/tests/test_monad.py +16 -0
- oslash-2.0.0/tests/test_numerals.py +20 -0
- oslash-2.0.0/tests/test_observable.py +127 -0
- oslash-2.0.0/tests/test_reader.py +115 -0
- oslash-2.0.0/tests/test_state.py +71 -0
- oslash-2.0.0/tests/test_util.py +40 -0
- oslash-2.0.0/tests/test_writer.py +45 -0
- oslash-2.0.0/uv.lock +354 -0
- OSlash-0.6.3/MANIFEST.in +0 -2
- OSlash-0.6.3/OSlash.egg-info/PKG-INFO +0 -125
- OSlash-0.6.3/OSlash.egg-info/SOURCES.txt +0 -35
- OSlash-0.6.3/OSlash.egg-info/dependency_links.txt +0 -1
- OSlash-0.6.3/OSlash.egg-info/requires.txt +0 -1
- OSlash-0.6.3/OSlash.egg-info/top_level.txt +0 -1
- OSlash-0.6.3/OSlash.egg-info/zip-safe +0 -1
- OSlash-0.6.3/PKG-INFO +0 -125
- OSlash-0.6.3/oslash/__init__.py +0 -19
- OSlash-0.6.3/oslash/_version.py +0 -21
- OSlash-0.6.3/oslash/either.py +0 -145
- OSlash-0.6.3/oslash/identity.py +0 -63
- OSlash-0.6.3/oslash/list.py +0 -319
- OSlash-0.6.3/oslash/maybe.py +0 -259
- OSlash-0.6.3/oslash/state.py +0 -79
- OSlash-0.6.3/oslash/typing/__init__.py +0 -5
- OSlash-0.6.3/oslash/util/__init__.py +0 -3
- OSlash-0.6.3/oslash/util/basic.py +0 -6
- OSlash-0.6.3/oslash/util/fn.py +0 -93
- OSlash-0.6.3/oslash/util/numerals.py +0 -46
- OSlash-0.6.3/oslash/writer.py +0 -121
- OSlash-0.6.3/pyproject.toml +0 -11
- OSlash-0.6.3/setup.cfg +0 -12
- OSlash-0.6.3/setup.py +0 -43
- OSlash-0.6.3/versioneer.py +0 -1822
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oslash/_version.py export-subst
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
pre-commit:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: '3.12'
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v7
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: uv sync --all-extras
|
|
21
|
+
- uses: pre-commit/action@v3.0.1
|
|
22
|
+
|
|
23
|
+
test:
|
|
24
|
+
runs-on: ${{ matrix.os }}
|
|
25
|
+
strategy:
|
|
26
|
+
fail-fast: false
|
|
27
|
+
matrix:
|
|
28
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
29
|
+
python-version: ['3.12', '3.13', '3.14']
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
34
|
+
uses: actions/setup-python@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: ${{ matrix.python-version }}
|
|
37
|
+
|
|
38
|
+
- name: Install uv
|
|
39
|
+
uses: astral-sh/setup-uv@v7
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: uv sync --all-extras
|
|
43
|
+
|
|
44
|
+
- name: Run tests with coverage
|
|
45
|
+
run: uv run pytest --cov=oslash --cov-report=xml --cov-report=term
|
|
46
|
+
|
|
47
|
+
- name: Upload coverage to Codecov
|
|
48
|
+
uses: codecov/codecov-action@v4
|
|
49
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
50
|
+
with:
|
|
51
|
+
file: ./coverage.xml
|
|
52
|
+
fail_ci_if_error: false
|
|
53
|
+
|
|
54
|
+
type-check:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
|
|
59
|
+
- name: Install uv
|
|
60
|
+
uses: astral-sh/setup-uv@v7
|
|
61
|
+
|
|
62
|
+
- name: Set up Python
|
|
63
|
+
run: uv python install 3.12
|
|
64
|
+
|
|
65
|
+
- name: Install dependencies
|
|
66
|
+
run: uv sync --all-extras
|
|
67
|
+
|
|
68
|
+
- name: Type check with pyright
|
|
69
|
+
run: uv run pyright
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This workflow will upload a Python Package to PyPI when a release is created
|
|
2
|
+
# Uses modern pyproject.toml-based build with uv
|
|
3
|
+
|
|
4
|
+
name: Publish to PyPI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
# id-token: write # Uncomment when PyPI trusted publishing is configured
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
deploy:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v7
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
run: uv python install 3.12
|
|
26
|
+
|
|
27
|
+
- name: Build and publish to PyPI
|
|
28
|
+
env:
|
|
29
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
30
|
+
run: |
|
|
31
|
+
uv build
|
|
32
|
+
uv publish
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: googleapis/release-please-action@v4
|
|
17
|
+
id: release
|
|
18
|
+
with:
|
|
19
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
|
|
21
|
+
# Publish to PyPI when a release is created
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
28
|
+
uses: astral-sh/setup-uv@v7
|
|
29
|
+
|
|
30
|
+
- name: Set up Python
|
|
31
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
32
|
+
run: uv python install 3.12
|
|
33
|
+
|
|
34
|
+
- name: Build package
|
|
35
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
36
|
+
run: uv build
|
|
37
|
+
|
|
38
|
+
- name: Publish to PyPI
|
|
39
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
40
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
41
|
+
with:
|
|
42
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
oslash-2.0.0/.gitignore
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
__pycache__
|
|
2
|
+
dist
|
|
3
|
+
build
|
|
4
|
+
.zedstate
|
|
5
|
+
.idea
|
|
6
|
+
*.suo
|
|
7
|
+
*.egg-info
|
|
8
|
+
*.pyc
|
|
9
|
+
*.user
|
|
10
|
+
.ipynb_checkpoints
|
|
11
|
+
|
|
12
|
+
.coverage
|
|
13
|
+
.cache/
|
|
14
|
+
.mypy_cache/
|
|
15
|
+
.vscode/
|
|
16
|
+
|
|
17
|
+
coverage.xml
|
|
18
|
+
.eggs
|
|
19
|
+
|
|
20
|
+
# uv
|
|
21
|
+
.venv
|
|
22
|
+
|
|
23
|
+
# Ruff
|
|
24
|
+
.ruff_cache/
|
|
25
|
+
|
|
26
|
+
# Pyright
|
|
27
|
+
.pyright/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.14.5
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: local
|
|
10
|
+
hooks:
|
|
11
|
+
- id: pyright
|
|
12
|
+
name: pyright
|
|
13
|
+
entry: uv run pyright
|
|
14
|
+
language: system
|
|
15
|
+
types: [python]
|
|
16
|
+
pass_filenames: false
|
|
17
|
+
|
|
18
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
19
|
+
rev: v5.0.0
|
|
20
|
+
hooks:
|
|
21
|
+
- id: trailing-whitespace
|
|
22
|
+
- id: end-of-file-fixer
|
|
23
|
+
- id: check-yaml
|
|
24
|
+
- id: check-toml
|
|
25
|
+
- id: check-merge-conflict
|
|
26
|
+
- id: check-added-large-files
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.0.0](https://github.com/dbrattli/OSlash/compare/oslash-v1.0.0...oslash-v2.0.0) (2025-11-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* This release marks OSlash as stable with modern Python 3.12+ features, PEP 695 type parameters, and strict type checking. The minimum Python version is now 3.12.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* release OSlash 1.0 stable ([#39](https://github.com/dbrattli/OSlash/issues/39)) ([c48645f](https://github.com/dbrattli/OSlash/commit/c48645f52a740880dd5b035808f83e3977fbb4b7))
|
|
13
|
+
* Update the project to modern Python and tooling ([#37](https://github.com/dbrattli/OSlash/issues/37)) ([0cdc34e](https://github.com/dbrattli/OSlash/commit/0cdc34ec23c9e48dadde5da3ab8c6e0213c892e0))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* add pipe and sequencing operators to Maybe monad ([#43](https://github.com/dbrattli/OSlash/issues/43)) ([d4a8c8b](https://github.com/dbrattli/OSlash/commit/d4a8c8b7b3beffbeadceaa165594f2ed68098b2f))
|
|
19
|
+
* Fix repr for Right and Left ([dd395af](https://github.com/dbrattli/OSlash/commit/dd395afe33cc9587ccb13c642f6fed9050c513fb))
|
|
20
|
+
* Fixes for list and removing type extensions ([#42](https://github.com/dbrattli/OSlash/issues/42)) ([8aa7307](https://github.com/dbrattli/OSlash/commit/8aa7307dfde16ca8ead01edd60690c03383587e6))
|
|
21
|
+
* include LICENSE file in distribution ([8fa0229](https://github.com/dbrattli/OSlash/commit/8fa02298010ab5aacca6a9d99f1903900a1d0aed))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
|
|
26
|
+
* update README badges and add 1.0 highlights ([4d972aa](https://github.com/dbrattli/OSlash/commit/4d972aad74b4e1bb226c58a3f04504d0c239c923))
|
|
27
|
+
|
|
28
|
+
## [1.0.0](https://github.com/dbrattli/OSlash/compare/v0.6.0...v1.0.0) (2025-11-16)
|
|
29
|
+
|
|
30
|
+
### ⚠ BREAKING CHANGES
|
|
31
|
+
|
|
32
|
+
* This release marks OSlash as stable with modern Python 3.12+ features, PEP 695 type parameters, and strict type checking. The minimum Python version is now 3.12.
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* Modernized to Python 3.12+ with PEP 695 type parameters ([#37](https://github.com/dbrattli/OSlash/pull/37))
|
|
37
|
+
* Strict type checking with pyright
|
|
38
|
+
* Modern tooling (uv, ruff, pre-commit)
|
|
39
|
+
* Comprehensive CLAUDE.md development guide
|
|
40
|
+
* CI/CD workflows updated to use setup-uv@v7
|
|
41
|
+
* Test matrix expanded to Python 3.12, 3.13, and 3.14
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* Add pipe and sequencing operators to Maybe monad ([#43](https://github.com/dbrattli/OSlash/pull/43))
|
|
46
|
+
* Fixes for list and removing type extensions ([#42](https://github.com/dbrattli/OSlash/pull/42))
|
|
47
|
+
|
|
48
|
+
### Project Status
|
|
49
|
+
|
|
50
|
+
* Development Status updated to "Production/Stable"
|
|
51
|
+
* Project ready for 1.0 stable release with 740+ GitHub stars
|