Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: bubkoo/auto-assign@v1
- uses: bubkoo/auto-assign@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: .github/auto-assign.yml
8 changes: 4 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ coverage:
branches:
- master
- develop
if_ci_failed: error #success, failure, error, ignore
if_ci_failed: error # success, failure, error, ignore
informational: false
only_pulls: false
patch:
patch: # Computes only the changes introduced in the PR
default:
# basic
target: auto
threshold: 1%
threshold: 5%
base: auto
# advanced
branches:
- master
- develop
if_ci_failed: error #success, failure, error, ignore
if_ci_failed: error # success, failure, error, ignore
only_pulls: false
flags:
- "unit"
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,21 @@ jobs:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@main
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[all]
pip install .[tests]
pip install pylint isort flake8 black
- name: Run isort
run: isort --check-only rocketpy/ tests/ docs/ --profile black
- name: Run black
uses: psf/black@stable
with:
options: "--check rocketpy/ tests/ docs/"
jupyter: true
- name: Run flake8
run: flake8 rocketpy/ tests/
- name: Run pylint
pip install pylint ruff
- name: Ruff (lint)
run: ruff check --output-format=github .
- name: Ruff (format)
run: ruff format --check .
- name: Pylint
run: |
pylint rocketpy/ tests/
pylint rocketpy/ tests/ docs/
6 changes: 3 additions & 3 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@main
with:
python-version: "3.9"
- name: Install dependencies
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
8 changes: 2 additions & 6 deletions .github/workflows/test-pytest-slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Scheduled Tests
on:
schedule:
- cron: "0 17 * * 5" # at 05:00 PM, only on Friday
timezone: "America/Sao_Paulo"
push:
branches:
- main
Expand All @@ -22,16 +21,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
fail-fast: false
python-version: [3.9, 3.13]

env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}

Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/test_pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python dependencies
uses: actions/cache@v3
uses: actions/cache@main
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-tests.txt') }}
Expand Down Expand Up @@ -64,20 +64,22 @@ jobs:
run: pytest tests/acceptance --cov=rocketpy --cov-append --cov-report=xml

- name: Upload coverage to artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@main
with:
name: coverage
path: coverage.xml
overwrite: true
if-no-files-found: error

CodecovUpload:
needs: Pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all coverage reports
uses: actions/download-artifact@v3
- uses: actions/checkout@main
- name: Download latest coverage report
uses: actions/download-artifact@main
- name: Upload to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@main
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-to-codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@main
with:
token: ${{ inputs.codecov_token }}
directory: ./coverage/reports/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ coverage.xml
.pytest_cache/
cover/
.pylint-report.txt
.ruff-report.txt

# Translations
*.mo
Expand Down
9 changes: 5 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fail-under=10
#from-stdin=

# Files or directories to be skipped. They should be base names, not paths.
ignore=CVS, docs, data,
ignore=CVS, docs, data,

# Add files or directories matching the regular expressions patterns to the
# ignore-list. The regex matches against paths and can be in Posix or Windows
Expand Down Expand Up @@ -214,7 +214,7 @@ good-names=FlightPhases,
HIRESW_dictionary,
prop_I_11,
Kt, # transformation matrix transposed
clalpha2D,
clalpha2D,
clalpha2D_incompressible,
r_NOZ, # Nozzle position vector
rocket_dry_I_33,
Expand Down Expand Up @@ -475,7 +475,7 @@ disable=raw-checker-failed,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma, # because we have some peniding deprecations in the code.
deprecated-pragma, # because we have some pending deprecations in the code.
use-symbolic-message-instead,
use-implicit-booleaness-not-comparison-to-string,
use-implicit-booleaness-not-comparison-to-zero,
Expand All @@ -492,13 +492,14 @@ disable=raw-checker-failed,
too-many-function-args, # gives false positives for Function calls
method-hidden, # avoids some errors in tank_geometry and flight classes
missing-timeout, # not a problem to use requests without timeout
protected-access, # we use private attriubutes out of the class (maybe we should fix this)
protected-access, # we use private attributes out of the class (maybe we should fix this)
duplicate-code, # repeating code is a bad thing, but should we really care about it?
line-too-long, # black already takes care of this
missing-function-docstring, # this is too verbose.
redefined-outer-name, # too verbose, and doesn't add much value
method-cache-max-size-none,
no-else-raise, # pointless
unnecessary-lambda-assignment, # ruff already checks this



