Skip to content

Commit 04a434b

Browse files
authored
Merge pull request #388 from mabruzzo/gracklepy-on-pypi-release
Prepare for the release
2 parents 777e11c + e8a0543 commit 04a434b

File tree

6 files changed

+124
-20
lines changed

6 files changed

+124
-20
lines changed

CHANGELOG

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
1+
== Version 3.4.1 ==
2+
_Release date - Aug 22, 2025_
3+
4+
* Bugfix: Fix a significant oversight in **GrackleConfig.cmake**
5+
https://github.com/grackle-project/grackle/pull/330
6+
* Bugfix: H2 self shielding length scale factor fix
7+
https://github.com/grackle-project/grackle/pull/325
8+
* Bugfix: address a bug in calc_temp_cloudy_g.F
9+
https://github.com/grackle-project/grackle/pull/367
10+
* Enhancement: Standard Status Reporting Machinery
11+
https://github.com/grackle-project/grackle/pull/269
12+
* Enhancement: Remove pygrackle/api.py & pygrackle/utilities/api.py
13+
https://github.com/grackle-project/grackle/pull/352
14+
* Enhancement: Rename pygrackle -> gracklepy (so we can upload to PyPI)
15+
https://github.com/grackle-project/grackle/pull/371
16+
* Build-System: (core lib) introduce CMakePresets.json to enable compiler warnings in a CI job https://github.com/grackle-project/grackle/pull/334
17+
* Build-System: (core lib) Relocated all CMake dependency information into dependencies.cmake https://github.com/grackle-project/grackle/pull/296
18+
* Build-System: (core lib) assorted tweaks: https://github.com/grackle-project/grackle/pull/326 https://github.com/grackle-project/grackle/pull/329 https://github.com/grackle-project/grackle/pull/337
19+
* Build-System: (gracklepy) tweak cython handling https://github.com/grackle-project/grackle/pull/319 https://github.com/grackle-project/grackle/pull/328
20+
* Build-System: (gracklepy) Introduce dependency groups https://github.com/grackle-project/grackle/pull/347
21+
* Testing: Support running subset of gracklepy test without an editable install
22+
https://github.com/grackle-project/grackle/pull/335
23+
* Testing: Move `test_chemistry_struct_synched` between test suites
24+
https://github.com/grackle-project/grackle/pull/327
25+
* Documentation: gracklepy test instruction tweaks
26+
https://github.com/grackle-project/grackle/pull/309
27+
* Assorted tweaks to appearance of doc website
28+
https://github.com/grackle-project/grackle/pull/285
29+
https://github.com/grackle-project/grackle/pull/291
30+
https://github.com/grackle-project/grackle/pull/346
31+
* Documentation: Fix spacing issues in docs
32+
https://github.com/grackle-project/grackle/pull/340
33+
* Documentation: Simplify GitHub hyperlinks for repository locations in docs
34+
https://github.com/grackle-project/grackle/pull/300
35+
* Documentation: Add more detail to gracklepy build documentation
36+
https://github.com/grackle-project/grackle/pull/294
37+
* Documentation: Added missing He
38+
https://github.com/grackle-project/grackle/pull/362
39+
* Documentation: Added chemistry network table
40+
https://github.com/grackle-project/grackle/pull/361
41+
* Infrastructure: Optimize circleci workflows
42+
https://github.com/grackle-project/grackle/pull/338
43+
* Infrastructure: Introduce an extremely simplistic `.pre-commit-config.yaml` file
44+
https://github.com/grackle-project/grackle/pull/348
45+
* Infrastructure: Introduce GHA to upload Gracklepy wheels to PyPI
46+
https://github.com/grackle-project/grackle/pull/320
47+
https://github.com/grackle-project/grackle/pull/355
48+
https://github.com/grackle-project/grackle/pull/356
49+
* Infrastructure: Bump pypa/cibuildwheel version
50+
https://github.com/grackle-project/grackle/pull/360
51+
https://github.com/grackle-project/grackle/pull/363
52+
https://github.com/grackle-project/grackle/pull/365
53+
https://github.com/grackle-project/grackle/pull/372
54+
* Infrastructure: Move test-data retrieval logic into ``scripts/ci/fetch-test-data.py``
55+
https://github.com/grackle-project/grackle/pull/307
56+
* Address flake8 warnings (in files that it previously ignored)
57+
https://github.com/grackle-project/grackle/pull/368
58+
https://github.com/grackle-project/grackle/pull/369
59+
* Infrastructure: Use builtin GitHub feature to nicely redirect to Code of
60+
Conduct
61+
https://github.com/grackle-project/grackle/pull/342
62+
* Infrastructure: Convert README.md to README.rst (and deduplicate content on
63+
the website landing page)
64+
https://github.com/grackle-project/grackle/pull/350
65+
https://github.com/grackle-project/grackle/pull/351
66+
167
== Version 3.4 ==
268
_Release date - May 14, 2025_
369

README.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Our `method paper <http://adsabs.harvard.edu/abs/2017MNRAS.466.2217S>`__ provide
4646
Projects that provide out-of-the-box support for Grackle
4747
--------------------------------------------------------
4848

49-
Grackle is a popular tool (the `method paper <http://adsabs.harvard.edu/abs/2017MNRAS.466.2217S>`__ has over 290 citations) and has been used in a wide variety of calculations.
49+
Grackle is a popular tool (the `method paper <http://adsabs.harvard.edu/abs/2017MNRAS.466.2217S>`__ has over 300 citations) and has been used in a wide variety of calculations.
5050
Below, we list open source projects that provide out-of-the-box support for Grackle:
5151

5252
`ChaNGa <https://github.com/N-BodyShop/changa>`__,
@@ -63,7 +63,7 @@ Below, we list open source projects that provide out-of-the-box support for Grac
6363
Getting Grackle
6464
---------------
6565

66-
Currently, Grackle must be built from source.
66+
Currently, the core Grackle library must be built from source.
6767
If you only need Grackle as a dependency of a simulation code and that code is built with CMake, then that code's build system might be configured to automatically fetch, build, and link Grackle into the code for you (`Enzo-E <https://enzo-e.readthedocs.io/en/latest/>`__ is an example of a code configured in this manner).
6868

6969
If you contribute to a simulation code, our `Integration Guide <https://grackle.readthedocs.io/en/latest/Integration.html>`__ provides guidance on simplifying the process (for you and your users) of configuring your code to use Grackle.
@@ -86,16 +86,21 @@ To install Grackle, invoke ``cmake --install ./build [--prefix <prefix/path>]``
8686
For more details **(especially if you encounter any errors),** see our comprehensive `Installation Guide <https://grackle.readthedocs.io/en/latest/Installation.html>`__.
8787
It provides more context for inexperienced CMake users, describes additional configuration options (relevant if you encounter issues), and describes Grackle's "classic" build-system.
8888

89-
Building Gracklepy from Source
90-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89+
Installing Gracklepy
90+
~~~~~~~~~~~~~~~~~~~~
9191

92-
Once you have a Fortran compiler and a copy of HDF5 (1.6 or newer), simply invoke the following from the root of the Grackle repository
92+
The easiest way to get Gracklepy is to invoke the following command
9393

9494
.. code-block:: shell-session
9595
96-
~/grackle $ pip install .
96+
~/grackle $ pip install gracklepy
9797
98-
For more about installation see our `Gracklepy installation guide <https://grackle.readthedocs.io/en/latest/Python.html>`__.
98+
This will download a pre-built version (called a wheel) of Gracklepy from PyPI. This should "just work," unless you use a highly unusual system (if it fails please let us know).
99+
100+
Be aware that the vast majority of Grackle calculation requires Grackle's data files.
101+
At this time you must download manually download these files (see the installation guide); we're working on streamlining this in the future.
102+
103+
For more about installation (and downloading data files), see our `Gracklepy installation guide <https://grackle.readthedocs.io/en/latest/Python.html>`__ .
99104

100105
**NOTE:** Gracklepy was formerly known as Pygrackle.
101106
If you previously installed Pygrackle, you should uninstall it before you install GracklePy.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.1-dev
1+
3.4.1

doc/source/Python.rst

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,43 @@ Gracklepy: Running Grackle in Python
66
Grackle comes with a Python interface, called Gracklepy, which provides
77
access to all of Grackle's functionality.
88

9+
If you are new user, we **strongly recommend** that you use a :ref:`pre-built version of Gracklepy <install-gracklepy-prebuilt>`.
10+
911
.. note::
1012

1113
Gracklepy was formerly known as Pygrackle.
1214
If you previously installed Pygrackle, you should make sure that you uninstall it before upgrading
1315

14-
To install Gracklepy, you'll need to make sure that HDF5 and a fortran compiler are installed (for building the Grackle library itself).
16+
17+
.. _install-gracklepy-prebuilt:
18+
19+
Pre-built installation (recommended)
20+
------------------------------------
21+
22+
The easiest way to get Gracklepy is install a pre-built Gracklepy wheel from PyPI. This can be accomplished by invoking
23+
24+
.. code-block:: shell-session
25+
26+
pip install gracklepy
27+
28+
This command will install the Gracklepy package. Prebuilt copies of all dependencies, including the core Grackle library, are bundled with the installation (the package will use these versions of the dependencies instead of any copies you have installed on your machine).
29+
30+
Be aware that the vast majority of Grackle calculation requires Grackle's data files.
31+
At this time you must download manually download these files (:gh-pr:`235` is a pending pull request that seeks to streamline this for the future).
32+
33+
You can download the datafiles from `here <https://github.com/grackle-project/grackle_data_files/tree/main/input>`__.
34+
35+
.. important::
36+
37+
**DO NOT** try linking arbitrary external C/C++ programs against the prebuilt copy of the core Grackle library that is bundled with Gracklepy.
38+
This is something that we explicitly do not support (it is not a portable solution!)
39+
40+
.. _install-gracklepy-source:
41+
42+
Installation from Source Code
43+
-----------------------------
44+
45+
To install Gracklepy from its source code, you'll need to make sure that HDF5 and a fortran compiler are installed (for building the Grackle library itself).
1546

