Skip to content

Commit

Permalink
Sort imports
Browse files Browse the repository at this point in the history
Signed-off-by: Anja Strunk <[email protected]>
  • Loading branch information
anjastrunk committed Apr 11, 2024
1 parent 82073ab commit e032a8f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 60 deletions.
31 changes: 8 additions & 23 deletions generator/common/gx_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,21 @@
from typing import Any, ClassVar, Dict, List, Optional, Union

from jsonasobj2 import JsonObj, as_dict
from linkml_runtime.linkml_model.meta import (
EnumDefinition,
PermissibleValue,
PvFormulaOptions,
)
from linkml_runtime.linkml_model.types import (
Boolean,
Date,
Datetime,
Float,
Integer,
String,
Uri,
)
from linkml_runtime.linkml_model.meta import (EnumDefinition, PermissibleValue,
PvFormulaOptions)
from linkml_runtime.linkml_model.types import (Boolean, Date, Datetime, Float,
Integer, String, Uri)
from linkml_runtime.utils.curienamespace import CurieNamespace
from linkml_runtime.utils.dataclass_extensions_376 import (
dataclasses_init_fn_with_kwargs,
)
from linkml_runtime.utils.dataclass_extensions_376 import \
dataclasses_init_fn_with_kwargs
from linkml_runtime.utils.enumerations import EnumDefinitionImpl
from linkml_runtime.utils.formatutils import camelcase, sfx, underscore
from linkml_runtime.utils.metamodelcore import (URI, Bool, XSDDate,
XSDDateTime, bnode, empty_dict,
empty_list)
from linkml_runtime.utils.slot import Slot
from linkml_runtime.utils.yamlutils import (
YAMLRoot,
extended_float,
extended_int,
extended_str,
)
from linkml_runtime.utils.yamlutils import (YAMLRoot, extended_float,
extended_int, extended_str)
from rdflib import Namespace, URIRef

metamodel_version = "1.7.0"
Expand Down
3 changes: 2 additions & 1 deletion generator/discovery/openstack/openstack_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

from generator.common.config import Config
from generator.common.json_ld import JsonLdObject
from generator.discovery.openstack.server_flavor_discovery import ServerFlavorDiscovery
from generator.discovery.openstack.server_flavor_discovery import \
ServerFlavorDiscovery
from generator.discovery.openstack.vm_images_discovery import VmDiscovery


Expand Down
11 changes: 2 additions & 9 deletions generator/discovery/openstack/server_flavor_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,8 @@
from generator.common.config import Config
from generator.common.gx_schema import CPU
from generator.common.gx_schema import Architectures as CpuArch
from generator.common.gx_schema import (
Disk,
DiskType,
Frequency,
Hypervisor,
HypervisorType,
Memory,
MemorySize,
)
from generator.common.gx_schema import (Disk, DiskType, Frequency, Hypervisor,
HypervisorType, Memory, MemorySize)
from generator.common.gx_schema import ServerFlavor as GX_Flavor
from generator.common.json_ld import JsonLdObject
from generator.vendor.flavor_names import Flavorname, parser_v3
Expand Down
1 change: 0 additions & 1 deletion generator/vendor/flavor_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import yaml


CPUTYPE_KEY = {
"L": "crowded-core",
"V": "shared-core",
Expand Down
2 changes: 1 addition & 1 deletion gx-cred-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
SPDX-License-Identifier: EPL-2.0
"""

import importlib
import getopt
import importlib
import json
import sys
from time import time
Expand Down
34 changes: 10 additions & 24 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,18 @@
from typing import List

import yaml

from openstack.image.v2.image import Image as OS_Image
from openstack.compute.v2.flavor import Flavor as OS_Flavor
from generator.common.config import Config
from openstack.image.v2.image import Image as OS_Image

from generator.common.gx_schema import (
CPU,
GPU,
CheckSum,
CodeArtifact,
Device,
Disk,
Encryption,
GaiaXEntity,
Hypervisor,
Image,
Memory,
OperatingSystem,
Resource,
Signature,
SoftwareResource,
VirtualResource,
VMImage,
ServerFlavor,
InstantiationRequirement
)
from generator.common.config import Config
from generator.common.gx_schema import (CPU, GPU, CheckSum, CodeArtifact,
Device, Disk, Encryption, GaiaXEntity,
Hypervisor, Image,
InstantiationRequirement, Memory,
OperatingSystem, Resource,
ServerFlavor, Signature,
SoftwareResource, VirtualResource,
VMImage)


def get_absolute_path(relative_path: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from unittest.mock import patch

from click.testing import CliRunner
from openstack.image.v2.image import Image as OS_Image
from openstack.compute.v2.flavor import Flavor as OS_Flavor
from openstack.image.v2.image import Image as OS_Image

import cli
from generator.common import const
Expand Down

0 comments on commit e032a8f

Please sign in to comment.