Skip to content

Commit 682db65

Browse files
MRG: Merge pull request #14 from AndreaBlengino/dev
v1.0.0
2 parents 74ab936 + f2485c6 commit 682db65

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

README.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Powertrain Analysis
1212
:width: 100%
1313

1414
* - PyPI
15-
- |pypi_release| |supported_python_versions| |build|
15+
- |pypi_release| |supported_python_versions| |build| |dependencies|
1616
* - Tests
1717
- |linux_tests| |macos_tests| |windows_tests| |test_coverage|
1818
* - Documentation
@@ -34,7 +34,11 @@ Powertrain Analysis
3434
:target: https://github.com/AndreaBlengino/gearpy/actions/workflows/release.yml
3535
:alt: Package Build
3636

37-
.. |linux_tests| image:: https://img.shields.io/github/actions/workflow/status/AndreaBlengino/gearpy/linux_test.yml.svg?logo=linux&label=Linux
37+
.. |dependencies| image:: https://dependency-dash.repo-helper.uk/github/AndreaBlengino/gearpy/badge.svg
38+
:target: https://dependency-dash.repo-helper.uk/github/AndreaBlengino/gearpy
39+
:alt: Dependencies Status
40+
41+
.. |linux_tests| image:: https://img.shields.io/github/actions/workflow/status/AndreaBlengino/gearpy/linux_test.yml.svg?logo=linux&logoColor=white&label=Linux
3842
:target: https://github.com/AndreaBlengino/gearpy/actions/workflows/linux_test.yml
3943
:alt: Linux Tests
4044

docs/source/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
project = 'gearpy'
1717
copyright = '2024, Andrea Blengino'
1818
author = 'Andrea Blengino'
19-
release = subprocess.run(['git', 'describe', '--tags'], stdout = subprocess.PIPE).stdout.decode('utf-8').split('-')[0]
19+
release = subprocess.run(['git', 'describe', '--tags'], stdout = subprocess.PIPE).stdout.decode('utf-8')
20+
21+
if not release.startswith('v') or not release.endswith('\n') or '-' in release or release.count('.') != 2:
22+
raise ValueError(f"Invalid release name {release}.")
2023

2124

2225
# -- General configuration ---------------------------------------------------

docs/source/installation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ The recommended installation is through `pip`:
66
$ pip install gearpy
77
```
88

9-
gearpy runs for python versions 3.9, 3.10, 3.11 and 3.12.
9+
`gearpy` runs for Python versions 3.9+.
1010

1111
## Dependencies
1212

13-
- [matplotlib](https://matplotlib.org) >= 3.8.0
13+
- [matplotlib](https://matplotlib.org) >= 3.5
1414
Creates static, animated, and interactive visualizations in Python.
15-
- [numpy](https://numpy.org) >= 1.26.0
15+
- [numpy](https://numpy.org) >= 1.20
1616
Adds support for large, multi-dimensional arrays, matrices and
1717
high-level mathematical functions to operate on these arrays.
18-
- [pandas](https://pandas.pydata.org) >= 2.1.1
18+
- [pandas](https://pandas.pydata.org) >= 1.2
1919
Provides fast, flexible, and expressive data structures designed to
2020
make working with "relational" or "labeled" data both easy and
2121
intuitive.
22-
- [scipy](https://scipy.org) >= 1.11.3
22+
- [scipy](https://scipy.org) >= 1.6, but not 1.11.0
2323
Includes modules for statistics, optimization, integration, linear
2424
algebra, Fourier transforms, signal and image processing, ODE solvers,
2525
and more.

gearpy/powertrain.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,9 @@ def snapshot(self,
442442
data.loc[element.name, f'{variable} ({unit})'] = \
443443
interpolation_function(target_time.to('sec').value).take(0)
444444

445-
data.fillna(value = '', inplace = True)
446-
447445
if print_data:
448446
print(f'Mechanical Powertrain Status at Time = {target_time}')
449-
print(data.to_string())
447+
print(data.astype(float).fillna(value = '').to_string())
450448

451449
return data
452450

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "gearpy"
77
dynamic = ["version"]
8-
requires-python = ">=3.9,<3.13"
8+
requires-python = ">=3.9"
99
dependencies = [
10-
"matplotlib==3.8.0",
11-
"numpy==1.26.0",
12-
"pandas==2.1.1",
13-
"scipy==1.11.3",
10+
"matplotlib>=3.5",
11+
"numpy>=1.20",
12+
"pandas>=1.2",
13+
"scipy>=1.6,!=1.11.0",
1414
]
1515
authors = [
1616
{name = "Andrea Blengino", email = "ing.andrea.blengino@protonmail.com"},
@@ -22,6 +22,7 @@ description = "Python library for mechanical transmission analysis"
2222
readme = "README.rst"
2323
license = { file = "LICENSE" }
2424
classifiers = [
25+
"Development Status :: 5 - Production/Stable",
2526
"Intended Audience :: Education",
2627
"Intended Audience :: Manufacturing",
2728
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ skipsdist = True
55
[testenv]
66
commands =
77
python -m pip install .[test]
8-
python -m pytest --verbose --cov=gearpy --cov-report=html -nauto -m spur_gear
8+
python -m pytest --verbose --cov=gearpy --cov-report=html -nauto
99

1010
[pytest]
1111
python_files = test_*

0 commit comments

Comments
 (0)