Skip to content

Commit c6d4cb6

Browse files
Merge pull request #22 from TristanHehnen/main
Preparation of initial release
2 parents 486cb11 + 93442d9 commit c6d4cb6

5 files changed

Lines changed: 101 additions & 21 deletions

File tree

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# FireSciPy
22

3-
[![FireSciPy Documentation](https://img.shields.io/badge/docs-online-brightgreen)](https://FireDynamics.github.io/FireSciPy/)
4-
53
Fundamental algorithms from the field of fire science and fire safety engineering, for computations with Python.
4+
5+
Documentation is available here: [![FireSciPy Documentation](https://img.shields.io/badge/docs-online-brightgreen)](https://FireDynamics.github.io/FireSciPy/)
6+
7+
Examples are available in Jupyter notebooks in the [FireSciPy repo on GitHub](https://github.com/FireDynamics/FireSciPy).
8+
9+
10+
11+
## Meta Information
12+
13+
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.
14+
15+
[https://github.com/FireDynamics/FireSciPy](https://github.com/FireDynamics/FireSciPy)
16+
17+
18+
## Contributing
19+
20+
Contributions to this package are welcome!
21+
22+
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.
23+
24+
Practical summary for contributions directly to the repo:
25+
26+
1. Fork it (<https://github.com/FireDynamics/FireSciPy/fork>)
27+
2. Create your feature branch (`git checkout -b feature/fooBar`)
28+
3. Commit your changes (`git commit -am 'Add some fooBar'`)
29+
4. Push to the branch (`git push origin feature/fooBar`)
30+
5. Create a new Pull Request

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FireSciPy Documentation
22
=======================
33

4-
Welcome to the documentation for FireSciPy — a Python package for fire science and fire safety engineering calculations.
4+
Welcome to the documentation for FireSciPy — a Python package for fire safety engineering and fire science calculations.
55

66

77
Tutorials
88
---------
99

10-
This section provides hands-on examples of the various functions.
10+
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 <https://github.com/FireDynamics/FireSciPy>`_ on GitHub.
1111

1212
.. toctree::
1313
:maxdepth: 2
@@ -16,7 +16,7 @@ This section provides hands-on examples of the various functions.
1616
tutorials/index
1717

1818

19-
Documentation
19+
API Documentation
2020
-------------
2121

2222
This section provides a reference for the internal data structure, key

docs/tutorials/pyrolysis/notebooks/FireSciPy_KAS_Demo.ipynb

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
"import os\n",
2525
"import re\n",
2626
"import sys\n",
27+
"import matplotlib\n",
2728
"\n",
2829
"import numpy as np\n",
30+
"import scipy as sp\n",
2931
"import pandas as pd\n",
30-
"import FireSciPy as fsp\n",
32+
"import firescipy as fsp\n",
3133
"import matplotlib.pyplot as plt\n",
3234
"\n",
3335
"from importlib import reload # Python 3.4+\n",
@@ -56,6 +58,38 @@
5658
"})\n"
5759
]
5860
},
61+
{
62+
"cell_type": "code",
63+
"execution_count": null,
64+
"metadata": {},
65+
"outputs": [],
66+
"source": [
67+
"###########################################################################\n",
68+
"## ! Use the 'requirements.txt' to create a virtual Python environment ! ##\n",
69+
"###########################################################################\n",
70+
"\n",
71+
"# Package Versions\n",
72+
"# ----------------\n",
73+
"# Python version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]\n",
74+
"# Python path: F:\\PhD\\PythonPackage\\venv_Packaging\\Scripts\\python.exe\n",
75+
"# Numpy version: 2.3.2\n",
76+
"# SciPy version: 1.16.1\n",
77+
"# Pandas version: 2.3.1\n",
78+
"# Matplotlib version: 3.10.5\n",
79+
"# FireSciPy version: 0.0.3\n",
80+
"\n",
81+
"\n",
82+
"print('Package Versions')\n",
83+
"print('----------------')\n",
84+
"print('Python version: {}'.format(sys.version))\n",
85+
"print('Python path: {}'.format(sys.executable))\n",
86+
"print('Numpy version: {}'.format(np.__version__))\n",
87+
"print('SciPy version: {}'.format(sp.__version__))\n",
88+
"print('Pandas version: {}'.format(pd.__version__))\n",
89+
"print('Matplotlib version: {}'.format(matplotlib.__version__))\n",
90+
"print('FireSciPy version: {}'.format(fsp.__version__))\n"
91+
]
92+
},
5993
{
6094
"cell_type": "markdown",
6195
"metadata": {},
@@ -1489,9 +1523,9 @@
14891523
],
14901524
"metadata": {
14911525
"kernelspec": {
1492-
"display_name": "Python 3",
1526+
"display_name": "Python (venv_Packaging)",
14931527
"language": "python",
1494-
"name": "python3"
1528+
"name": "venv_packaging"
14951529
},
14961530
"language_info": {
14971531
"codemirror_mode": {
@@ -1503,7 +1537,7 @@
15031537
"name": "python",
15041538
"nbconvert_exporter": "python",
15051539
"pygments_lexer": "ipython3",
1506-
"version": "3.6.9"
1540+
"version": "3.13.3"
15071541
}
15081542
},
15091543
"nbformat": 4,

pyproject.toml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11
[build-system]
2-
requires = ["setuptools>=64", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "firescipy"
7-
version = "0.1.0"
7+
version = "0.0.5"
88
description = "FireSciPy: Fundamental algorithms from the field of fire science, for computations with Python."
99
readme = "README.md"
10+
keywords = ["Fire Safety Engineering", "fire", "pyrolysis", "kinetics", "FDS"]
1011
requires-python = ">=3.9"
11-
license = { text = "CC-BY-4.0" } # adjust if you use another license
12+
license = { text = "CC-BY-4.0" } # adjust if you use another license
13+
license-files = ["LICEN[CS]E*"]
1214
authors = [
1315
{ name = "Tristan Hehnen", email = "you@example.com" },
1416
{ name = "Lukas Arnold", email = "you@example.com" }
1517
]
18+
classifiers = [
19+
"Programming Language :: Python :: 3",
20+
"Operating System :: OS Independent",
21+
"Intended Audience :: Science/Research",
22+
"Topic :: Scientific/Engineering"
23+
]
1624
dependencies = [
17-
"numpy>=1.19.5",
18-
"scipy>=1.5.4",
19-
"pandas>=1.1.5",
20-
"matplotlib>=3.3.4",
25+
"numpy>=1.21",
26+
"scipy>=1.7",
27+
"pandas>=1.3",
28+
"matplotlib>=3.4",
2129
# Add other runtime dependencies here
2230
]
2331

24-
[tool.setuptools.packages.find]
25-
where = ["src"]
26-
include = ["firescipy*"]
32+
[tool.hatch.build.targets.wheel]
33+
packages = ["src/firescipy"]
34+
35+
[project.urls]
36+
Repository = "https://github.com/FireDynamics/FireSciPy"
37+
Documentation = "https://firedynamics.github.io/FireSciPy/"
38+
Issues = "https://github.com/FireDynamics/FireSciPy/issues"

src/firescipy/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22
from . import pyrolysis
33
from . import constants
44
from . import handcalculation
5+
from importlib.metadata import PackageNotFoundError, version
56

67

7-
__version__ = "0.1.0"
8+
# IMPORTANT: must match the name in pyproject.toml
9+
_PKG_NAME = "firescipy"
10+
11+
# Get version for pyproject.toml as single source of truth
12+
try:
13+
__version__ = version(_PKG_NAME)
14+
except PackageNotFoundError:
15+
# Running from a source checkout without installation:
16+
__version__ = "0.0.0"
817

918

1019
# from .utils import ensure_nested_dict, get_nested_value, series_to_numpy, linear_model, calculate_residuals, calculate_R_squared, calculate_RMSE

0 commit comments

Comments
 (0)