1647
Gracklepy's runtime-dependencies are:
1748

@@ -24,25 +55,21 @@ The above dependencies are automatically installed with pip (alternatively you c
2455

2556
If you want to run the gracklepy test-suite, you'll need the ``packaging`` and ``py.test`` packages. If pip is up to date (25.1 or newer), you can simply invoke ``pip install --group dev`` from the root of the repository.
2657

27-
.. _install-gracklepy:
28-
29-
Installing Gracklepy
30-
--------------------
3158

3259
Currently, the only way to get Gracklepy is to build it from source.
3360

3461
There are 3 ways to build Gracklepy:
3562

3663
1. As a standalone, self-contained module.
3764
The build command creates a fresh build of the Grackle library and packages it with the Gracklepy module.
38-
**(This is the recommended approach)**
65+
**(If you are going to build Gracklepy from source, this is the recommended way to do it)**
3966

4067
2. As a module that links to an external copy of Grackle that was compiled with the :ref:`Classic build system <classic_build>`.
4168
(This is consistent with the legacy approach for building Gracklepy).
4269

4370
3. As a module that links to an external copy of Grackle that was created with the :ref:`CMake build system <cmake_build>`.
4471

45-
Currently, Gracklepy should be used with Grackle builds where OpenMP is disabled.
72+
Currently, Gracklepy should only be used with Grackle builds where OpenMP is disabled.
4673

4774
.. warning::
4875

@@ -226,14 +253,15 @@ There are a handful of additional packages required purely for developing
226253
Grackle. For example, these will enable :ref:`testing` and building
227254
the documentation locally. These dependencies are specified as dependency
228255
groups, which can be installed with pip (v25.1).
229-
To install all of these dependencies, you can invoke
256+
257+
After downloading the git repository, you can install all of these dependencies by invoking
230258

231259
.. code-block:: shell-session
232260
233261
~/grackle $ pip install --group dev
234262
235263
The above command will install the dependencies independently of Gracklepy.
236-
To install these dependencies at the same time as Gracklepy, you can replace last line of the :ref:`gracklepy installation instructions <install-gracklepy>` with:
264+
To install these dependencies at the same time as you build Gracklepy from source, you can replace last line of the :ref:`installation instructions <install-gracklepy-source>` with:
237265

238266
.. code-block:: shell-session
239267

doc/source/Testing.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ When you launch the tests, the output will look like the following:
102102
Running the gracklepy Test Suite
103103
--------------------------------
104104

105+
.. important::
106+
107+
At the time of writing, the gracklepy suite **ONLY** works when you install :ref:`gracklepy from its source code <install-gracklepy-source>` in an editable installation.
108+
Some tests won't work properly if you use a :ref:`prebuilt installation. <install-gracklepy-prebuilt>`
109+
105110
As already noted, the gracklepy suite includes unit tests and answer tests.
106111

107112
Unit tests (i.e., those with explicitly known correct answers) include
@@ -168,7 +173,7 @@ Sample Usage of the gracklepy Test Suite
168173

169174
The following snippets illustrate ways how you might invoke the gracklepy test suite in different scenarios.
170175

171-
Unless noted otherwise, each scenario assumes that you have already :ref:`installed gracklepy <install-gracklepy>` (reminder, you currently need editable installs for these tests).
176+
Unless noted otherwise, each scenario assumes that you have already :ref:`installed gracklepy from its source code <install-gracklepy-source>` (reminder, you currently need editable installs for these tests).
172177
Each shows snippets assuming that you are at the root of the Grackle directory.
173178

174179
.. tabs::
@@ -238,7 +243,7 @@ Each shows snippets assuming that you are at the root of the Grackle directory.
238243
This scenario involves installing (and uninstalling) different versions of Gracklepy.
239244
These examples all use the simplest (and recommended) approach for installing Gracklepy, which builds it as a standalone library (and automatically manages all details about the core library).
240245

241-
You could also run the tests using :ref:`the other methods of installing Gracklepy <install-gracklepy>`, but that involves extra steps (in those cases you need to manually build and install/link the associated version of the core library).
246+
You could also run the tests using :ref:`the other methods of installing Gracklepy from its source code <install-gracklepy-source>`, but that involves extra steps (in those cases you need to manually build and install/link the associated version of the core library).
242247

243248

244249
The basic premise is that you want to run the full gracklepy test suite (with answer verification) on a target version of the code called ``<target>``.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ readme = "README.rst"
2828
# https://scikit-build-core.readthedocs.io/en/latest/configuration.html#dynamic-metadata
2929
# but gracklepy can't (currently) do this since it lives in a "monorepo"
3030
# https://github.com/pypa/setuptools_scm/issues/1056
31-
version = "1.1.1.dev1"
31+
version = "1.2"
3232
classifiers=[
3333
"Development Status :: 5 - Production/Stable",
3434
"Environment :: Console",

0 commit comments

Comments
 (0)