From 85436c2f7f07bfe588036ae0e811cef95d8d726e Mon Sep 17 00:00:00 2001 From: TristanHehnen Date: Thu, 21 Aug 2025 15:14:14 +0200 Subject: [PATCH 1/7] Corrections to the tutorial notebook. --- .../notebooks/FireSciPy_KAS_Demo.ipynb | 45 ++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb b/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb index 264c8c4..f606208 100644 --- a/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb +++ b/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb @@ -24,10 +24,12 @@ "import os\n", "import re\n", "import sys\n", + "import matplotlib\n", "\n", "import numpy as np\n", + "import scipy as sp\n", "import pandas as pd\n", - "import FireSciPy as fsp\n", + "import firescipy as fsp\n", "import matplotlib.pyplot as plt\n", "\n", "from importlib import reload # Python 3.4+\n", @@ -56,6 +58,38 @@ "})\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "###########################################################################\n", + "## ! Use the 'requirements.txt' to create a virtual Python environment ! ##\n", + "###########################################################################\n", + "\n", + "# Package Versions\n", + "# ----------------\n", + "# Python version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]\n", + "# Python path: F:\\PhD\\PythonPackage\\venv_Packaging\\Scripts\\python.exe\n", + "# Numpy version: 2.3.2\n", + "# SciPy version: 1.16.1\n", + "# Pandas version: 2.3.1\n", + "# Matplotlib version: 3.10.5\n", + "# FireSciPy version: 0.0.3\n", + "\n", + "\n", + "print('Package Versions')\n", + "print('----------------')\n", + "print('Python version: {}'.format(sys.version))\n", + "print('Python path: {}'.format(sys.executable))\n", + "print('Numpy version: {}'.format(np.__version__))\n", + "print('SciPy version: {}'.format(sp.__version__))\n", + "print('Pandas version: {}'.format(pd.__version__))\n", + "print('Matplotlib version: {}'.format(matplotlib.__version__))\n", + "print('FireSciPy version: {}'.format(fsp.__version__))\n" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -904,7 +938,8 @@ "outputs": [], "source": [ "# Path to the experimental data csv files.\n", - "fsp_data_path = os.path.join(\"C:\\\\\", \"path\", \"to\", \"the\", \"CSV_files\")\n", + "# fsp_data_path = os.path.join(\"C:\\\\\", \"path\", \"to\", \"the\", \"CSV_files\")\n", + "fsp_data_path = os.path.join(\"F:\\\\\", \"PhD\", \"Kinetics\", \"ReactionRateDev\", \"GeneralInformation\", \"FireSciPy\")\n", "exp_root = os.path.join(fsp_data_path, \"docs\", \"tutorials\", \"pyrolysis\", \"data\")\n", "\n", "\n", @@ -1489,9 +1524,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python (venv_Packaging)", "language": "python", - "name": "python3" + "name": "venv_packaging" }, "language_info": { "codemirror_mode": { @@ -1503,7 +1538,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.9" + "version": "3.13.3" } }, "nbformat": 4, From 7fce8465b0830eb589a0206c379b77c50812d781 Mon Sep 17 00:00:00 2001 From: TristanHehnen Date: Thu, 21 Aug 2025 15:16:39 +0200 Subject: [PATCH 2/7] Adjustments to documentation main page. --- docs/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 1dd1779..06e1d62 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,13 +1,13 @@ FireSciPy Documentation ======================= -Welcome to the documentation for FireSciPy — a Python package for fire science and fire safety engineering calculations. +Welcome to the documentation for FireSciPy — a Python package for fire safety engineering and fire science calculations. Tutorials --------- -This section provides hands-on examples of the various functions. +This section provides hands-on examples of the various functions. There are also Jupyter notebooks available for download that contain these examples. Check out the `FireSciPy repo `_ on GitHub. .. toctree:: :maxdepth: 2 @@ -16,7 +16,7 @@ This section provides hands-on examples of the various functions. tutorials/index -Documentation +API Documentation ------------- This section provides a reference for the internal data structure, key From 7b4e1966757448b3e1a93eea94f0708a0b00a81f Mon Sep 17 00:00:00 2001 From: TristanHehnen Date: Thu, 21 Aug 2025 15:23:13 +0200 Subject: [PATCH 3/7] Imporvements to the pyproject.toml --- pyproject.toml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0a90ebe..abe3bb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,26 @@ [build-system] -requires = ["setuptools>=64", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "firescipy" -version = "0.1.0" +version = "0.0.4" description = "FireSciPy: Fundamental algorithms from the field of fire science, for computations with Python." readme = "README.md" +keywords = ["Fire Safety Engineering", "fire", "pyrolysis", "kinetics", "FDS"] requires-python = ">=3.9" -license = { text = "CC-BY-4.0" } # adjust if you use another license +license = { text = "CC-BY-4.0" } # adjust if you use another license +license-files = ["LICEN[CS]E*"] authors = [ { name = "Tristan Hehnen", email = "you@example.com" }, { name = "Lukas Arnold", email = "you@example.com" } ] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering" +] dependencies = [ "numpy>=1.19.5", "scipy>=1.5.4", @@ -21,6 +29,10 @@ dependencies = [ # Add other runtime dependencies here ] -[tool.setuptools.packages.find] -where = ["src"] -include = ["firescipy*"] +[tool.hatch.build.targets.wheel] +packages = ["src/firescipy"] + +[project.urls] +Repository = "https://github.com/FireDynamics/FireSciPy" +Documentation = "https://firedynamics.github.io/FireSciPy/" +Issues = "https://github.com/FireDynamics/FireSciPy/issues" From 4ead54b5341f5d002464526e9aaa55a7f850ff45 Mon Sep 17 00:00:00 2001 From: TristanHehnen Date: Thu, 21 Aug 2025 15:24:33 +0200 Subject: [PATCH 4/7] Version, set pyproject.toml as single source of truth. --- src/firescipy/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/firescipy/__init__.py b/src/firescipy/__init__.py index b09da6b..3dcdff0 100644 --- a/src/firescipy/__init__.py +++ b/src/firescipy/__init__.py @@ -2,9 +2,18 @@ from . import pyrolysis from . import constants from . import handcalculation +from importlib.metadata import PackageNotFoundError, version -__version__ = "0.1.0" +# IMPORTANT: must match the name in pyproject.toml +_PKG_NAME = "firescipy" + +# Get version for pyproject.toml as single source of truth +try: + __version__ = version(_PKG_NAME) +except PackageNotFoundError: + # Running from a source checkout without installation: + __version__ = "0.0.0" # from .utils import ensure_nested_dict, get_nested_value, series_to_numpy, linear_model, calculate_residuals, calculate_R_squared, calculate_RMSE From 14a6d29f79e45524c0d66943046b45feef004d2c Mon Sep 17 00:00:00 2001 From: TristanHehnen Date: Thu, 21 Aug 2025 15:27:25 +0200 Subject: [PATCH 5/7] Improved README. --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b8e57d7..6c3979f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,30 @@ # FireSciPy -[![FireSciPy Documentation](https://img.shields.io/badge/docs-online-brightgreen)](https://FireDynamics.github.io/FireSciPy/) - Fundamental algorithms from the field of fire science and fire safety engineering, for computations with Python. + +Documentation is available here: [![FireSciPy Documentation](https://img.shields.io/badge/docs-online-brightgreen)](https://FireDynamics.github.io/FireSciPy/) + +Examples are available in Jupyter notebooks in the [FireSciPy repo on GitHub](https://github.com/FireDynamics/FireSciPy). + + + +## Meta Information + +Distributed under the CC-BY-4.0 license (Creative Commons Attribution 4.0 International Public License, https://creativecommons.org/licenses/by/4.0/). See ``LICENSE`` for more information. + +[https://github.com/FireDynamics/FireSciPy](https://github.com/FireDynamics/FireSciPy) + + +## Contributing + +Contributions to this package are welcome! + +Please feel free to use the [doscussions forum](https://github.com/FireDynamics/FireSciPy/discussions) or the [issue tracker](https://github.com/FireDynamics/FireSciPy/issues) to get in contact with us. From there, we can talk about your ideas and see how to implement them. + +Practical summary for contributions directly to the repo: + +1. Fork it () +2. Create your feature branch (`git checkout -b feature/fooBar`) +3. Commit your changes (`git commit -am 'Add some fooBar'`) +4. Push to the branch (`git push origin feature/fooBar`) +5. Create a new Pull Request From 67159fa316124906e43bd42ad6c53dd1200cb7d3 Mon Sep 17 00:00:00 2001 From: TristanHehnen Date: Thu, 21 Aug 2025 15:39:38 +0200 Subject: [PATCH 6/7] Small adjustments. --- .../pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb | 3 +-- pyproject.toml | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb b/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb index f606208..155e520 100644 --- a/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb +++ b/docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb @@ -938,8 +938,7 @@ "outputs": [], "source": [ "# Path to the experimental data csv files.\n", - "# fsp_data_path = os.path.join(\"C:\\\\\", \"path\", \"to\", \"the\", \"CSV_files\")\n", - "fsp_data_path = os.path.join(\"F:\\\\\", \"PhD\", \"Kinetics\", \"ReactionRateDev\", \"GeneralInformation\", \"FireSciPy\")\n", + "fsp_data_path = os.path.join(\"C:\\\\\", \"path\", \"to\", \"the\", \"CSV_files\")\n", "exp_root = os.path.join(fsp_data_path, \"docs\", \"tutorials\", \"pyrolysis\", \"data\")\n", "\n", "\n", diff --git a/pyproject.toml b/pyproject.toml index abe3bb8..c5b7a73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "firescipy" -version = "0.0.4" +version = "0.0.5" description = "FireSciPy: Fundamental algorithms from the field of fire science, for computations with Python." readme = "README.md" keywords = ["Fire Safety Engineering", "fire", "pyrolysis", "kinetics", "FDS"] @@ -22,10 +22,10 @@ classifiers = [ "Topic :: Scientific/Engineering" ] dependencies = [ - "numpy>=1.19.5", - "scipy>=1.5.4", - "pandas>=1.1.5", - "matplotlib>=3.3.4", + "numpy>=1.21", + "scipy>=1.7", + "pandas>=1.3", + "matplotlib>=3.4", # Add other runtime dependencies here ] From 93442d9a875e8aa71853ae8c6fc6359cef2128a5 Mon Sep 17 00:00:00 2001 From: TristanHehnen Date: Thu, 21 Aug 2025 15:42:40 +0200 Subject: [PATCH 7/7] Fixed typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c3979f..c2106b8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Distributed under the CC-BY-4.0 license (Creative Commons Attribution 4.0 Intern Contributions to this package are welcome! -Please feel free to use the [doscussions forum](https://github.com/FireDynamics/FireSciPy/discussions) or the [issue tracker](https://github.com/FireDynamics/FireSciPy/issues) to get in contact with us. From there, we can talk about your ideas and see how to implement them. +Please feel free to use the [discussions forum](https://github.com/FireDynamics/FireSciPy/discussions) or the [issue tracker](https://github.com/FireDynamics/FireSciPy/issues) to get in contact with us. From there, we can talk about your ideas and see how to implement them. Practical summary for contributions directly to the repo: