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
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
**Why is this PR necessary, what does it do?**

<!--
IMPORTANT! Explain the **motivation** for making this change: what existing
problem the pull request solves or what new features it implements.
-->

**Checklist (complete all items)**:

- [ ] Added tests as necessary.
- [ ] There is no breaking change for existing features.

**References:**

<!-- (Nice to have)
Link tasks, issues, PRs that are related to this pull request, etc.
-->

No references to be shared.

**Notes:**

<!-- (Optional)
Explain some changes that can be useful when reviewing this pull request.
-->

No notes to be shared.
34 changes: 24 additions & 10 deletions .github/workflows/node-package.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
push:
branches:
- main
paths:
- 'nodejs/**'
- '.github/workflows/node-package.yml'
pull_request:
paths:
- 'nodejs/**'
- '.github/workflows/node-package.yml'
schedule:
- cron: '0 0 */7 * *'
- cron: '0 0 */7 * *'
workflow_dispatch:

defaults:
run:
working-directory: ./nodejs
run:
working-directory: ./nodejs

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['18.x', '20.x', '22.x']
steps:
- uses: actions/checkout@v3
- name: Set up NodeJS ${{ matrix.python-version }}
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Set up NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npm run test:types
- name: Test package
run: npm test
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: cd nodejs && npm test
57 changes: 36 additions & 21 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python Package

on:
push:
branches:
- main
paths:
- 'python/**'
- '.github/workflows/python-package.yml'
pull_request:
paths:
- 'python/**'
- '.github/workflows/python-package.yml'
schedule:
- cron: '0 0 */7 * *'
- cron: '0 0 */7 * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r python/requirements.txt
- name: Test with pytest
run: |
cd python
pytest tests -vv -s
- name: Install package
run: |
pip install FlightRadar24
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e "./python[tests]"
pip install flake8 mypy build
- name: Lint
run: cd python && python -m flake8 FlightRadar24 tests
- name: Type check
run: cd python && python -m mypy FlightRadar24 --ignore-missing-imports
- name: Test with pytest
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: cd python && pytest tests -vv -s
- name: Build and verify install
run: |
python -m build ./python
pip install python/dist/*.whl --force-reinstall
python -c "from FlightRadar24 import FlightRadar24API; api = FlightRadar24API(); print('Install OK')"
32 changes: 27 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
# Python
__pycache__
dist
*.pytest_cache
*.egg-info
.idea/
*.pyc
*.pyo
*.pyd
*.so
dist/
build/
*.egg-info/
.eggs/
.venv/
venv/
.mypy_cache/
.pytest_cache/
htmlcov/
.coverage
coverage.xml

# Node.js
node_modules/

# Editors / OS
.idea/
.vscode/
.DS_Store
Thumbs.db

# Misc
.env
.cache
.cache
*.log
2 changes: 1 addition & 1 deletion nodejs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ecmaVersion": "latest"
},
"rules": {
"max-len": ["error", {"code": 130}],
"max-len": ["error", {"code": 130, "ignoreStrings": true, "ignoreTemplateLiterals": true}],
"quotes": ["warn", "double"],
"indent": ["warn", 4],
"brace-style": ["warn", "stroustrup"],
Expand Down
Loading
Loading