Skip to content

Commit

Permalink
Update imports (#86)
Browse files Browse the repository at this point in the history
* add gitter info

* readme typo

* update coverage dependency

* deploy to linux and windows

* update coverage dependency

* add six dependency

* travis revert

* update travis

* speed up test

* change cibuildtools syntax

* docker deploy

* update travis

* update travis

* update travis

* docker into jobs

* name deplot stage

* change deploy

* update testing script

* update coverage dependency

* new curation interface

* update stages

* remove matrix

* update jobs

* update python versions

* update wheelbuilding

* remove script and add os

* update travis

* formatting check with black

* update wheelbuilding

* ls before deployment

* remove install from deployment job

* move install to script

* conditional deployment

* update conditions

* update conditions

* twine upload

* install twine

* install twine

* update travis

* change twine upload

* update testing

* retry twine upload

* retry twine upload

* bump

* full deploy test

* update manifest

* update travis

* full deployment

* fix typo in travis.yml

* tag

* edit conditional deployment

* remove sudo

* update travis

* update travis

* update travis

* remove wheelbuilding

* update conditions

* Update conditions

* tag condition

* update conditions

* add branch to condition

* remove branch

* update conditions

* add branch to conditions

* add repo to conditions

* add repo to conditions

* reorder conditions

* reorder conditions

* add condition

* add matrix

* revert travis

* update tests

* more job detail

* more job detail

* full test and deploy

* bump

* update coverage

* remove unneeded line in travis

* remove unneeded line in travis

* test coveralls

* pin coveralls version

* update coveralls

* windows tests

* Upgrade setuptools

* upgrade setuptools

* bump

* update coverage call

* update coveralls depedency

* update coveralls depedency

* fix documentation

* fix import statement

* fix conflicts

* update napari points api usage

* update docs

* update amap api useage

* fix imlib source_files import errors

* bump
  • Loading branch information
adamltyson authored Apr 16, 2020
1 parent fb6e1c4 commit 83bacec
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cellfinder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.3.9"
__version__ = "0.3.10"
__author__ = "Adam Tyson, Christian Niedworok, Charly Rousseau"
__license__ = "GPL-3.0"
6 changes: 3 additions & 3 deletions cellfinder/download/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from imlib.general.system import disk_free_gb
from imlib.general.config import get_config_obj
from imlib.source import source_files
from amap.download.download import write_atlas_to_cfg
from cellfinder.tools import source_files


class DownloadError(Exception):
Expand Down Expand Up @@ -84,8 +84,8 @@ def amend_cfg(new_atlas_folder=None, new_model_path=None, atlas=None):
"""
print("Ensuring custom config file is correct")

original_config = source_files.source_config()
new_config = source_files.source_custom_config()
original_config = source_files.source_config_cellfinder()
new_config = source_files.source_custom_config_cellfinder()
if new_atlas_folder is not None:
write_atlas_to_cfg(
new_atlas_folder, atlas, original_config, new_config
Expand Down
5 changes: 3 additions & 2 deletions cellfinder/standard_space/cells_to_standard_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
from imlib.general.system import delete_temp
from imlib.general.exceptions import TransformationError
from imlib.image.metadata import define_pixel_sizes
from imlib.source.source_files import source_custom_config_cellfinder

from brainio.brainio import load_any as load_any_image
from amap.register.registration_params import RegistrationParams

from cellfinder.tools import tools, prep
import cellfinder.tools.parser as cellfinder_parse
from cellfinder.tools.source_files import source_custom_config


def transform_cells_to_standard_space(args):
if args.registration_config is None:
args.registration_config = source_custom_config()
args.registration_config = source_custom_config_cellfinder()

reg_params = RegistrationParams(
args.registration_config,
Expand Down
14 changes: 9 additions & 5 deletions cellfinder/tools/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from imlib.image.metadata import define_pixel_sizes
from imlib.general.exceptions import CommandLineInputError
from imlib.general.config import get_config_obj
from imlib.source import source_files

import amap.download.atlas as atlas_download

import cellfinder.tools.tf as tf_tools
Expand All @@ -22,7 +24,7 @@
from cellfinder.download import models as model_download
from cellfinder.download.download import amend_cfg
from cellfinder.download.cli import temp_dir_path
from cellfinder.tools import tools, source_files, system
from cellfinder.tools import tools, system


def check_input_arg_existance(args):
Expand Down Expand Up @@ -412,7 +414,9 @@ def prep_registration(args, sample_name="amap"):
amend_cfg(new_atlas_folder=atlas_dir, atlas=args.atlas)

if args.registration_config is None:
args.registration_config = source_files.source_custom_config()
args.registration_config = (
source_files.source_custom_config_cellfinder()
)
args.target_brain_path = args.background_planes_path[0]
args.sample_name = sample_name
logging.debug("Making registration directory")
Expand All @@ -434,7 +438,7 @@ def check_atlas_install():
# TODO: make more sophisticated, check for all files that might be needed
dir_exists = False
files_exist = False
cfg_file_path = source_files.source_custom_config()
cfg_file_path = source_files.source_custom_config_cellfinder()
if os.path.exists(cfg_file_path):
config_obj = get_config_obj(cfg_file_path)
atlas_conf = config_obj["atlas"]
Expand Down Expand Up @@ -463,7 +467,7 @@ def prep_atlas_conf(args):
args.atlas_config = args.registration_config
else:
# can get atlas pixel sizes from registration config
args.atlas_config = source_files.source_custom_config()
args.atlas_config = source_files.source_custom_config_cellfinder()
return args


Expand Down Expand Up @@ -491,7 +495,7 @@ def prep_models(args):
if args.trained_model is None and args.model_weights is None:
logging.debug("No model or weights supplied, so using the default")

config_file = source_files.source_custom_config()
config_file = source_files.source_custom_config_cellfinder()
if not Path(config_file).exists():
logging.debug("Custom config does not exist, downloading models")
model_path = model_download.main(args.model, args.install_path)
Expand Down
4 changes: 2 additions & 2 deletions cellfinder/utils/roi_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
SafeExecuteCommandError,
)
from imlib.general.exceptions import RegistrationError
from cellfinder.tools.source_files import source_custom_config
from imlib.source.source_files import source_custom_config_cellfinder
from amap.config.atlas import Atlas
from amap.config.config import get_binary
from amap.tools.source_files import get_niftyreg_binaries
Expand Down Expand Up @@ -278,7 +278,7 @@ def main():
print(f"ROI file is: {rois}")

if args.registration_config is None:
args.registration_config = source_custom_config()
args.registration_config = source_custom_config_cellfinder()
atlas = Atlas(args.registration_config)
source_image = args.reg_dir / SOURCE_IMAGE_NAME
print(f"Source image is: {source_image}")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

setup(
name="cellfinder",
version="0.3.9",
version="0.3.10",
description="Automated 3D cell detection and registration of whole-brain images",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 83bacec

Please sign in to comment.