Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
juhannc committed Sep 19, 2024
0 parents commit c918415
Show file tree
Hide file tree
Showing 134 changed files with 24,517 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
version: '2'
plugins:
pycodestyle:
enabled: true
config:
max_line_length: 88
sonar-python:
enabled: true
config:
minimum_severity: major
radon:
enabled: true
52 changes: 52 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

# JSON Files
[*.{json,json5,webmanifest}]
indent_size = 2

# YAML Files
[*.{yml,yaml,cff}]
indent_size = 2

# TOML Files
[*.toml]
indent_size = 2

# Markdown Files
[*.{md,mdx}]
indent_size = 2
trim_trailing_whitespace = false

# XML Files
[*.xml]
indent_size = 2

# Makefiles
[Makefile]
indent_style = tab

# Windows batch files
[*.bat]
indent_style = tab
end_of_line = crlf

# License files
[/LICENSES/**]
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
* @juhannc
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Maintain dependencies for Python packages
- package-ecosystem: pip
directory: /
schedule:
interval: monthly

# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
59 changes: 59 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
General:
- changed-files:
- any-glob-to-any-file:
- '*'

GitHub:
- changed-files:
- any-glob-to-any-file:
- .github/**

Workflows:
- changed-files:
- any-glob-to-any-file:
- .github/workflows/**

Dependabot:
- changed-files:
- any-glob-to-any-file:
- .github/dependabot.yml

Labels:
- changed-files:
- any-glob-to-any-file:
- .github/labeler.yml
- .github/workflows/labeler.yml

Documentation:
- changed-files:
- any-glob-to-any-file:
- docs/*
- '**/*.md'

Python:
- changed-files:
- any-glob-to-any-file:
- '**/*.py'
- '**/*.pyi'
- '**/*.pyx'
- pyproject.toml

Tests:
- changed-files:
- any-glob-to-any-file:
- tests/**
- .github/workflows/pytest.yml

Packaging:
- changed-files:
- any-glob-to-any-file:
- pyproject.toml
- VERSION

pre-commit:
- changed-files:
- any-glob-to-any-file:
- .pre-commit-config.yaml
35 changes: 35 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
name: Linting Python code (flake8)

on:
push:
branches:
- main
- develop
- releases/**
pull_request:
branches:
- main
- develop

permissions:
contents: read

jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Lint with flake8
run: |
flake8 pycasx
21 changes: 21 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
name: Pull Request Labeler

on:
pull_request_target:
workflow_dispatch:
schedule:
- cron: 0 1 * * 1

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
sync-labels: true
34 changes: 34 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
name: Static typechecking (mypy)

on:
push:
branches:
- main
- develop
- releases/**
pull_request:
branches:
- main
- develop

permissions:
contents: read

jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Static typechecking with mypy
uses: tsuyoshicho/action-mypy@v4
30 changes: 30 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
name: Running pre-commit (pre-commit)

on:
push:
branches:
- main
- develop
- releases/**
pull_request:
branches:
- main
- develop

permissions:
contents: read

jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Running pre-commit
uses: pre-commit/[email protected]
32 changes: 32 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
name: Python linting (pylint)

on:
push:
branches:
- main
- develop
- releases/**
pull_request:
branches:
- main
- develop

jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Analysing the code with pylint
run: |
pylint --fail-under=9 --output-format=text pycasx
39 changes: 39 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) <https://dlr.de>
#
# SPDX-License-Identifier: MIT
name: Python tests (pytest)

on:
push:
branches:
- main
- develop
- releases/**
pull_request:
branches:
- main
- develop

permissions:
contents: read

jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Test with pytest
run: |
pytest --cov=pycasx/ --cov-report term-missing --junitxml=report.xml tests/
coverage xml
Loading

0 comments on commit c918415

Please sign in to comment.