diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5a4ac..3bab66e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht ### Added - Initial public release of Jump-Diffusion-Engine. -- Core simulation and stochastic stability analysis methods in `jump_diffusion_engine.py`. +- Core simulation and stochastic stability analysis methods in the `jump_diffusion_engine` package. - Automated test suite and CI workflow for Python 3.9–3.12. - Packaging metadata for setuptools-based builds. - diff --git a/LICENSE b/LICENSE index d645695..01912b4 100644 --- a/LICENSE +++ b/LICENSE @@ -182,12 +182,15 @@ boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format in question. We also recommend + that a file or class name and description of purpose be included on + the same "printed page" as the copyright notice for easier comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2026 S.M. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 556711f..3256ade 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ subject to continuous diffusion and discrete jump noise. - `f(Δ) = kΔ + gΔ²/(K²+Δ²)` — the nonlinear sink (linear + saturating) - `Δ* : Λ = f(Δ), f′(Δ*) > 0` — a stable equilibrium (basin centre) -Use `jump_diffusion_engine.py` to **analyse** stochastic systems and **steer** trajectories toward stable basins: +Use the `jump_diffusion_engine/` package to **analyse** stochastic systems and **steer** trajectories toward stable basins: | # | Action | Method | What it does | |:-|:---|:---|:---| @@ -47,7 +47,7 @@ Replace `v0.1.0` with the tag you want. All releases are listed on the ```bash git clone https://github.com/beanapologist/Jump-Diffusion-Engine.git cd Jump-Diffusion-Engine -pip install -e . +pip install -e ".[dev]" ``` **Manual dependency install** @@ -58,7 +58,7 @@ If you prefer not to install the package, install dependencies directly: pip install numpy scipy matplotlib ``` -Then add the repository root to your Python path and import: +Then add the repository root to your Python path and import from the package: ```python from jump_diffusion_engine import JumpDiffusionEngine diff --git a/jump_diffusion_engine/__init__.py b/jump_diffusion_engine/__init__.py new file mode 100644 index 0000000..200382a --- /dev/null +++ b/jump_diffusion_engine/__init__.py @@ -0,0 +1,3 @@ +from .engine import JumpDiffusionEngine + +__all__ = ["JumpDiffusionEngine"] diff --git a/jump_diffusion_engine.py b/jump_diffusion_engine/engine.py similarity index 100% rename from jump_diffusion_engine.py rename to jump_diffusion_engine/engine.py diff --git a/pyproject.toml b/pyproject.toml index 66d2c12..65d5e43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,8 +36,8 @@ Changelog = "https://github.com/beanapologist/Jump-Diffusion-Engine/blob/main/CH [project.optional-dependencies] dev = ["pytest>=7.0"] -[tool.setuptools] -py-modules = ["jump_diffusion_engine"] +[tool.setuptools.packages.find] +include = ["jump_diffusion_engine"] [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/tests/test_engine.py b/tests/test_engine.py index b1db9de..e977a8f 100644 --- a/tests/test_engine.py +++ b/tests/test_engine.py @@ -5,11 +5,6 @@ """ import numpy as np import pytest -import sys -import os - -# Allow importing engine from the repo root when running with pytest from any cwd -sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) from jump_diffusion_engine import JumpDiffusionEngine @@ -33,6 +28,11 @@ def engine(): ) +def test_public_import_uses_package_layout(): + """The public import should resolve through the dedicated package.""" + assert JumpDiffusionEngine.__module__ == "jump_diffusion_engine.engine" + + # --------------------------------------------------------------------------- # find_fixed_points # ---------------------------------------------------------------------------