From 5914a6dec5a5b9372b679c8ea7151e4106831ffa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Jun 2026 07:38:56 +0000 Subject: [PATCH 1/3] Initial plan From ee4b29978dc30db179cb4983d989654f0aad893d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Jun 2026 07:42:19 +0000 Subject: [PATCH 2/3] refactor package layout and normalize license --- CHANGELOG.md | 3 +-- LICENSE | 7 +++++-- README.md | 6 +++--- jump_diffusion_engine/__init__.py | 3 +++ .../engine.py | 0 pyproject.toml | 4 ++-- tests/test_engine.py | 10 +++++----- 7 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 jump_diffusion_engine/__init__.py rename jump_diffusion_engine.py => jump_diffusion_engine/engine.py (100%) 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 73564bb..eb8e65c 100644 --- a/LICENSE +++ b/LICENSE @@ -175,9 +175,12 @@ 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. + 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 + identification within third-party archives. - Copyright 2026 Sarah Marin + Copyright [yyyy] [name of copyright owner] 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 # --------------------------------------------------------------------------- From 1b3f59f884221629f6c47de85ea9de9ecbd4be54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Jun 2026 07:43:37 +0000 Subject: [PATCH 3/3] fix canonical apache license text --- LICENSE | 168 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 87 insertions(+), 81 deletions(-) diff --git a/LICENSE b/LICENSE index eb8e65c..db3c896 100644 --- a/LICENSE +++ b/LICENSE @@ -45,24 +45,23 @@ separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - "Contribution" shall mean, as to any Contributor, any work of - authorship, including the original version of the Work and any - modifications or additions to that Work or Derivative Works of the Work, - that is intentionally submitted to the Licensor for inclusion in the Work - by the copyright owner or by an individual or Legal Entity authorized to - submit on behalf of the copyright owner. For the purposes of this - definition, "submitted" means any form of electronic, verbal, or written - communication sent to the Licensor or its representatives, including but - not limited to communication on electronic mailing lists, source code - control systems, and issue tracking systems that are managed by, or on - behalf of, the Licensor for the purpose of discussing and improving the - Work, but excluding communication that is conspicuously marked or - otherwise designated in writing by the copyright owner as "Not a - Contribution." - - "Contributor" shall mean Licensor and any Legal Entity on behalf of - whom a Contribution has been received by the Licensor and subsequently - incorporated within the Work. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, @@ -80,92 +79,99 @@ by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a cross-claim - or counterclaim in a lawsuit) alleging that the Work or any Contribution - incorporated within the Work constitutes direct or contributory patent - infringement, then any patent licenses granted to You under this License - for that Work shall terminate as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the Work - or Derivative Works thereof in any medium, with or without + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - (a) You must give any other recipients of the Work or Derivative Works - a copy of this License; and + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works that - You distribute, all copyright, patent, trademark, and attribution - notices from the Source form of the Work, excluding those notices - that do not pertain to any part of the Derivative Works; and + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its - distribution, You must include a readable copy of the attribution - notices contained within such NOTICE file, in at least one of the - following places: within a NOTICE text file distributed as part of - the Derivative Works; within the Source form or documentation, if - provided along with the Derivative Works; or, within a display - generated by the Derivative Works, if and wherever such third-party - notices normally appear. The contents of the NOTICE file are for - informational purposes only and do not modify the License. You may - add Your own attribution notices within Derivative Works that You - distribute, alongside or as an addendum to the NOTICE text from the - Work, provided that such additional attribution notices cannot be - construed as modifying the License. - - You may add Your own license statement for Your modifications and may - provide additional grant of rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Work, and to permit - persons to whom the Work is furnished to do so. + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work by - You to the Licensor shall be under the terms and conditions of this - License, without any additional terms or conditions. Notwithstanding - the above, nothing herein shall supersede or modify the terms of any - separate license agreement you may have executed with Licensor regarding - such Contributions. + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - 7. Disclaimer of Warranty. Unless required by applicable law or agreed - to in writing, Licensor provides the Work (and each Contributor - provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES - OR CONDITIONS OF ANY KIND, either express or implied, including, - without limitation, any warranties or conditions of TITLE, - NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR - PURPOSE. You are solely responsible for determining the appropriateness - of using or redistributing the Work and assume any risks associated - with Your exercise of permissions under this License. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, - incidental, or exemplary damages of any character arising as a result - of this License or out of the use or inability to use the Work - (including but not limited to damages for loss of goodwill, work - stoppage, computer failure or malfunction, or all other commercial - damages or losses), even if such Contributor has been advised of the - possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing the - Work or Derivative Works thereof, You may choose to offer, and charge - a fee for, acceptance of support, warranty, indemnity, or other - liability obligations and/or rights consistent with this License. - However, in accepting such obligations, You may offer such obligations - only on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, defend, - and hold each Contributor harmless for any liability incurred by, or - claims asserted against, such Contributor by reason of your accepting - any such warranty or additional liability. + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS