Skip to content

Commit

Permalink
MRG: Merge pull request #14 from AndreaBlengino/dev
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
AndreaBlengino authored Apr 13, 2024
2 parents 74ab936 + f2485c6 commit 682db65
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Powertrain Analysis
:width: 100%

* - PyPI
- |pypi_release| |supported_python_versions| |build|
- |pypi_release| |supported_python_versions| |build| |dependencies|
* - Tests
- |linux_tests| |macos_tests| |windows_tests| |test_coverage|
* - Documentation
Expand All @@ -34,7 +34,11 @@ Powertrain Analysis
:target: https://github.com/AndreaBlengino/gearpy/actions/workflows/release.yml
:alt: Package Build

.. |linux_tests| image:: https://img.shields.io/github/actions/workflow/status/AndreaBlengino/gearpy/linux_test.yml.svg?logo=linux&label=Linux
.. |dependencies| image:: https://dependency-dash.repo-helper.uk/github/AndreaBlengino/gearpy/badge.svg
:target: https://dependency-dash.repo-helper.uk/github/AndreaBlengino/gearpy
:alt: Dependencies Status

.. |linux_tests| image:: https://img.shields.io/github/actions/workflow/status/AndreaBlengino/gearpy/linux_test.yml.svg?logo=linux&logoColor=white&label=Linux
:target: https://github.com/AndreaBlengino/gearpy/actions/workflows/linux_test.yml
:alt: Linux Tests

Expand Down
5 changes: 4 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
project = 'gearpy'
copyright = '2024, Andrea Blengino'
author = 'Andrea Blengino'
release = subprocess.run(['git', 'describe', '--tags'], stdout = subprocess.PIPE).stdout.decode('utf-8').split('-')[0]
release = subprocess.run(['git', 'describe', '--tags'], stdout = subprocess.PIPE).stdout.decode('utf-8')

if not release.startswith('v') or not release.endswith('\n') or '-' in release or release.count('.') != 2:
raise ValueError(f"Invalid release name {release}.")


# -- General configuration ---------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ The recommended installation is through `pip`:
$ pip install gearpy
```

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

## Dependencies

- [matplotlib](https://matplotlib.org) >= 3.8.0
- [matplotlib](https://matplotlib.org) >= 3.5
Creates static, animated, and interactive visualizations in Python.
- [numpy](https://numpy.org) >= 1.26.0
- [numpy](https://numpy.org) >= 1.20
Adds support for large, multi-dimensional arrays, matrices and
high-level mathematical functions to operate on these arrays.
- [pandas](https://pandas.pydata.org) >= 2.1.1
- [pandas](https://pandas.pydata.org) >= 1.2
Provides fast, flexible, and expressive data structures designed to
make working with "relational" or "labeled" data both easy and
intuitive.
- [scipy](https://scipy.org) >= 1.11.3
- [scipy](https://scipy.org) >= 1.6, but not 1.11.0
Includes modules for statistics, optimization, integration, linear
algebra, Fourier transforms, signal and image processing, ODE solvers,
and more.
4 changes: 1 addition & 3 deletions gearpy/powertrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,9 @@ def snapshot(self,
data.loc[element.name, f'{variable} ({unit})'] = \
interpolation_function(target_time.to('sec').value).take(0)

data.fillna(value = '', inplace = True)

if print_data:
print(f'Mechanical Powertrain Status at Time = {target_time}')
print(data.to_string())
print(data.astype(float).fillna(value = '').to_string())

return data

Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ build-backend = "setuptools.build_meta"
[project]
name = "gearpy"
dynamic = ["version"]
requires-python = ">=3.9,<3.13"
requires-python = ">=3.9"
dependencies = [
"matplotlib==3.8.0",
"numpy==1.26.0",
"pandas==2.1.1",
"scipy==1.11.3",
"matplotlib>=3.5",
"numpy>=1.20",
"pandas>=1.2",
"scipy>=1.6,!=1.11.0",
]
authors = [
{name = "Andrea Blengino", email = "[email protected]"},
Expand All @@ -22,6 +22,7 @@ description = "Python library for mechanical transmission analysis"
readme = "README.rst"
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Intended Audience :: Manufacturing",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ skipsdist = True
[testenv]
commands =
python -m pip install .[test]
python -m pytest --verbose --cov=gearpy --cov-report=html -nauto -m spur_gear
python -m pytest --verbose --cov=gearpy --cov-report=html -nauto

[pytest]
python_files = test_*
Expand Down

0 comments on commit 682db65

Please sign in to comment.