Skip to content

Commit

Permalink
chore: upgrade deps (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu authored Jan 6, 2023
1 parent 31013ac commit 5363a5c
Show file tree
Hide file tree
Showing 17 changed files with 190 additions and 64 deletions.
15 changes: 8 additions & 7 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: Bug report
about: Report an error that you've encountered.
labels: 'category: bug'
---

### Environment information

* OS: macOS / linux / win
* Python Version: x.x.x
- OS: macOS / linux / win
- Python Version: x.x.x

If using with `ape`:

* `ape` and plugin versions:
- `ape` and plugin versions:

```sh
$ ape --version
Expand All @@ -20,7 +21,7 @@ $ ape plugins list
# ...copy and paste result of above command here...
```

* Contents of your `ape-config.yaml` (NOTE: do not post anything private like RPC urls or secrets!):
- Contents of your `ape-config.yaml` (NOTE: do not post anything private like RPC urls or secrets!):

```sh
$ cat ape-config.yaml
Expand All @@ -31,9 +32,9 @@ $ cat ape-config.yaml

Please include information like:

* what command you ran
* the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code)
* full output of the error you received
- what command you ran
- the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code)
- full output of the error you received

### How can it be fixed?

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ labels: 'category: feature'

Provide a simple overview of what you wish to see added. Please include:

* What you are trying to do
* Why Ape's current functionality is inadequate to address your goal
- What you are trying to do
- Why Ape's current functionality is inadequate to address your goal

### Specification

Expand Down
18 changes: 13 additions & 5 deletions .github/ISSUE_TEMPLATE/work-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,44 @@ about: New work item for Ape team
---

### Elevator pitch:

<!-- 1-2 line summary of the scope of this work item -->

### Value:

<!--
Who is this for?
Persona or group of people whom will derive value from the scenario.
What benefits will be achieved or business metrics improved?
-->

### Dependencies:

<!-- Call out key people, teams, tech dependencies, or assumptions. -->

### Design approach:

<!--
Free text / diagram / whiteboard picture / etc. that clearly shows your approach and considerations to build the task list.
Existing code patterns in production code base that you will base your work off of.
-->

### Task list:

<!-- Bulleted list describing the exit criteria, desired end state and any documentation, monitors, work for DRI, etc. that will need to be added to make sure someone else can support once it's live. -->
* [ ] Tasks go here

### Estimated completion date:
- [ ] Tasks go here

### Estimated completion date:

### Design review:

<!-- 1-2 people needed for signoff -->

Do not signoff unless:
- 1) agreed the tasks and design approach will achieve acceptance, and
- 2) the work can be completed by one person within the SLA.
Design reviewers should consider simpler approaches to achieve goals.

- 1. agreed the tasks and design approach will achieve acceptance, and
- 2. the work can be completed by one person within the SLA.
Design reviewers should consider simpler approaches to achieve goals.

(Please leave a comment to sign off)
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### What I did

<!-- The `fixes:` field denotes an issue that will be marked resolved by merging this PR -->

fixes: #

### How I did it

### How to verify it

### Checklist

- [ ] Passes all linting checks (pre-commit and CI jobs)
- [ ] New test cases have been added and are passing
- [ ] Documentation has been updated
- [ ] PR title follows [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) standard (will be automatically included in the changelog)
34 changes: 34 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: python

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
25 changes: 25 additions & 0 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on: push

name: Commit Message

# NOTE: Skip check on PR so as not to confuse contributors
# NOTE: Also install a PR title checker so we don't mess up merges
jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install Dependencies
run: pip install .[dev]

- name: Check commit history
run: cz check --rev-range HEAD~1..HEAD
6 changes: 3 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand All @@ -29,7 +29,7 @@ jobs:
run: python build_docs.py

- name: Upload HTML artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: docs/_build/eip712
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/prtitle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Title

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install Dependencies
run: pip install commitizen

- name: Check PR Title
env:
TITLE: ${{ github.event.pull_request.title }}
run: cz check --message "$TITLE"
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ on: ["push", "pull_request"]

name: Test

concurrency:
# Cancel older, in-progress jobs from the same PR, same workflow.
# use run_id if the job is triggered by a push to ensure
# push-triggered jobs to not get canceled.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
linting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand All @@ -22,20 +29,23 @@ jobs:
- name: Run Black
run: black --check .

- name: Run isort
run: isort --check-only .

- name: Run flake8
run: flake8 .

- name: Run isort
run: isort --check-only .
- name: Run mdformat
run: mdformat . --check

type-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand All @@ -56,10 +66,10 @@ jobs:
python-version: [3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -79,10 +89,10 @@ jobs:
# fail-fast: true
#
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
#
# - name: Setup Python
# uses: actions/setup-python@v2
# uses: actions/setup-python@v4
# with:
# python-version: 3.8
#
Expand Down
1 change: 1 addition & 0 deletions .mdformat.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
number = true
18 changes: 12 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.4.0
hooks:
- id: check-yaml

Expand All @@ -10,21 +10,27 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.12.0
hooks:
- id: black
name: black

- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
rev: v0.991
hooks:
- id: mypy
additional_dependencies: [types-setuptools]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
additional_dependencies: [mdformat-gfm, mdformat-frontmatter]

default_language_version:
python: python3.9
python: python3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ See [EIP-712](https://eips.ethereum.org/EIPS/eip-712) for details.

## Dependencies

* [python3](https://www.python.org/downloads) version 3.7.2 or greater, python3-dev
- [python3](https://www.python.org/downloads) version 3.7.2 or greater, python3-dev

## Installation

Expand Down
1 change: 0 additions & 1 deletion docs/userguides/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
```{include} ../../README.md
```

16 changes: 5 additions & 11 deletions eip712/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
try:
from importlib.metadata import PackageNotFoundError as _PackageNotFoundError # type: ignore
from importlib.metadata import version as _version # type: ignore
except ModuleNotFoundError:
from importlib_metadata import PackageNotFoundError as _PackageNotFoundError # type: ignore
from importlib_metadata import version as _version # type: ignore
from .messages import EIP712Message, EIP712Type

try:
__version__ = _version(__name__)
except _PackageNotFoundError:
# package is not installed
__version__ = "<unknown>"
__all__ = [
"EIP712Message",
"EIP712Type",
]
Loading

0 comments on commit 5363a5c

Please sign in to comment.