diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index c30a9d8a..565b4c4c 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -12,33 +12,39 @@ jobs: - uses: cvxgrp/.github/actions/uv/marimo@v2.0.0 - sphinx: + + test: runs-on: "ubuntu-latest" steps: - name: Checkout [${{ github.repository }}] uses: actions/checkout@v4 - - uses: cvxgrp/.github/actions/uv/sphinx@v2.0.0 + - uses: cvxgrp/.github/actions/uv/coverage@v2.0.2 + with: + source-folder: 'src/cvx' + tests-folder: 'src/tests' - test: + jupyter: runs-on: "ubuntu-latest" steps: - name: Checkout [${{ github.repository }}] uses: actions/checkout@v4 - - uses: cvxgrp/.github/actions/uv/coverage@v2.0.0 + - uses: cvxgrp/.github/actions/uv/jupyter@v2.0.0 - jupyter: - runs-on: "ubuntu-latest" + pdoc: + runs-on: ubuntu-latest steps: - name: Checkout [${{ github.repository }}] uses: actions/checkout@v4 - - uses: cvxgrp/.github/actions/uv/jupyter@v2.0.0 + - uses: cvxgrp/.github/actions/uv/pdoc@v2.0.2 + with: + source-folder: 'src/cvx' book: runs-on: "ubuntu-latest" - needs: [test, sphinx, jupyter, marimo] + needs: [test, jupyter, marimo, pdoc] permissions: contents: write @@ -47,4 +53,4 @@ jobs: - name: Checkout [${{ github.repository }}] uses: actions/checkout@v4 - - uses: cvxgrp/.github/actions/book@v2.0.0 + - uses: cvxgrp/.github/actions/book@v2.0.2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90334d41..b35b19fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: - name: Checkout [${{ github.repository }}] uses: actions/checkout@v4 - - uses: cvxgrp/.github/actions/uv/test@v2.0.0 + - uses: cvxgrp/.github/actions/uv/test@v2.0.2 with: python-version: ${{ matrix.python-version }} + tests-folder: 'src/tests' diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 172483cb..dcfaa058 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,10 @@ jobs: - name: Checkout [${{ github.repository }}] uses: actions/checkout@v4 - - uses: cvxgrp/.github/actions/uv/coverage@v2.0.0 + - uses: cvxgrp/.github/actions/uv/coverage@v2.0.2 + with: + source-folder: 'src/cvx' + tests-folder: 'src/tests' - name: Coveralls GitHub Action uses: coverallsapp/github-action@v2 @@ -25,3 +28,5 @@ jobs: uses: actions/checkout@v4 - uses: cvxgrp/.github/actions/uv/deptry@v2.0.0 + with: + source-folder: 'src/cvx' diff --git a/README.md b/README.md index f9d7aaf7..118604fd 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ and encouraged. ```python import numpy as np -from cvx.bson import read_bson, write_bson +from src.cvx.bson import read_bson, write_bson -data = {"A": np.random.rand(50,50), "B": np.random.rand(50)} +data = {"A": np.random.rand(50, 50), "B": np.random.rand(50)} write_bson("test.bson", data) recovered = read_bson("test.bson") diff --git a/book/docs/api.md b/book/docs/api.md index 58673ab1..a98c68ba 100644 --- a/book/docs/api.md +++ b/book/docs/api.md @@ -1,5 +1,3 @@ # API -## Sphinx - -[API](https://www.cvxgrp.org/cvxbson/sphinx/) +[API](https://www.cvxgrp.org/cvxbson/pdoc/) diff --git a/book/docs/index.md b/book/docs/index.md index 2e92f811..16741310 100644 --- a/book/docs/index.md +++ b/book/docs/index.md @@ -33,9 +33,9 @@ and encouraged. ```python import numpy as np -from cvx.bson import read_bson, write_bson +from src.cvx.bson import read_bson, write_bson -data = {"A": np.random.rand(50,50), "B": np.random.rand(50)} +data = {"A": np.random.rand(50, 50), "B": np.random.rand(50)} write_bson("test.bson", data) recovered = read_bson("test.bson") diff --git a/experiment/demo1.py b/experiment/demo1.py index 5eb65da6..80a3907b 100644 --- a/experiment/demo1.py +++ b/experiment/demo1.py @@ -3,7 +3,7 @@ import polars as pl -from cvx.bson.dataclass import Data +from src.cvx.bson.dataclass import Data @dataclass(frozen=True) diff --git a/pyproject.toml b/pyproject.toml index 4829c28f..5f731b56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,4 +40,4 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] -packages = ["cvx"] +packages = ["src/cvx"] diff --git a/cvx/bson/__init__.py b/src/cvx/bson/__init__.py similarity index 100% rename from cvx/bson/__init__.py rename to src/cvx/bson/__init__.py diff --git a/cvx/bson/dataclass.py b/src/cvx/bson/dataclass.py similarity index 100% rename from cvx/bson/dataclass.py rename to src/cvx/bson/dataclass.py diff --git a/cvx/bson/file.py b/src/cvx/bson/file.py similarity index 100% rename from cvx/bson/file.py rename to src/cvx/bson/file.py diff --git a/cvx/bson/io.py b/src/cvx/bson/io.py similarity index 100% rename from cvx/bson/io.py rename to src/cvx/bson/io.py diff --git a/cvx/json/__init__.py b/src/cvx/json/__init__.py similarity index 100% rename from cvx/json/__init__.py rename to src/cvx/json/__init__.py diff --git a/cvx/json/file.py b/src/cvx/json/file.py similarity index 100% rename from cvx/json/file.py rename to src/cvx/json/file.py diff --git a/cvx/json/numpyencoder.py b/src/cvx/json/numpyencoder.py similarity index 100% rename from cvx/json/numpyencoder.py rename to src/cvx/json/numpyencoder.py diff --git a/tests/conftest.py b/src/tests/conftest.py similarity index 100% rename from tests/conftest.py rename to src/tests/conftest.py diff --git a/tests/resources/.gitkeep b/src/tests/resources/.gitkeep similarity index 100% rename from tests/resources/.gitkeep rename to src/tests/resources/.gitkeep diff --git a/tests/test_bson.py b/src/tests/test_bson.py similarity index 100% rename from tests/test_bson.py rename to src/tests/test_bson.py diff --git a/tests/test_dataclass.py b/src/tests/test_dataclass.py similarity index 100% rename from tests/test_dataclass.py rename to src/tests/test_dataclass.py diff --git a/tests/test_encode_decode.py b/src/tests/test_encode_decode.py similarity index 100% rename from tests/test_encode_decode.py rename to src/tests/test_encode_decode.py diff --git a/tests/test_json.py b/src/tests/test_json.py similarity index 100% rename from tests/test_json.py rename to src/tests/test_json.py diff --git a/tests/test_pandas.py b/src/tests/test_pandas.py similarity index 100% rename from tests/test_pandas.py rename to src/tests/test_pandas.py