Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pycomsdk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
com
pycomsdk
Commits
edc8863b
Commit
edc8863b
authored
Jan 19, 2022
by
Anton Pershin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed typing_extensions to comply with python 3.9
parent
ca70311b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
communication.py
comsdk/communication.py
+2
-1
research.py
comsdk/research.py
+7
-4
No files found.
comsdk/communication.py
View file @
edc8863b
import
os
import
os.path
import
shutil
import
paramiko
import
subprocess
import
shlex
import
json
...
...
@@ -10,6 +9,8 @@ from stat import S_ISDIR
from
abc
import
ABCMeta
,
abstractmethod
import
logging
import
paramiko
import
comsdk.comaux
as
aux
...
...
comsdk/research.py
View file @
edc8863b
import
pickle
from
datetime
import
date
from
typing
import
Sequence
,
Mapping
from
typing_extensions
import
TypedDict
from
typing
import
Sequence
,
Mapping
,
TypedDict
from
comsdk.comaux
import
*
from
comsdk.communication
import
BaseCommunication
,
LocalCommunication
,
SshCommunication
,
Host
...
...
@@ -313,15 +312,19 @@ class ResearchDoesNotExist(Exception):
def
make_suitable_name
(
name
:
str
)
->
str
:
return
'-'
.
join
(
name
.
split
())
def
make_suitable_task_name
(
name
:
str
)
->
str
:
return
'_'
.
join
(
name
.
split
())
def
make_suitable_research_dir
(
descr
:
str
)
->
str
:
return
'
_
'
.
join
([
str
(
date
.
today
()),
make_suitable_name
(
descr
)])
return
'
-
'
.
join
([
str
(
date
.
today
()),
make_suitable_name
(
descr
)])
def
get_task_full_name
(
task_number
:
int
,
task_name
:
str
)
->
str
:
return
str
(
task_number
)
+
'-'
+
make_suitable_name
(
task_name
)
return
str
(
task_number
)
+
'-'
+
make_suitable_
task_
name
(
task_name
)
def
split_task_dir
(
task_dir
:
str
)
->
(
int
,
str
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment