codeocean 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codeocean-0.1.3 → codeocean-0.1.4}/CHANGELOG.md +4 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/PKG-INFO +4 -4
- {codeocean-0.1.3 → codeocean-0.1.4}/pyproject.toml +11 -4
- {codeocean-0.1.3 → codeocean-0.1.4}/src/codeocean/capsule.py +3 -1
- {codeocean-0.1.3 → codeocean-0.1.4}/src/codeocean/components.py +4 -1
- {codeocean-0.1.3 → codeocean-0.1.4}/src/codeocean/computation.py +4 -1
- {codeocean-0.1.3 → codeocean-0.1.4}/src/codeocean/data_asset.py +3 -1
- codeocean-0.1.4/src/codeocean/enum.py +6 -0
- codeocean-0.1.4/tests/__init__.py +0 -0
- codeocean-0.1.4/tests/test_package.py +23 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/.flake8 +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/.gitignore +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/LICENSE +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/README.md +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/examples/create_data_asset.py +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/examples/run_capsule.py +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/examples/run_pipeline.py +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/src/codeocean/__init__.py +0 -0
- {codeocean-0.1.3 → codeocean-0.1.4}/src/codeocean/client.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: codeocean
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Code Ocean Python SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/codeocean/codeocean-sdk-python
|
|
6
6
|
Project-URL: Issues, https://github.com/codeocean/codeocean-sdk-python/issues
|
|
@@ -11,15 +11,15 @@ License-File: LICENSE
|
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Requires-Dist: backports-strenum>=1.3.1; python_version < '3.11'
|
|
15
16
|
Requires-Dist: dataclasses
|
|
16
17
|
Requires-Dist: dataclasses-json
|
|
17
18
|
Requires-Dist: requests
|
|
18
19
|
Requires-Dist: requests-toolbelt
|
|
19
20
|
Provides-Extra: dev
|
|
20
21
|
Requires-Dist: flake8; extra == 'dev'
|
|
21
|
-
|
|
22
|
-
Requires-Dist: hatch; extra == 'publish'
|
|
22
|
+
Requires-Dist: hatch; extra == 'dev'
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
|
|
25
25
|

|
|
@@ -4,13 +4,13 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codeocean"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.4"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Code Ocean", email="dev@codeocean.com" },
|
|
10
10
|
]
|
|
11
11
|
description = "Code Ocean Python SDK"
|
|
12
12
|
readme = "README.md"
|
|
13
|
-
requires-python = ">=3.
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
14
|
classifiers = [
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
16
|
"License :: OSI Approved :: MIT License",
|
|
@@ -21,12 +21,12 @@ dependencies = [
|
|
|
21
21
|
"dataclasses_json",
|
|
22
22
|
"requests",
|
|
23
23
|
"requests_toolbelt",
|
|
24
|
+
"backports.strenum>=1.3.1; python_version<'3.11'",
|
|
24
25
|
]
|
|
25
26
|
license = "MIT"
|
|
26
27
|
|
|
27
28
|
[project.optional-dependencies]
|
|
28
|
-
dev = ["flake8"]
|
|
29
|
-
publish = ["hatch"]
|
|
29
|
+
dev = ["flake8", "hatch"]
|
|
30
30
|
|
|
31
31
|
[project.urls]
|
|
32
32
|
Homepage = "https://github.com/codeocean/codeocean-sdk-python"
|
|
@@ -45,3 +45,10 @@ exclude = [
|
|
|
45
45
|
|
|
46
46
|
[tool.hatch.build.targets.wheel]
|
|
47
47
|
packages = ["src/codeocean"]
|
|
48
|
+
|
|
49
|
+
[tool.hatch.envs.default.scripts]
|
|
50
|
+
lint = "flake8 src tests examples"
|
|
51
|
+
test = "python -m unittest -v"
|
|
52
|
+
|
|
53
|
+
[[tool.hatch.envs.test.matrix]]
|
|
54
|
+
python = ["3.9", "3.10", "3.11", "3.12"]
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from dataclasses import dataclass
|
|
2
4
|
from dataclasses_json import dataclass_json
|
|
3
|
-
from enum import StrEnum
|
|
4
5
|
from typing import Optional
|
|
5
6
|
from requests_toolbelt.sessions import BaseUrlSession
|
|
6
7
|
|
|
7
8
|
from codeocean.computation import Computation
|
|
8
9
|
from codeocean.data_asset import DataAssetAttachParams, DataAssetAttachResults
|
|
10
|
+
from codeocean.enum import StrEnum
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
class CapsuleStatus(StrEnum):
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from dataclasses_json import dataclass_json
|
|
2
4
|
from dataclasses import dataclass
|
|
3
|
-
from enum import StrEnum
|
|
4
5
|
from typing import Optional
|
|
5
6
|
|
|
7
|
+
from codeocean.enum import StrEnum
|
|
8
|
+
|
|
6
9
|
|
|
7
10
|
class UserRole(StrEnum):
|
|
8
11
|
Owner = "owner"
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from dataclasses import dataclass
|
|
2
4
|
from dataclasses_json import dataclass_json
|
|
3
|
-
from enum import StrEnum
|
|
4
5
|
from requests_toolbelt.sessions import BaseUrlSession
|
|
5
6
|
from typing import Optional
|
|
6
7
|
from time import sleep
|
|
7
8
|
|
|
9
|
+
from codeocean.enum import StrEnum
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
class ComputationState(StrEnum):
|
|
10
13
|
Initializing = "initializing"
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from dataclasses_json import dataclass_json
|
|
2
4
|
from dataclasses import dataclass
|
|
3
|
-
from enum import StrEnum
|
|
4
5
|
from requests_toolbelt.sessions import BaseUrlSession
|
|
5
6
|
from time import sleep
|
|
6
7
|
from typing import Optional
|
|
7
8
|
|
|
8
9
|
from codeocean.components import SortOrder, SearchFilter, Permissions
|
|
9
10
|
from codeocean.computation import PipelineProcess, Param
|
|
11
|
+
from codeocean.enum import StrEnum
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
class DataAssetType(StrEnum):
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import unittest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class TestPackage(unittest.TestCase):
|
|
6
|
+
def test_import_package(self):
|
|
7
|
+
import codeocean # noqa
|
|
8
|
+
|
|
9
|
+
def test_strenum_install(self):
|
|
10
|
+
"""
|
|
11
|
+
Check if the StrEnum backport is installed/not installed as appropriate in the test environment.
|
|
12
|
+
|
|
13
|
+
- the backport can only be installed for Python versions < 3.11 (https://pypi.org/project/backports.strenum/)
|
|
14
|
+
- for >= 3.11, the stdlib StrEnum should be used instead
|
|
15
|
+
"""
|
|
16
|
+
if sys.version_info >= (3, 11):
|
|
17
|
+
with self.assertRaises(ImportError):
|
|
18
|
+
import backports.strenum # noqa
|
|
19
|
+
else:
|
|
20
|
+
try:
|
|
21
|
+
import backports.strenum # noqa
|
|
22
|
+
except ImportError:
|
|
23
|
+
self.fail("Failed to import the backports.strenum module")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|