Skip to content

Commit

Permalink
Merge branch 'main' into catchup-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLua authored Dec 3, 2024
2 parents 07523b7 + 5ae1df1 commit b15a6ad
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 600 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"extensions": [
"ms-python.python",
"ms-python.pylint",
"ms-python.black-formatter"
"ms-python.black-formatter",
"ms-python.mypy-type-checker"
]
}
}
Expand Down
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203,E701
16 changes: 12 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,35 @@ on:

jobs:
build:
name: Build
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip pylint black mypy
pip install -r requirements.txt
- name: Analysing the code with pylint
- name: Run Pylint
run: |
pylint $(git ls-files '*.py')
- name: Format the code with black
- name: Run Black
run: |
black $(git ls-files '*.py') --check
- name: Type checking with mypy
- name: Run Mypy
run: |
mypy $(git ls-files '*.py')
30 changes: 9 additions & 21 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,25 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
# packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency review'
name: Dependency Review

on:
pull_request:
branches: [ "main" ]
branches:
- 'main'

# If using a dependency submission action in this workflow this permission will need to be set to:
#
# permissions:
# contents: write
#
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
permissions:
contents: read
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
pull-requests: write

jobs:
dependency-review:
name: Review
runs-on: ubuntu-latest

steps:
- name: 'Checkout repository'
- name: Checkout repository
uses: actions/checkout@v4
- name: 'Dependency Review'

- name: Run dependency review
uses: actions/dependency-review-action@v4
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
with:
comment-summary-in-pr: always
deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ permissions:

jobs:
release-build:
name: Build and upload release distributions
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

Expand All @@ -31,9 +34,7 @@ jobs:
path: dist/

pypi-publish:
name: >-
Publish to PyPI
name: Publish to PyPI
runs-on: ubuntu-latest

needs:
Expand All @@ -57,9 +58,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1

testpypi-publish:
name: >-
Publish to TestPyPI
name: Publish to TestPyPI
runs-on: ubuntu-latest

needs:
Expand Down
Loading

0 comments on commit b15a6ad

Please sign in to comment.