From e864fda7ac0e0cc9484935eed386739a63dd9c6f Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sat, 25 Jan 2025 17:50:25 -0600 Subject: [PATCH 1/9] python version --- .github/workflows/python-test.yml | 2 +- setup.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 450be28..94832af 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: [3.8, 3.9, '3.10', 3.11] + python-version: ['3.10', 3.11, 3.12] steps: - uses: actions/checkout@v4 diff --git a/setup.py b/setup.py index ad1401e..1fc19c4 100755 --- a/setup.py +++ b/setup.py @@ -3,8 +3,15 @@ import pathlib from setuptools import setup, find_packages + __here__ = pathlib.Path(__file__).parent + +def read(fname): + with open(os.path.join(__here__, fname)) as f: + return f.read() + + extra_files = {"WrightSim": ["VERSION"]} with __here__ / "WrightSim" / "VERSION" as version_file: @@ -33,6 +40,8 @@ }, version=version, description="A simulation package for multidimensional spectroscopy.", + long_description=read("README.rst"), + long_description_content_type="text/x-rst", author="WrightSim Developers", license="MIT", url="https://github.com/wright-group/WrightSim", @@ -43,8 +52,9 @@ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering", ], ) From d5289842d989ec8744ad75f0bed63619259bfb06 Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sat, 25 Jan 2025 17:50:30 -0600 Subject: [PATCH 2/9] Create pyproject.toml --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" From 5bf4d94481529f8dac9741523b81670ad0bf2fb6 Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sat, 25 Jan 2025 17:50:34 -0600 Subject: [PATCH 3/9] Update CONTRIBUTORS --- CONTRIBUTORS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a1fb576..8f04b62 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1,5 +1,6 @@ Maintainers (alphabetical by last name) - Blaise Thompson (@untzag) + Daniel Kohler (@ddkohler) Contributors (alphabetical by last name) - Daniel Kohler (@p770193) + Kyle Sunden (@ksunden) + Blaise Thompson (@untzag) From 455bc6cf53fe3ace6779d11f046530d5738460bb Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sat, 25 Jan 2025 17:54:29 -0600 Subject: [PATCH 4/9] Update setup.py --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 1fc19c4..f913977 100755 --- a/setup.py +++ b/setup.py @@ -8,14 +8,13 @@ def read(fname): - with open(os.path.join(__here__, fname)) as f: + with __here__ / fname as f: return f.read() extra_files = {"WrightSim": ["VERSION"]} +version = read("WrightSim" / "VERSION").read_text().strip() -with __here__ / "WrightSim" / "VERSION" as version_file: - version = version_file.read_text().strip() setup( name="WrightSim", From fc0e21d9f6d43ba304fcfb86813f3d178fcdabc7 Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sat, 25 Jan 2025 17:56:37 -0600 Subject: [PATCH 5/9] Update setup.py --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index f913977..bbf80c4 100755 --- a/setup.py +++ b/setup.py @@ -7,13 +7,13 @@ __here__ = pathlib.Path(__file__).parent -def read(fname): - with __here__ / fname as f: +def read(path): + with path as f: return f.read() extra_files = {"WrightSim": ["VERSION"]} -version = read("WrightSim" / "VERSION").read_text().strip() +version = read(__here__ / "WrightSim" / "VERSION").read_text().strip() setup( @@ -39,7 +39,7 @@ def read(fname): }, version=version, description="A simulation package for multidimensional spectroscopy.", - long_description=read("README.rst"), + long_description=read(__here__ / "README.rst"), long_description_content_type="text/x-rst", author="WrightSim Developers", license="MIT", From d0de3793a6f7106bc8a6ce0917b45aa7798b8de7 Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sat, 25 Jan 2025 18:01:38 -0600 Subject: [PATCH 6/9] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bbf80c4..a006c87 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ def read(path): - with path as f: + with open(path) as f: return f.read() From 8ed53ad065a22a72bdb1af7634428827b54d1607 Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sat, 25 Jan 2025 18:04:31 -0600 Subject: [PATCH 7/9] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a006c87..bdac060 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def read(path): extra_files = {"WrightSim": ["VERSION"]} -version = read(__here__ / "WrightSim" / "VERSION").read_text().strip() +version = read(__here__ / "WrightSim" / "VERSION").strip() setup( From 6ae7ecb750dfc836d5c135c47e6f8ee5bb5475f0 Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Sun, 26 Jan 2025 10:49:06 -0600 Subject: [PATCH 8/9] README.md --- README.rst => README.md | 52 +++++++++++++++++------------------------ setup.py | 4 ++-- 2 files changed, 24 insertions(+), 32 deletions(-) rename README.rst => README.md (58%) diff --git a/README.rst b/README.md similarity index 58% rename from README.rst rename to README.md index 6b6aa37..b38a4b1 100644 --- a/README.rst +++ b/README.md @@ -1,41 +1,35 @@ -WrightSim -========= +# WrightSim + A simulation package for multidimensional spectroscopy. -Installation ------------- +## Installation -.. code-block:: bash - +``` $ git clone https://github.com/wright-group/WrightSim $ cd WrightSim - $ python setup.py develop - -Note: This will install all required dependencies. -PyCUDA is not a required dependency in general, but is required if GPU simulations are desired. - -.. code-block:: bash + $ python -m pip install -e . +``` - $ pip install pycuda +* This will install all required dependencies. Use ``--no-deps`` flag to only install the package. +* PyCUDA is not a required dependency in general, but is required if GPU simulations are desired: +` $ pip install pycuda` +PyCUDA requires an Nvidia graphics card and drivers, and the CUDA libraries installed. -PyCUDA requires an Nvida graphics card and drivers, and the CUDA libraries installed. +## Usage -Usage ------ - -An example script is provided at ``./scripts/target.py`` +An example script is provided at `./scripts/target.py` This script can be modified to suit an individual simulation. The basic steps are: -#. Select an experiment -#. Set up the axes of the scan -#. Set the time interfal and buffers -#. Create a Hamiltonian object -#. Run the scan -#. (optional) review the results +1. Select an experiment +2. Set up the axes of the scan +3. Set the time interval and buffers +4. Create a Hamiltonian object +5. Run the scan +6. (optional) review the results Level of parallelism is selected by the ``mp`` parameter of teh ``exp.run`` method. @@ -44,13 +38,11 @@ Level of parallelism is selected by the ``mp`` parameter of teh ``exp.run`` meth - ``False`` or ``""`` runs in single threaded mode -The script is set up to read the dimensions from arguments. -it can be run like so: - -.. code-block:: bash - +The script is set up to read the dimensions from arguments; +it can be run like so: +``` $ ./target.py 32 16 - +``` This will run a 3D simulation of 32x32x16 Freq-Freq-Delay. diff --git a/setup.py b/setup.py index bdac060..6b10711 100755 --- a/setup.py +++ b/setup.py @@ -39,8 +39,8 @@ def read(path): }, version=version, description="A simulation package for multidimensional spectroscopy.", - long_description=read(__here__ / "README.rst"), - long_description_content_type="text/x-rst", + long_description=read(__here__ / "README.md"), + long_description_content_type="text/markdown", author="WrightSim Developers", license="MIT", url="https://github.com/wright-group/WrightSim", From 8b53e2b986b574a650495ba17b1d91987fecdcc2 Mon Sep 17 00:00:00 2001 From: Daniel Kohler <11864045+ddkohler@users.noreply.github.com> Date: Mon, 13 Apr 2026 14:45:12 -0500 Subject: [PATCH 9/9] Update __version__.py --- WrightSim/__version__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WrightSim/__version__.py b/WrightSim/__version__.py index 647e709..aae27a5 100644 --- a/WrightSim/__version__.py +++ b/WrightSim/__version__.py @@ -7,8 +7,7 @@ __all__ = ["__version__", "__branch__"] # read from VERSION file -with __here__ / "VERSION" as f: - __version__ = f.read_text().strip() +__version__ = (__here__ / "VERSION").read_text().strip() # add git branch, if appropriate p = __here__.parent / ".git" / "HEAD"