Skip to content

Commit 9055923

Browse files
Merge pull request #536 from RocketPy-Team/develop
ENH: update master with develop for version 1.2.0
2 parents 1e955ba + 9da1542 commit 9055923

File tree

89 files changed

+83026
-3675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+83026
-3675
lines changed

.github/auto-assign.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,2 @@
1-
# Set to true to add reviewers to PRs
2-
addReviewers: true
3-
41
# Set to 'author' to add PR's author as a assignee
52
addAssignees: author
6-
7-
# A list of reviewers to be added to PRs (GitHub user name)
8-
reviewers:
9-
- Gui-FernandesBR
10-
- giovaniceotto
11-
- MateusStano
12-
- phmbressan
13-
14-
# A number of reviewers added to the PR
15-
# Set 0 to add all the reviewers (default: 0)
16-
numberOfReviewers: 0
17-
18-
# A list of keywords to be skipped the process if PR's title include it
19-
skipKeywords:
20-
- wip
21-
- work in progress
22-
- draft

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- [ ] Tests for the changes have been added (if needed)
1717
- [ ] Docs have been reviewed and added / updated
1818
- [ ] Lint (`black rocketpy/ tests/`) has passed locally
19-
- [ ] All tests (`pytest --runslow`) have passed locally
19+
- [ ] All tests (`pytest tests -m slow --runslow`) have passed locally
2020
- [ ] `CHANGELOG.md` has been updated (if relevant)
2121

2222
## Current behavior

.github/workflows/codecov.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
# basic
6+
target: auto
7+
threshold: 1%
8+
base: auto
9+
flags:
10+
- unit
11+
paths:
12+
- "rocketpy"
13+
# advanced settings
14+
branches:
15+
- master
16+
- develop
17+
if_ci_failed: error #success, failure, error, ignore
18+
informational: false
19+
only_pulls: false
20+
patch:
21+
default:
22+
# basic
23+
target: auto
24+
threshold: 1%
25+
base: auto
26+
# advanced
27+
branches:
28+
- master
29+
- develop
30+
if_ci_failed: error #success, failure, error, ignore
31+
only_pulls: false
32+
flags:
33+
- "unit"
34+
paths:
35+
- "rocketpy"

.github/workflows/lint_black.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
python-version: 3.8
2020

2121
- name: Install Python dependencies
22-
run: pip install black
22+
run: pip install black[jupyter]
2323

2424
- name: Run linters
2525
uses: wearerequired/lint-action@v1

.github/workflows/test_pytest.yaml

Lines changed: 57 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PyTest
1+
name: Tests
22

33
on:
44
pull_request:
@@ -7,58 +7,72 @@ on:
77
- "**.py"
88
- ".github/**"
99

