Skip to content

Commit

Permalink
Upgrade github actions versions, default python and dev dependencies (g…
Browse files Browse the repository at this point in the history
…raphql-python#1407)

* Use Python 3.10 for deployments on PyPi

* Update gh-action-pypi-publish version

* Update python version

* Update checkout and setup-python versions

* Upgrade dev dependencies

* fromat examples and few files to follow black new version

* Upgrade pytest version

---------

Co-authored-by: Firas Kafri <firaskafri@Firass-MacBook-Pro-2.local>
  • Loading branch information
2 people authored and superlevure committed Jul 19, 2023
1 parent 0d6da4f commit 43d920c
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 38 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- name: Build wheel and source tarball
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1.1.0
uses: pypa/gh-action-pypi-publish@v1.8.6
with:
user: __token__
password: ${{ secrets.pypi_password }}
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
- django: "3.2"
python-version: "3.7"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
default_language_version:
python: python3.9
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-json
Expand All @@ -16,15 +16,15 @@ repos:
- id: trailing-whitespace
exclude: README.md
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.0
rev: v3.3.2
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("ingredients", "0001_initial"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("ingredients", "0002_auto_20161104_0050"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("recipes", "0001_initial"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("recipes", "0002_auto_20161104_0106"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("ingredients", "0001_initial"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("recipes", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion graphene_django/filter/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class Query(graphene.ObjectType):
events = DjangoFilterConnectionField(EventType)

def resolve_events(self, info, **kwargs):

events = [
Event(name="Live Show", tags=["concert", "music", "rock"]),
Event(name="Musical", tags=["movie", "music"]),
Expand Down
2 changes: 0 additions & 2 deletions graphene_django/forms/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class Meta:
def __init_subclass_with_meta__(
cls, form_class=None, only_fields=(), exclude_fields=(), **options
):

if not form_class:
raise Exception("form_class is required for DjangoFormMutation")

Expand Down Expand Up @@ -129,7 +128,6 @@ def __init_subclass_with_meta__(
exclude_fields=(),
**options,
):

if not form_class:
raise Exception("form_class is required for DjangoModelFormMutation")

Expand Down
1 change: 0 additions & 1 deletion graphene_django/rest_framework/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def __init_subclass_with_meta__(
_meta=None,
**options
):

if not serializer_class:
raise Exception("serializer_class is required for the SerializerMutation")

Expand Down
1 change: 0 additions & 1 deletion graphene_django/tests/schema_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class QueryRoot(ObjectType):

thrower = graphene.String(required=True)
request = graphene.String(required=True)
test = graphene.String(who=graphene.String())
Expand Down
2 changes: 0 additions & 2 deletions graphene_django/tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,6 @@ def resolve_all_reporters(self, info, **args):


def test_should_query_connectionfields_with_last():

r = Reporter.objects.create(
first_name="John", last_name="Doe", email="johndoe@example.com", a_choice=1
)
Expand Down Expand Up @@ -818,7 +817,6 @@ def resolve_all_reporters(self, info, **args):


def test_should_query_connectionfields_with_manager():

r = Reporter.objects.create(
first_name="John", last_name="Doe", email="johndoe@example.com", a_choice=1
)
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


tests_require = [
"pytest>=7.1.3",
"pytest>=7.3.1",
"pytest-cov",
"pytest-random-order",
"coveralls",
Expand All @@ -26,10 +26,10 @@


dev_requires = [
"black==22.8.0",
"flake8==5.0.4",
"flake8-black==0.3.3",
"flake8-bugbear==22.9.11",
"black==23.3.0",
"flake8==6.0.0",
"flake8-black==0.3.6",
"flake8-bugbear==23.3.23",
"pre-commit",
] + tests_require

Expand Down

0 comments on commit 43d920c

Please sign in to comment.