Skip to content

Commit

Permalink
Mem (1/3): Fix requirements workflow
Browse files Browse the repository at this point in the history
Change abs imports to rel imports. Needed to please pip-missing-reqs.
  • Loading branch information
cjao committed Jul 13, 2023
1 parent c0d2052 commit 4e87c8e
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 40 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,14 @@ jobs:
run: python -m pip install pip-check-reqs

- name: Check extra core requirements
run: pip-extra-reqs -r werkzeug -r python-multipart covalent covalent_dispatcher covalent_ui
run: pip-extra-reqs -r werkzeug covalent covalent_dispatcher covalent_ui

- name: Check missing SDK requirements
run: >
pip-missing-reqs
--ignore-module=covalent_ui.*
--ignore-module=covalent.*
--ignore-module=urllib3.*
--ignore-module=pkg_resources
--ignore-module=covalent/_dispatcher_plugins
--ignore-module=covalent/_shared_files
--ignore-file=covalent/executor/**
--ignore-file=covalent/triggers/**
--ignore-file=covalent/cloud_resource_manager/**
Expand All @@ -64,7 +61,7 @@ jobs:
pip-missing-reqs
--ignore-module=covalent_ui.*
--ignore-module=covalent.*
--ignore-module=covalent_dispatcher.*
--ignore-module=covalent_dispatcher
--ignore-module=distributed.*
covalent_dispatcher
Expand Down
2 changes: 1 addition & 1 deletion covalent/_shared_files/schemas/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from enum import Enum

from covalent._shared_files.util_classes import RESULT_STATUS
from ..util_classes import RESULT_STATUS


class StatusEnum(str, Enum):
Expand Down
3 changes: 1 addition & 2 deletions covalent/_workflow/electron.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
from functools import wraps
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Union

from covalent._dispatcher_plugins.local import LocalDispatcher

from .._dispatcher_plugins.local import LocalDispatcher
from .._file_transfer.enums import Order
from .._file_transfer.file_transfer import FileTransfer
from .._shared_files import logger
Expand Down
3 changes: 2 additions & 1 deletion covalent_dispatcher/_dal/exporters/electron.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
ElectronMetadata,
ElectronSchema,
)
from covalent_dispatcher._dal.electron import ASSET_KEYS, Electron

from ..electron import ASSET_KEYS, Electron

app_log = logger.app_log

Expand Down
2 changes: 1 addition & 1 deletion covalent_dispatcher/_dal/exporters/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

from covalent._shared_files.schemas.asset import AssetSchema
from covalent._shared_files.schemas.lattice import LatticeAssets, LatticeMetadata, LatticeSchema
from covalent_dispatcher._dal.lattice import ASSET_KEYS, METADATA_KEYS, Lattice

from ..lattice import ASSET_KEYS, METADATA_KEYS, Lattice
from .tg import export_transport_graph


Expand Down
4 changes: 2 additions & 2 deletions covalent_dispatcher/_dal/exporters/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
ResultSchema,
)
from covalent._shared_files.utils import format_server_url
from covalent_dispatcher._dal.electron import Electron
from covalent_dispatcher._dal.result import Result, get_result_object

from ..electron import Electron
from ..result import Result, get_result_object
from ..utils.uri_filters import AssetScope, URIFilterPolicy, filter_asset_uri
from .lattice import export_lattice

Expand Down
2 changes: 1 addition & 1 deletion covalent_dispatcher/_dal/exporters/tg.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
from covalent._shared_files.schemas.edge import EdgeMetadata, EdgeSchema
from covalent._shared_files.schemas.electron import ElectronSchema
from covalent._shared_files.schemas.transport_graph import TransportGraphSchema
from covalent_dispatcher._dal.tg import _TransportGraph

from ..tg import _TransportGraph
from .electron import export_electron

app_log = logger.app_log
Expand Down
13 changes: 7 additions & 6 deletions covalent_dispatcher/_dal/importers/electron.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@
ElectronAssets,
ElectronSchema,
)
from covalent_dispatcher._dal.asset import Asset
from covalent_dispatcher._dal.electron import ElectronMeta
from covalent_dispatcher._dal.lattice import Lattice
from covalent_dispatcher._db import models
from covalent_dispatcher._db.write_result_to_db import get_electron_type
from covalent_dispatcher._object_store.base import BaseProvider

from ..._db import models
from ..._db.write_result_to_db import get_electron_type
from ..._object_store.base import BaseProvider
from ..asset import Asset
from ..electron import ElectronMeta
from ..lattice import Lattice

app_log = logger.app_log

Expand Down
7 changes: 4 additions & 3 deletions covalent_dispatcher/_dal/importers/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
LatticeAssets,
LatticeSchema,
)
from covalent_dispatcher._dal.asset import Asset
from covalent_dispatcher._dal.lattice import Lattice
from covalent_dispatcher._object_store.local import BaseProvider

from ..._object_store.local import BaseProvider
from ..asset import Asset
from ..lattice import Lattice


def _get_lattice_meta(lat: LatticeSchema, storage_path) -> dict:
Expand Down
11 changes: 5 additions & 6 deletions covalent_dispatcher/_dal/importers/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@
from covalent._shared_files.schemas.lattice import LatticeSchema
from covalent._shared_files.schemas.result import ResultAssets, ResultSchema
from covalent._shared_files.utils import format_server_url
from covalent_dispatcher._dal.asset import Asset
from covalent_dispatcher._dal.electron import ElectronMeta
from covalent_dispatcher._dal.job import Job
from covalent_dispatcher._dal.result import Result, ResultMeta
from covalent_dispatcher._object_store.local import BaseProvider, local_store

from ..asset import copy_asset_meta
from ..._object_store.local import BaseProvider, local_store
from ..asset import Asset, copy_asset_meta
from ..electron import ElectronMeta
from ..job import Job
from ..result import Result, ResultMeta
from ..tg_ops import TransportGraphOps
from ..utils.uri_filters import AssetScope, URIFilterPolicy, filter_asset_uri
from .lattice import _get_lattice_meta, import_lattice_assets
Expand Down
12 changes: 6 additions & 6 deletions covalent_dispatcher/_dal/importers/tg.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
from covalent._shared_files import logger
from covalent._shared_files.schemas.edge import EdgeSchema
from covalent._shared_files.schemas.transport_graph import TransportGraphSchema
from covalent_dispatcher._dal.edge import ElectronDependency
from covalent_dispatcher._dal.electron import Electron
from covalent_dispatcher._dal.job import Job
from covalent_dispatcher._dal.lattice import Lattice
from covalent_dispatcher._db import models
from covalent_dispatcher._object_store.base import BaseProvider

from ..._db import models
from ..._object_store.base import BaseProvider
from ..edge import ElectronDependency
from ..electron import Electron
from ..job import Job
from ..lattice import Lattice
from .electron import import_electron

app_log = logger.app_log
Expand Down
10 changes: 5 additions & 5 deletions covalent_dispatcher/_db/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
from covalent._shared_files.util_classes import Status
from covalent._workflow.transport import TransportableObject
from covalent._workflow.transport import _TransportGraph as SDKGraph
from covalent_dispatcher._dal.electron import ASSET_KEYS as ELECTRON_ASSETS
from covalent_dispatcher._dal.electron import METADATA_KEYS as ELECTRON_META
from covalent_dispatcher._dal.result import get_result_object
from covalent_dispatcher._dal.tg import _TransportGraph as SRVGraph
from covalent_dispatcher._object_store.local import local_store

from .._dal.electron import ASSET_KEYS as ELECTRON_ASSETS
from .._dal.electron import METADATA_KEYS as ELECTRON_META
from .._dal.result import get_result_object
from .._dal.tg import _TransportGraph as SRVGraph
from .._object_store.local import local_store
from .datastore import workflow_db
from .models import Electron, Lattice

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ furl>=2.1.3
networkx>=2.8.6
psutil>=5.9.0
pydantic>=1.10.1
python-multipart>=0.0.6
python-socketio>=5.7.1
requests>=2.24.0
simplejson>=3.17.6
Expand Down

0 comments on commit 4e87c8e

Please sign in to comment.