Skip to content

Commit

Permalink
Merge branch 'develop' into enh/function-savetxt
Browse files Browse the repository at this point in the history
  • Loading branch information
Gui-FernandesBR committed Jan 20, 2024
2 parents e3b468d + a14e7e8 commit 30be2db
Show file tree
Hide file tree
Showing 28 changed files with 76,696 additions and 254 deletions.
20 changes: 0 additions & 20 deletions .github/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,2 @@
# Set to true to add reviewers to PRs
addReviewers: true

# Set to 'author' to add PR's author as a assignee
addAssignees: author

# A list of reviewers to be added to PRs (GitHub user name)
reviewers:
- Gui-FernandesBR
- giovaniceotto
- MateusStano
- phmbressan

# A number of reviewers added to the PR
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0

# A list of keywords to be skipped the process if PR's title include it
skipKeywords:
- wip
- work in progress
- draft
35 changes: 35 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
coverage:
status:
project:
default:
# basic
target: auto
threshold: 1%
base: auto
flags:
- unit
paths:
- "rocketpy"
# advanced settings
branches:
- master
- develop
if_ci_failed: error #success, failure, error, ignore
informational: false
only_pulls: false
patch:
default:
# basic
target: auto
threshold: 1%
base: auto
# advanced
branches:
- master
- develop
if_ci_failed: error #success, failure, error, ignore
only_pulls: false
flags:
- "unit"
paths:
- "rocketpy"
2 changes: 1 addition & 1 deletion .github/workflows/lint_black.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: 3.8

- name: Install Python dependencies
run: pip install black
run: pip install black[jupyter]

- name: Run linters
uses: wearerequired/lint-action@v1
Expand Down
104 changes: 61 additions & 43 deletions .github/workflows/test_pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyTest
name: Tests

on:
pull_request:
Expand All @@ -7,58 +7,76 @@ on:
- "**.py"
- ".github/**"

defaults:
run:
shell: bash

jobs:
fail_if_pr_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-18.04
steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
run: exit 1
pytest_and_doctest:
Pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- 3.8
- 3.12
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.12]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Build RocketPy (without optional dependencies)
run: |
pip install .
- name: Import rocketpy in python and test if it works
run: |
python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')"
- name: Install optional dependencies
run: |
pip install -r requirements-tests.txt
- name: Test with pytest
run: |
pytest --cov=rocketpy --cov-report=xml
cd rocketpy
pytest --doctest-modules --cov=rocketpy --cov-report=xml
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3

- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-tests.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install rocketpy
run: pip install .

- name: Test importing rocketpy
run: python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')"

- name: Install test dependencies
run: pip install -r requirements-tests.txt

- name: Run Unit Tests
run: pytest tests/unit --cov=rocketpy

- name: Run Integration Tests
run: pytest $(find tests -maxdepth 1 -name "*.py") --cov=rocketpy --cov-append

- name: Run Documentation Tests
run: pytest rocketpy --doctest-modules --cov=rocketpy --cov-append

- name: Run Acceptance Tests
run: pytest tests/acceptance --cov=rocketpy --cov-append --cov-report=xml

- name: Run pytest --runslow
if: github.ref == 'refs/heads/master'
run: pytest tests -m slow --runslow --cov=rocketpy --cov-append --cov-report=xml

- name: Upload coverage to artifacts
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage.xml

CodecovUpload:
needs: Pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all coverage reports
uses: actions/download-artifact@v2
- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml, ./rocketpy/coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true
files: |
coverage.xml
29 changes: 29 additions & 0 deletions .github/workflows/upload-to-codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload to Codecov

on:
workflow_call:
inputs:
codecov_token:
required: true
type: string
os:
required: true
type: string
python:
required: true
type: string

jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ inputs.codecov_token }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
files: ./coverage.xml, ./rocketpy/coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ straightforward as possible.
### Added

- ENH: adds new Function.savetxt method [#514](https://github.com/RocketPy-Team/RocketPy/pull/514)
- ENH: Argument for Optional Mutation on Function Discretize [#519](https://github.com/RocketPy-Team/RocketPy/pull/519)

### Changed

Expand All @@ -43,6 +44,10 @@ straightforward as possible.
### Fixed

- ENH: Parachute trigger doesn't work if "Apogee" is used instead of "apogee" [#489](https://github.com/RocketPy-Team/RocketPy/pull/489)
- BUG: fin_flutter_analysis doesn't find any fin set [#510](https://github.com/RocketPy-Team/RocketPy/pull/510)
- FIX: EmptyMotor is breaking the Rocket.draw() method [#516](https://github.com/RocketPy-Team/RocketPy/pull/516)
- BUG: 3D trajectory plot not labeling axes [#533](https://github.com/RocketPy-Team/RocketPy/pull/533)
- BUG: Invalid Arguments on Two Dimensional Discretize. [#521](https://github.com/RocketPy-Team/RocketPy/pull/521)

## [v1.1.4] - 2023-12-07

Expand Down
23 changes: 23 additions & 0 deletions data/juno3/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Rocket Launch
=============
Projeto Jupiter is a rocket design team from the Univ. of São Paulo, Brazil
They launched the rocket `Juno III` at the SACup 2023 (10k Solid SRAD)
The rocket flew at June 23rd, around 17hrs local time.

Data Permission
===============
Juliana Carloni (Projeto Jupiter) shared the data with the RocketPy Team in
2023 right after launch.

Highlights
==========
Apogee registered at Flight Card: `3213 m`
Last simulated apogee before Flight: `3026.054 m`
Flight performance: Only the drogue chute was ejected.

Data
====
3 different datasets are available, from 3 different sources:
- cots_altimeter.csv : This COTS altimeter (RRC3) logged the altitude and pressure.
- cots_GNSS.csv : A log from the COTS GNSS sensor.
- srad_telemetry : SRAD telemetry data logged by the team. This might be noisy.
Loading

0 comments on commit 30be2db

Please sign in to comment.