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
36 changes: 18 additions & 18 deletions .github/workflows/publish-pypi-package.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: Publish Pypi Package

on:
push:
tags:
- '*'
push:
tags:
- '*'

jobs:
package:
runs-on: ubuntu-latest
name: Publish Pypi Package
package:
runs-on: ubuntu-latest
name: Publish Pypi Package

steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build binary wheel and a source tarball
run: python setup.py sdist
- name: Build binary wheel and a source tarball
run: python setup.py sdist

- name: Publish Package to Pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish Package to Pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
106 changes: 53 additions & 53 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
name: Flag Engine Pull Request

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- release**
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- release**

jobs:
test:
runs-on: ubuntu-latest
name: Flag engine Unit tests

strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10']

steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- 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 -r requirements.txt -r requirements-dev.txt

- name: Check Formatting
run: black --check .

- name: Check Imports
run: |
git ls-files | grep '\.py$' | xargs absolufy-imports
isort . --check

- name: Check flake8 linting
run: flake8 .

- name: Check Typing
run: mypy --strict .

- name: Run Tests
run: pytest -p no:warnings

- name: Check Coverage
uses: 5monkeys/cobertura-action@v14
with:
minimum_coverage: 100
fail_below_threshold: true
test:
runs-on: ubuntu-latest
name: Flag engine Unit tests

strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10']

steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- 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 -r requirements.txt -r requirements-dev.txt

- name: Check Formatting
run: black --check .

- name: Check Imports
run: |
git ls-files | grep '\.py$' | xargs absolufy-imports
isort . --check

- name: Check flake8 linting
run: flake8 .

- name: Check Typing
run: mypy --strict .

- name: Run Tests
run: pytest -p no:warnings

- name: Check Coverage
uses: 5monkeys/cobertura-action@v14
with:
minimum_coverage: 100
fail_below_threshold: true
69 changes: 34 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
args: [--strict]
additional_dependencies:
[pydantic, pytest, pytest_mock, types-pytest-lazy-fixture, types-setuptools, semver]
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3
exclude: migrations
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
name: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
args: [--strict]
additional_dependencies: [pydantic, pytest, pytest_mock, types-pytest-lazy-fixture, types-setuptools, semver]
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3
exclude: migrations
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
name: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
26 changes: 13 additions & 13 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"proseWrap": "always",
"singleQuote": true,
"printWidth": 120,
"trailingComma": "all",
"tabWidth": 4,
"overrides": [
{
"files": "*.md",
"options": {
"tabWidth": 1
}
}
]
"proseWrap": "always",
"singleQuote": true,
"printWidth": 120,
"trailingComma": "all",
"tabWidth": 2,
"overrides": [
{
"files": "*.md",
"options": {
"tabWidth": 1
}
}
]
}