10+
defaults:
11+
run:
12+
shell: bash
13+
1014
jobs:
11-
fail_if_pr_is_draft:
12-
if: github.event.pull_request.draft == true
13-
runs-on: ubuntu-18.04
14-
steps:
15-
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
16-
run: exit 1
17-
pytest_and_doctest:
15+
Pytest:
1816
runs-on: ${{ matrix.os }}
1917
strategy:
2018
matrix:
21-
os:
22-
- ubuntu-latest
23-
- macos-latest
24-
- windows-latest
25-
python-version:
26-
- 3.8
27-
- 3.12
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
python-version: [3.8, 3.12]
2821
env:
2922
OS: ${{ matrix.os }}
3023
PYTHON: ${{ matrix.python-version }}
3124
steps:
32-
- uses: actions/checkout@v2
33-
- name: Set up Python ${{ matrix.python-version }}
25+
- uses: actions/checkout@v4
26+
- name: Set up Python
3427
uses: actions/setup-python@v2
3528
with:
3629
python-version: ${{ matrix.python-version }}
37-
- name: Install dependencies
38-
run: |
39-
python -m pip install --upgrade pip
40-
- name: Build RocketPy (without optional dependencies)
41-
run: |
42-
pip install .
43-
- name: Import rocketpy in python and test if it works
44-
run: |
45-
python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')"
46-
- name: Install optional dependencies
47-
run: |
48-
pip install -r requirements-tests.txt
49-
- name: Test with pytest
50-
run: |
51-
pytest --cov=rocketpy --cov-report=xml
52-
cd rocketpy
53-
pytest --doctest-modules --cov=rocketpy --cov-report=xml
54-
- name: Upload coverage report to Codecov
55-
uses: codecov/codecov-action@v3
30+
31+
- name: Cache Python dependencies
32+
uses: actions/cache@v2
33+
with:
34+
path: ~/.cache/pip
35+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-tests.txt') }}
36+
restore-keys: |
37+
${{ runner.os }}-pip-
38+
39+
- name: Install rocketpy
40+
run: pip install .
41+
42+
- name: Test importing rocketpy
43+
run: python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')"
44+
45+
- name: Install test dependencies
46+
run: pip install -r requirements-tests.txt
47+
48+
- name: Run Unit Tests
49+
run: pytest tests/unit --cov=rocketpy
50+
51+
- name: Run Integration Tests
52+
run: pytest $(find tests -maxdepth 1 -name "*.py") --cov=rocketpy --cov-append
53+
54+
- name: Run Documentation Tests
55+
run: pytest rocketpy --doctest-modules --cov=rocketpy --cov-append
56+
57+
- name: Run Acceptance Tests
58+
run: pytest tests/acceptance --cov=rocketpy --cov-append --cov-report=xml
59+
60+
- name: Upload coverage to artifacts
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: coverage
64+
path: coverage.xml
65+
66+
CodecovUpload:
67+
needs: Pytest
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
- name: Download all coverage reports
72+
uses: actions/download-artifact@v2
73+
- name: Upload to Codecov
74+
uses: codecov/codecov-action@v2
5675
with:
5776
token: ${{ secrets.CODECOV_TOKEN }}
58-
directory: ./coverage/reports/
59-
env_vars: OS,PYTHON
60-
fail_ci_if_error: true
61-
files: ./coverage.xml, ./rocketpy/coverage.xml
62-
flags: unittests
63-
name: codecov-umbrella
64-
verbose: true
77+
files: |
78+
coverage.xml
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Upload to Codecov
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
codecov_token:
7+
required: true
8+
type: string
9+
os:
10+
required: true
11+
type: string
12+
python:
13+
required: true
14+
type: string
15+
16+
jobs:
17+
upload:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Upload coverage report to Codecov
21+
uses: codecov/codecov-action@v3
22+
with:
23+
token: ${{ inputs.codecov_token }}
24+
directory: ./coverage/reports/
25+
env_vars: OS,PYTHON
26+
files: ./coverage.xml, ./rocketpy/coverage.xml
27+
flags: unittests
28+
name: codecov-umbrella
29+
verbose: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ MANIFEST
3636
pip-log.txt
3737
pip-delete-this-directory.txt
3838

39-
# Unit test / coverage reports
39+
# Unit test / coverage reports / lints reports
4040
htmlcov/
4141
.tox/
4242
.nox/
@@ -50,6 +50,7 @@ coverage.xml
5050
.hypothesis/
5151
.pytest_cache/
5252
cover/
53+
.pylint-report.txt
5354

5455
# Translations
5556
*.mo

.pylintrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,31 @@ function-naming-style=snake_case
187187
# Good variable names which should always be accepted, separated by a comma.
188188
good-names=FlightPhases,
189189
WindroseAxes,
190+
barometric_height_ISA,
191+
grain_I_33_initial,
192+
convert_units_Functions,
193+
Ix_volume,
194+
Iy_volume,
195+
Iz_volume,
196+
Kn,
197+
Kn_source,
198+
I_dot,
199+
I_CM,
200+
Rdot,
201+
Dx,
202+
Dy,
203+
Dz,
204+
requires_netCDF4,
205+
I_11_without_motor,
206+
I_22_without_motor,
207+
I_33_without_motor,
208+
I_12_without_motor,
209+
I_13_without_motor,
210+
I_23_without_motor,
211+
HTML,
212+
fin_set_NACA,
213+
fin_set_E473,
214+
HIRESW_dictionary,
190215

191216

192217
# Good variable names regexes, separated by a comma. If names match any regex,
@@ -436,6 +461,7 @@ disable=raw-checker-failed,
436461
no-else-return,
437462
inconsistent-return-statements,
438463
unspecified-encoding,
464+
no-member, # because we use funcify_method decorator
439465

440466
# Enable the message, report, category or checker with the given id(s). You can
441467
# either give multiple identifier separated by comma (,) or put this option

0 commit comments

Comments
 (0)