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
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ authors = [
]
dependencies = [
"geojson==2.5.0",
"httpx",
"httpx==0.28.1",
"graphql-core==3.2.8",
"pydantic",
"pydantic_core",
Expand All @@ -46,6 +46,7 @@ Homepage = "https://zepben.com"
test = [
"pytest",
"pytest-cov",
"pytest-asyncio",
"pytest-httpserver==1.0.8",
"trustme==0.9.0"
]
Expand All @@ -67,5 +68,6 @@ introspection_input_value_deprecations=true
plugins=[
"zepben.eas.lib.ariadne_plugins.custom_query_type_hinter.CustomQueryTypeHinterPlugin",
"zepben.eas.lib.ariadne_plugins.missed_import_checker.MissedImportCheckerPlugin",
"zepben.eas.lib.ariadne_plugins.gql_all_fields.GqlAllFieldsPlugin"
"zepben.eas.lib.ariadne_plugins.gql_all_fields.GqlAllFieldsPlugin",
"zepben.eas.lib.ariadne_plugins.license_headers.LicenseHeadersPlugin",
]
33 changes: 33 additions & 0 deletions src/zepben/eas/lib/ariadne_plugins/license_headers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from datetime import datetime
from typing import Optional

from ariadne_codegen import Plugin

now = datetime.now()

#
# NOTE: Being dodgy due to amount of time already spent. Ideally this would read and process the `.idea/copyright` files
# so we only need to update the licence in one place. Given this is unlikely to change, this can be done if we ever
# decide to change it in the future.
#
license = f"""# Copyright {now.year} Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""

class LicenseHeadersPlugin(Plugin):

def get_file_comment(
self, comment: str, code: str, source: Optional[str] = None
) -> str:
return f"{license}{comment}"

def copy_code(self, copied_code: str) -> str:
return f"{license}\n\n{copied_code}"
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from .async_base_client import AsyncBaseClient
from .base_model import BaseModel, Upload
from .client import Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


import asyncio
import enum
import json
Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/base_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from io import IOBase
from pydantic import BaseModel as PydanticBaseModel
from pydantic import ConfigDict
Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/base_operation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from typing import Any, Optional, Union
from graphql import ArgumentNode, FieldNode, InlineFragmentNode, NamedTypeNode, NameNode, SelectionSetNode, VariableNode

Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from typing import Any

from graphql import (
Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/custom_fields.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from typing import Any, Optional, Union

from .base_operation import GraphQLField
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from typing import Any, Optional

from .custom_fields import (
Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/custom_queries.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from typing import Any, Optional

from .custom_fields import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from .base_operation import GraphQLField


Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/enums.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from enum import Enum


Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from typing import Any, Optional, Union
import httpx

Expand Down
7 changes: 7 additions & 0 deletions src/zepben/eas/lib/generated_graphql_client/input_types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright 2026 Zeppelin Bend Pty Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.


from typing import Any, Optional

from pydantic import Field
Expand Down
Loading