diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index fa3cbe4..57d8ba6 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -17,8 +17,7 @@ jobs: python-version: "3.10" - name: Install dependencies - run: | - python -m pip install ".[docs]" + run: python -m pip install ".[docs]" - name: Build docs run: make doc diff --git a/Makefile b/Makefile index 03642e3..ba34edd 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ doc: # Generate Sphinx HTML documentation, including API docs # It has been added to _toc.yml as root cp README.md docs/README.md # We want to use the demos in the book, we convert them with jupytext and copy them to the documentation - jupytext --to=ipynb demos/demo.py --output=docs/demo.ipynb + jupytext --to=ipynb demo/demo.py --output=docs/demo.ipynb jupyter book build docs clean-pytest: # Remove output from pytest diff --git a/demos/demo.py b/demo/demo.py similarity index 100% rename from demos/demo.py rename to demo/demo.py diff --git a/pyproject.toml b/pyproject.toml index 1c7abe3..22de02d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,11 @@ requires = ["setuptools>=62.1.0", "wheel"] [tool.setuptools] -py-modules = ["mypackage"] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] + [project] name = "mypackage" diff --git a/mypackage/__init__.py b/src/mypackage/__init__.py similarity index 100% rename from mypackage/__init__.py rename to src/mypackage/__init__.py diff --git a/mypackage/functions.py b/src/mypackage/functions.py similarity index 100% rename from mypackage/functions.py rename to src/mypackage/functions.py