-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c58180e
commit 3b5ecee
Showing
8 changed files
with
82 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: lightsheet | ||
name: flamingo | ||
|
||
channels: | ||
- pytorch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import runpy | ||
from setuptools import setup, find_packages | ||
|
||
version = runpy.run_path('flamingo_tools/version.py')['__version__'] | ||
setup(name='flamingo_tools', | ||
packages=find_packages(exclude=['test']), | ||
version=version, | ||
author='Constantin Pape', | ||
license='MIT') | ||
version = runpy.run_path("flamingo_tools/version.py")["__version__"] | ||
setup( | ||
name="flamingo_tools", | ||
packages=find_packages(exclude=["test"]), | ||
version=version, | ||
author="Constantin Pape", | ||
license="MIT", | ||
entry_points={ | ||
"console_scripts": [ | ||
"convert_flamingo = flamingo_tools.data_conversion:convert_lightsheet_to_bdv_cli" | ||
] | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import os | ||
import unittest | ||
from shutil import rmtree | ||
|
||
import z5py | ||
|
||
from subprocess import run | ||
|
||
|
||
class TestCLI(unittest.TestCase): | ||
folder = "./tmp" | ||
|
||
def setUp(self): | ||
from flamingo_tools import create_test_data | ||
|
||
# TODO Create flamingo metadata. | ||
create_test_data(self.folder) | ||
|
||
def tearDown(self): | ||
rmtree(self.folder) | ||
|
||
def test_convert_flamingo(self): | ||
out_path = os.path.join(self.folder, "converted_data.n5") | ||
cmd = ["convert_flamingo", "-i", self.folder, "-o", out_path, "--metadata_pattern", ""] | ||
run(cmd) | ||
|
||
self.assertTrue(os.path.exists(out_path)) | ||
xml_path = out_path.replace(".n5", ".xml") | ||
self.assertTrue(os.path.exists(xml_path)) | ||
with z5py.File(out_path, "r") as f: | ||
self.assertTrue("setup0" in f) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters