atomict 1.2.29__py3-none-any.whl → 1.2.30__py3-none-any.whl
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.
- atomict/__version__.py +1 -1
- atomict/user/files.py +15 -7
- {atomict-1.2.29.dist-info → atomict-1.2.30.dist-info}/METADATA +1 -1
- {atomict-1.2.29.dist-info → atomict-1.2.30.dist-info}/RECORD +8 -8
- {atomict-1.2.29.dist-info → atomict-1.2.30.dist-info}/WHEEL +0 -0
- {atomict-1.2.29.dist-info → atomict-1.2.30.dist-info}/entry_points.txt +0 -0
- {atomict-1.2.29.dist-info → atomict-1.2.30.dist-info}/licenses/LICENSE +0 -0
- {atomict-1.2.29.dist-info → atomict-1.2.30.dist-info}/top_level.txt +0 -0
atomict/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.2.
|
|
1
|
+
__version__ = "1.2.30"
|
atomict/user/files.py
CHANGED
|
@@ -11,19 +11,27 @@ def upload_single_file(
|
|
|
11
11
|
api_root: str = None,
|
|
12
12
|
token: str = None,
|
|
13
13
|
):
|
|
14
|
-
|
|
14
|
+
base_name = os.path.basename(full_path)
|
|
15
|
+
users_name = file_name or base_name
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
payload['users_name'] = file_name
|
|
18
|
-
else:
|
|
19
|
-
payload['users_name'] = os.path.basename(full_path)
|
|
17
|
+
payload = {'users_name': users_name}
|
|
20
18
|
|
|
21
19
|
if project_id:
|
|
22
20
|
payload['project_id'] = project_id
|
|
23
21
|
|
|
22
|
+
# Send bytes, not the open handle: post() retries, and requests reads a
|
|
23
|
+
# handle to EOF on the first attempt, so every retry would upload an
|
|
24
|
+
# empty file.
|
|
24
25
|
with open(full_path, "rb") as f:
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
data = f.read()
|
|
27
|
+
|
|
28
|
+
return post(
|
|
29
|
+
"user/file_upload/",
|
|
30
|
+
files={users_name: (base_name, data)},
|
|
31
|
+
payload=payload,
|
|
32
|
+
api_root=api_root,
|
|
33
|
+
token=token,
|
|
34
|
+
)
|
|
27
35
|
|
|
28
36
|
|
|
29
37
|
def download_file(user_upload_id: str, destination_path: str, *, api_root: str = None, token: str = None):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: atomict
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.30
|
|
4
4
|
Summary: The client application for the https://atomictessellator.com/
|
|
5
5
|
Author-email: Steven Anderson <steven@atomictessellator.com>, Alain Richardt <alain@atomictessellator.com>
|
|
6
6
|
License: MIT
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
atomict/__init__.py,sha256=nMXg9GFsk8gCcyBnh1MAeUPvo4Zcuv3sdwGHZrxfpPE,36
|
|
2
|
-
atomict/__version__.py,sha256=
|
|
2
|
+
atomict/__version__.py,sha256=WGj1CvVJizDkAvd9BtLpwcsI-hzacJoXGbC8sVpoHYk,23
|
|
3
3
|
atomict/api.py,sha256=pYPKSxNgqyS36sqDR7bEtBf2SWwofDRXrLV8Cc2sebc,7129
|
|
4
4
|
atomict/auth.py,sha256=yMEaxaSg44tSDxr4x-bjwjjn9zIsqw_bVoKd01Zd9LU,987
|
|
5
5
|
atomict/env.py,sha256=RqK5SUfCDJ6aMGtCPhNmSrwsNZSjlGaDQYYk41oeBDc,2115
|
|
@@ -72,15 +72,15 @@ atomict/simulation/sh.py,sha256=YymnH9q8aD_THiielicTKgPGcRunsAcoV5bZKu__L0w,609
|
|
|
72
72
|
atomict/simulation/sqs.py,sha256=1neQRVUy21R_UVusML6ocz6RVwxGUVh81CMr2TljGbw,1132
|
|
73
73
|
atomict/simulation/utils.py,sha256=6ze0nOeSBp5V4lH7Hn0PXZTdy7APuWuhzk8J90KfV_I,5506
|
|
74
74
|
atomict/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
|
-
atomict/user/files.py,sha256=
|
|
75
|
+
atomict/user/files.py,sha256=mFEYv4EASCp-vDpRbZ3HeW4FFl3i_0oaKfJnwhQT-MQ,1348
|
|
76
76
|
atomict/user/workspace.py,sha256=VKvsi5dfopNlIHW-YJT_pgsfH7gEqkpiReBDvJ5R9_A,4889
|
|
77
77
|
atomict/utils/tenacity.py,sha256=phc6YPEk7idqiFFeHeK-ngiAaqVOZFYp8S7dX1k-YXc,998
|
|
78
78
|
atomict/utils/traj.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
79
|
atomict/utils/fhiaims/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
80
|
atomict/utils/fhiaims/geometry.py,sha256=s1B57ye8gwMzX4-YafYS97SFx18nRbwYsvidld_bipk,2060
|
|
81
|
-
atomict-1.2.
|
|
82
|
-
atomict-1.2.
|
|
83
|
-
atomict-1.2.
|
|
84
|
-
atomict-1.2.
|
|
85
|
-
atomict-1.2.
|
|
86
|
-
atomict-1.2.
|
|
81
|
+
atomict-1.2.30.dist-info/licenses/LICENSE,sha256=fzvTkxUzi2u1cea_aRtmg5_mRk6ZyLWJJRr49K28qKg,1075
|
|
82
|
+
atomict-1.2.30.dist-info/METADATA,sha256=G4iRA4fnB4zpqvM3YQUwqZh1fq2vuhv6b9DpgBOXvRc,2938
|
|
83
|
+
atomict-1.2.30.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
84
|
+
atomict-1.2.30.dist-info/entry_points.txt,sha256=PozguIUgJUHgS65PSZBHNPUiwYGDwXa4vLZ7hde3aq8,47
|
|
85
|
+
atomict-1.2.30.dist-info/top_level.txt,sha256=CCo525YmAj7ZbToMmQcVKQ-JiIiFKiq3GmhIYCG2gaM,8
|
|
86
|
+
atomict-1.2.30.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|