Skip to content

Commit c70e8a7

Browse files
committed
Adapt the moved code
1 parent 9382147 commit c70e8a7

14 files changed

+179
-11
lines changed

Diff for: python/hopsworks/core/environment_api.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2024 Hopsworks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.core.environment_api import (
18+
EnvironmentApi,
19+
)
20+
21+
22+
__all__ = [
23+
EnvironmentApi,
24+
]

Diff for: python/hopsworks/core/library_api.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2024 Hopsworks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.core.library_api import (
18+
LibraryApi,
19+
)
20+
21+
22+
__all__ = [
23+
LibraryApi,
24+
]

Diff for: python/hopsworks/engine/environment_engine.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2024 Hopsworks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.engine.environment_engine import (
18+
EnvironmentEngine,
19+
)
20+
21+
22+
__all__ = [
23+
EnvironmentEngine,
24+
]

Diff for: python/hopsworks/environment.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2024 Hopsworks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.environment import (
18+
Environment,
19+
)
20+
21+
22+
__all__ = [
23+
Environment,
24+
]

Diff for: python/hopsworks/job_schedule.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2024 Hopsworks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.job_schedule import (
18+
JobSchedule,
19+
)
20+
21+
22+
__all__ = [
23+
JobSchedule,
24+
]

Diff for: python/hopsworks/library.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2024 Hopsworks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.library import (
18+
Library,
19+
)
20+
21+
22+
__all__ = [
23+
Library,
24+
]

Diff for: python/hopsworks/user.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2022 Logical Clocks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.user import (
18+
User,
19+
)
20+
21+
22+
__all__ = [
23+
User,
24+
]

Diff for: python/hopsworks_common/core/environment_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import json
1818
from typing import List, Optional
1919

20-
from hopsworks import client, environment
21-
from hopsworks.engine import environment_engine
20+
from hopsworks_common import client, environment
21+
from hopsworks_common.engine import environment_engine
2222

2323

2424
class EnvironmentApi:

Diff for: python/hopsworks_common/core/library_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import json
1818

19-
from hopsworks import client, library
19+
from hopsworks_common import client, library
2020

2121

2222
class LibraryApi:

Diff for: python/hopsworks_common/engine/environment_engine.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
import time
1818

19-
from hopsworks import client, command, environment, library
20-
from hopsworks.client.exceptions import EnvironmentException, RestAPIError
19+
from hopsworks_common import client, command, environment, library
20+
from hopsworks_common.client.exceptions import EnvironmentException, RestAPIError
2121

2222

2323
class EnvironmentEngine:

Diff for: python/hopsworks_common/environment.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
from typing import Optional
1919

2020
import humps
21-
from hopsworks import command, util
22-
from hopsworks.core import environment_api, library_api
23-
from hopsworks.engine import environment_engine
21+
from hopsworks_common import command, util
22+
from hopsworks_common.core import environment_api, library_api
23+
from hopsworks_common.engine import environment_engine
2424

2525

2626
class Environment:

Diff for: python/hopsworks_common/job_schedule.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from datetime import datetime, timezone
1919

2020
import humps
21-
from hopsworks import util
21+
from hopsworks_common import util
2222

2323

2424
class JobSchedule:

Diff for: python/hopsworks_common/library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616

1717
import humps
18-
from hopsworks import command
18+
from hopsworks_common import command
1919

2020

2121
class Library:

Diff for: python/hopsworks_common/user.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import json
1818

1919
import humps
20-
from hopsworks import util
20+
from hopsworks_common import util
2121

2222

2323
class User:

0 commit comments

Comments
 (0)