Expand Down
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"bmatrix",
"boldsymbol",
"brentq",
"Bressan",
"bysource",
"Calebe",
"calisto",
Expand Down Expand Up @@ -92,6 +93,7 @@
"disp",
"displaystyle",
"docstrings",
"doctest",
"Doretto",
"dtype",
"dunder",
Expand Down Expand Up @@ -144,6 +146,7 @@
"headlength",
"headwidth",
"hemis",
"Henrique",
"hgtprs",
"hgtsfc",
"HIRESW",
Expand Down Expand Up @@ -187,6 +190,7 @@
"LSODA",
"lvhaack",
"Mandioca",
"Marinho",
"Marte",
"Masatoshi",
"Mateus",
Expand All @@ -205,6 +209,7 @@
"Metrum",
"modindex",
"mult",
"multiprocess",
"Mumma",
"NASADEM",
"nbformat",
Expand Down Expand Up @@ -238,8 +243,11 @@
"prettytable",
"Projeto",
"prometheus",
"pycodestyle",
"pydata",
"pydocstyle",
"pylint",
"pylintrc",
"PYPI",
"pyplot",
"pyproject",
Expand Down Expand Up @@ -272,6 +280,7 @@
"seblm",
"seealso",
"setrail",
"setuptools",
"simplekml",
"SIRGAS",
"Sobol",
Expand Down
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,24 @@ Attention: The newest changes should be on top -->

### Added

-
- ENH: Parallel mode for monte-carlo simulations 2 [#768](https://github.com/RocketPy-Team/RocketPy/pull/768)
- DOC: ASTRA Flight Example [#770](https://github.com/RocketPy-Team/RocketPy/pull/770)
- ENH: Add Eccentricity to Stochastic Simulations [#792](https://github.com/RocketPy-Team/RocketPy/pull/792)
- ENH: Introduce the StochasticAirBrakes class [#785](https://github.com/RocketPy-Team/RocketPy/pull/785)

### Changed

-
- DOCS: reshape docs (closes #659) [#781](https://github.com/RocketPy-Team/RocketPy/pull/781)
- MNT: EmptyMotor class inherits from Motor(ABC) [#779](https://github.com/RocketPy-Team/RocketPy/pull/779)

### Fixed

-
- BUG: do not allow drawing rockets with no aerodynamic surface [#774](https://github.com/RocketPy-Team/RocketPy/pull/774)
- BUG: update flight simulation logic to include burn start time [#778](https://github.com/RocketPy-Team/RocketPy/pull/778)
- BUG: fixes get_instance_attributes for Flight objects containing a Rocket object without rail buttons [#786](https://github.com/RocketPy-Team/RocketPy/pull/786)
- BUG: fixed AGL altitude print for parachutes with lag [#788](https://github.com/RocketPy-Team/RocketPy/pull/788)
- BUG: fix the wind velocity factors usage and better visualization of uniform distributions in Stochastic Classes [#783](https://github.com/RocketPy-Team/RocketPy/pull/783)


## [v1.8.0] - 2025-01-20

Expand Down
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,25 @@ install:
$(PYTHON) -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-optional.txt
pip install -r requirements-tests.txt
pip install -e .

format: isort black
format:
@ruff check --select I --fix rocketpy/ tests/ docs/
@ruff format rocketpy/ tests/ docs/
@echo Ruff formatting completed.

isort:
isort --profile black rocketpy/ tests/ docs/
lint: ruff-lint pylint

black:
black rocketpy/ tests/ docs/

lint: flake8 pylint

flake8:
flake8 rocketpy/ tests/
ruff-lint:
@echo Running ruff check...
@ruff check rocketpy/ tests/ docs/ --output-file=.ruff-report.txt
@echo Ruff report generated at ./.ruff-report.txt

pylint:
-pylint rocketpy/ tests/ --output=.pylint-report.txt
@echo Running pylint check...
@pylint rocketpy/ tests/ docs/ --output=.pylint-report.txt
@echo Pylint report generated at ./.pylint-report.txt

build-docs:
cd docs && $(PYTHON) -m pip install -r requirements.txt && make html
Expand Down
Loading