Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer committed Jun 16, 2023
1 parent 88d776d commit 3b905d1
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 44 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,16 @@ name: blacken
on: [pull_request]
jobs:
build:
name: Auto Format
name: Check Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v3
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Black
run: pip install black
- name: Run black --check .
run: black --check .
- name: If needed, commit black changes to the pull request
if: failure()
run: |
black .
git config --global user.name 'autoblack'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout $GITHUB_HEAD_REF
git commit -am "fixup: Format Python code with Black"
git push
python-version: '3.10'
- name: Install Black & isort
run: pip install --upgrade black isort pymmh3
- name: Run black
run: black --check .
6 changes: 3 additions & 3 deletions .github/workflows/maintainability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set Up Environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install Requirements
run: pip install -r $GITHUB_WORKSPACE/requirements.txt
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: check out
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: set up
uses: actions/setup-python@v2
- name: Set Up Environment
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install build
run: pip install build
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/regression_suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set Up Environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install Requirements
run: |
Expand All @@ -37,12 +37,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set Up Environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install Requirements
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: trufflehog-actions-scan
uses: edplato/trufflehog-actions-scan@master
Expand All @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: fides-scanner
uses: joocer/fides@master
56 changes: 49 additions & 7 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,70 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set Up Environment
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install --upgrade bandit
- name: Execute Test
run: bandit -r data_expectations
run: bandit -r mabel

semgrep:
runs-on: ubuntu-latest
name: SemGrep
steps:
- uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v3
- name: Semgrep
id: semgrep
uses: returntocorp/semgrep-action@v1
with:
config: p/r2c

mypy:
name: Type Checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set Up Environment
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Requirements
run: |
python -m pip install --upgrade pip mypy
pip install -r $GITHUB_WORKSPACE/tests/requirements.txt
- name: Execute Test
run: mypy --ignore-missing-imports --python-version 3.10 --no-strict-optional --check-untyped-defs opteryx

perflint:
name: PyLint and PerfLint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set Up Environment
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Requirements
run: |
python -m pip install --upgrade pip pylint perflint
pip install -r $GITHUB_WORKSPACE/requirements.txt
pip install -r $GITHUB_WORKSPACE/tests/requirements.txt
- name: Execute Test
run: pylint --fail-under=8 --load-plugins perflint opteryx
2 changes: 1 addition & 1 deletion data_expectations/internals/expectations.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
try:
# added 3.9
from functools import cache
except ImportError:
except ImportError: # pragma: no cover
from functools import lru_cache

cache = lru_cache(1)
Expand Down
2 changes: 1 addition & 1 deletion data_expectations/internals/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
try:
# added 3.9
from functools import cache
except ImportError:
except ImportError: # pragma: no cover
from functools import lru_cache

cache = lru_cache(1)
Expand Down

0 comments on commit 3b905d1

Please sign in to comment.