Skip to content

Commit

Permalink
Merge branch 'main' into 42-implement-e4edm-validate
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui committed Dec 17, 2024
2 parents 7e0e9fb + 3810a02 commit e09c335
Show file tree
Hide file tree
Showing 20 changed files with 1,730 additions and 133 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build.yml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ name: Pylint
on: [push]

jobs:
build:
pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pylint pytest
pip install .
python -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry install
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
python -m pylint $(git ls-files '*.py')
23 changes: 12 additions & 11 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,31 @@ name: pytest
on: [push, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
test:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip pytest coverage
python -m pip install .
python -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry install
- name: Test
run: |
coverage run --branch -m pytest tests/
- name: Generate Report
run: |
coverage html
- name: Upload report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-report
name: coverage-report-${{ matrix.os }}
path: |
htmlcov/*
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Semantic Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASER }}


- name: Python Semantic Release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.RELEASER }}
root_options: "-vv"
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ min-public-methods=2
[EXCEPTIONS]

# Exceptions that will emit a warning when caught.
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception


[FORMAT]
Expand Down
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"njpwerner.autodocstring",
"ms-python.autopep8",
"ms-python.isort",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.python",
"ms-python.debugpy"
]
}
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"editor.rulers": [
100
],
"python.testing.pytestEnabled": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
"editor.formatOnType": true
}
Loading

0 comments on commit e09c335

Please sign in to comment.