Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aliby-mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Swain Lab
aliby
aliby-mirror
Commits
50a4a993
Commit
50a4a993
authored
2 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
feat(aliby): add run script for cli upon install
parent
8436a9a3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/run.py
+0
-47
0 additions, 47 deletions
bin/run.py
src/aliby/bin/__init__.py
+1
-0
1 addition, 0 deletions
src/aliby/bin/__init__.py
src/aliby/bin/run.py
+48
-0
48 additions, 0 deletions
src/aliby/bin/run.py
with
49 additions
and
47 deletions
bin/run.py
deleted
100644 → 0
+
0
−
47
View file @
8436a9a3
#!/usr/bin/env jupyter
import
argparse
from
aliby.pipeline
import
Pipeline
,
PipelineParameters
parser
=
argparse
.
ArgumentParser
(
prog
=
"
aliby-run
"
,
description
=
"
Run a default microscopy analysis pipeline
"
)
param_values
=
{
"
expt_id
"
:
None
,
"
distributed
"
:
2
,
"
tps
"
:
2
,
"
directory
"
:
"
./data
"
,
"
filter
"
:
0
,
"
host
"
:
None
,
"
username
"
:
None
,
"
password
"
:
None
,
}
def
_cast_str
(
x
:
str
or
None
):
"""
Cast string as int if possible. If Nonetype return None.
"""
if
x
:
try
:
return
int
(
x
)
except
:
return
x
for
k
in
param_values
:
parser
.
add_argument
(
f
"
--
{
k
}
"
,
action
=
"
store
"
)
args
=
parser
.
parse_args
()
for
k
in
param_values
:
if
passed_value
:
=
_cast_str
(
getattr
(
args
,
k
)):
param_values
[
k
]
=
passed_value
params
=
PipelineParameters
.
default
(
general
=
param_values
)
p
=
Pipeline
(
params
)
p
.
run
()
This diff is collapsed.
Click to expand it.
src/aliby/bin/__init__.py
0 → 100644
+
1
−
0
View file @
50a4a993
#!/usr/bin/env jupyter
This diff is collapsed.
Click to expand it.
src/aliby/bin/run.py
0 → 100644
+
48
−
0
View file @
50a4a993
#!/usr/bin/env jupyter
def
run
():
import
argparse
from
aliby.pipeline
import
Pipeline
,
PipelineParameters
parser
=
argparse
.
ArgumentParser
(
prog
=
"
aliby-run
"
,
description
=
"
Run a default microscopy analysis pipeline
"
,
)
param_values
=
{
"
expt_id
"
:
None
,
"
distributed
"
:
2
,
"
tps
"
:
2
,
"
directory
"
:
"
./data
"
,
"
filter
"
:
0
,
"
host
"
:
None
,
"
username
"
:
None
,
"
password
"
:
None
,
}
def
_cast_str
(
x
:
str
or
None
):
"""
Cast string as int if possible. If Nonetype return None.
"""
if
x
:
try
:
return
int
(
x
)
except
:
return
x
for
k
in
param_values
:
parser
.
add_argument
(
f
"
--
{
k
}
"
,
action
=
"
store
"
)
args
=
parser
.
parse_args
()
for
k
in
param_values
:
if
passed_value
:
=
_cast_str
(
getattr
(
args
,
k
)):
param_values
[
k
]
=
passed_value
params
=
PipelineParameters
.
default
(
general
=
param_values
)
p
=
Pipeline
(
params
)
p
.
run
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment