Skip to content

Commit

Permalink
Use luigi-tools package
Browse files Browse the repository at this point in the history
Change-Id: I385315a95e57bed8162d04a2aa9075453a62bd21
  • Loading branch information
adrien-berchet committed Nov 30, 2020
1 parent 5cc05de commit 80d16ea
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 902 deletions.
11 changes: 10 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
ignore=version.py

[MESSAGES CONTROL]
disable=bad-continuation,fixme,invalid-name,len-as-condition,no-else-return,empty-docstring,too-many-lines
disable=
bad-continuation,
empty-docstring,
fixme,
invalid-name,
len-as-condition,
no-else-return,
no-member,
too-many-ancestors,
too-many-lines,

[FORMAT]
# Maximum number of characters on a single line.
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"jinja2",
"joblib",
"luigi",
"luigi-tools>=0.0.2",
"matplotlib",
"morph_tool>=2.2.21",
"morph_validator",
Expand Down
10 changes: 5 additions & 5 deletions src/synthesis_workflow/tasks/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from synthesis_workflow.tasks.luigi_tools import BoolParameter
from synthesis_workflow.tasks.luigi_tools import copy_params
from synthesis_workflow.tasks.luigi_tools import OptionalChoiceParameter
from synthesis_workflow.tasks.luigi_tools import ParamLink
from synthesis_workflow.tasks.luigi_tools import ParamRef
from synthesis_workflow.tasks.luigi_tools import RatioParameter
from synthesis_workflow.tasks.luigi_tools import WorkflowTask
from synthesis_workflow.tasks.utils import GetSynthesisInputs
Expand Down Expand Up @@ -153,7 +153,7 @@ def output(self):


@copy_params(
mtype_taxonomy_path=ParamLink(PathConfig),
mtype_taxonomy_path=ParamRef(PathConfig),
)
class BuildCircuit(WorkflowTask):
"""Generate cell positions and me-types from atlas, compositions and taxonomy.
Expand Down Expand Up @@ -184,8 +184,8 @@ def requires(self):

def run(self):
""""""
cell_composition_path = self.input().ppath / self.cell_composition_path
mtype_taxonomy_path = self.input().ppath / self.mtype_taxonomy_path
cell_composition_path = self.input().pathlib_path / self.cell_composition_path
mtype_taxonomy_path = self.input().pathlib_path / self.mtype_taxonomy_path

thickness_mask_path = None
if self.mask_path is not None:
Expand All @@ -210,7 +210,7 @@ def output(self):


@copy_params(
mtypes=ParamLink(SynthesisConfig),
mtypes=ParamRef(SynthesisConfig),
)
class SliceCircuit(WorkflowTask):
"""Create a smaller circuit .mvd3 file for subsampling.
Expand Down
2 changes: 1 addition & 1 deletion src/synthesis_workflow/tasks/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from pathlib import Path

import luigi
from luigi_tools.utils import get_dependency_graph

import synthesis_workflow
from synthesis_workflow.tasks import workflows
from synthesis_workflow.tasks.luigi_tools import get_dependency_graph
from synthesis_workflow.utils import setup_logging


Expand Down
4 changes: 2 additions & 2 deletions src/synthesis_workflow/tasks/diametrizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from synthesis_workflow.tasks.config import RunnerConfig
from synthesis_workflow.tasks.luigi_tools import BoolParameter
from synthesis_workflow.tasks.luigi_tools import copy_params
from synthesis_workflow.tasks.luigi_tools import ParamLink
from synthesis_workflow.tasks.luigi_tools import ParamRef
from synthesis_workflow.tasks.luigi_tools import WorkflowTask
from synthesis_workflow.tools import update_morphs_df

Expand Down Expand Up @@ -67,7 +67,7 @@ def _plot_models(models_params, models_data, fig_folder="figures", ext=".png"):


@copy_params(
nb_jobs=ParamLink(RunnerConfig),
nb_jobs=ParamRef(RunnerConfig),
)
class BuildDiameterModels(WorkflowTask):
"""Task to build diameter models from set of cells.
Expand Down
Loading

0 comments on commit 80d16ea

Please sign in to comment.