Skip to content

Commit

Permalink
adds pyproject
Browse files Browse the repository at this point in the history
removes setup.py

fixes pyproject typo

sets max line to 88 columns

Fix code style issues with Black

Revert to c955e81

addresses review comments

fixes optional dependencies

migrates flake and unit test rules to pyproject toml

addresses review comments
  • Loading branch information
GabrielBarberini committed Apr 28, 2024
1 parent 9a8e0c1 commit 2ac512c
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 10 deletions.
4 changes: 0 additions & 4 deletions .coveragerc

This file was deleted.

5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- DOC: Convert CompareFlights example notebooks to .rst files [#576](https://github.com/RocketPy-Team/RocketPy/pull/576)
- MNT: Refactor inertia calculations using parallel axis theorem [#573] (https://github.com/RocketPy-Team/RocketPy/pull/573)
- ENH: Optional argument to show the plot in Function.compare_plots [#563](https://github.com/RocketPy-Team/RocketPy/pull/563)
- BLD: Change setup.py to pyproject.toml [#589](https://github.com/RocketPy-Team/RocketPy/pull/589)

### Fixed

Expand Down
72 changes: 72 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[project]
name = "rocketpy"
version = "1.2.2"
description="Advanced 6-DOF trajectory simulation for High-Power Rocketry."
dynamic = ["dependencies"]
readme = "README.md"
requires-python = ">=3.8"
authors = [
{name = "Giovani Hidalgo Ceotto", email = "ghceotto@gmail.com"}
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Rocket Flight Simulation :: Libraries :: Python Modules",
]

[project.urls]
homepage = "https://rocketpy.org/"
documentation = "https://docs.rocketpy.org/"
repository = "https://github.com/RocketPy-Team/RocketPy"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
py-modules = ['rocketpy']

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }

[project.optional-dependencies]
tests = [
"pytest",
"pytest-coverage",
"black[jupyter]",
"flake8-black",
"flake8-pyproject",
"pandas",
"numericalunits==1.25",
"pylint",
"isort"
]

env_analysis = [
"windrose>=1.6.8",
"timezonefinder",
"jsonpickle",
"ipython",
"ipywidgets>=7.6.3"
]

[tool.black]
line-length = 88
include = '\.py$|\.ipynb$'
skip-string-normalization = true

[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
#Don't complain about exceptions or warnings not being covered by tests
"warnings.warn*"
]

[tool.flake8]
max-line-length = 88
max-module-lines = 3000
ignore = ['E203', 'W503']
exclude = [
'.git,__pycache__',
]
3 changes: 2 additions & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ pytest
pytest-coverage
black[jupyter]
flake8-black
flake8-pyproject
pandas
numericalunits==1.25
pylint
isort
isort

0 comments on commit 2ac512c

Please sign in to comment.