Skip to content

Commit

Permalink
Merge pull request #575 from AllenCell/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
yrkim98 authored Dec 5, 2024
2 parents 6442460 + 15bdec3 commit 8ae5ff6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
# https://peps.python.org/pep-0621/
[project]
name = "allencell-segmenter-ml"
version = "0.1.16"
version = "1.0.0rc0"
description = "A plugin to leverage ML segmentation in napari"
readme = "README.md"
requires-python = ">=3.9,<3.11"
Expand Down Expand Up @@ -105,7 +105,7 @@ where = ["src"]

# https://pypi.org/project/bumpver
[tool.bumpver]
current_version = "0.1.16"
current_version = "1.0.0rc0"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "Bump version {old_version} -> {new_version}"
commit = true
Expand Down
2 changes: 1 addition & 1 deletion src/allencell_ml_segmenter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.16"
__version__ = "1.0.0rc0"

from allencell_ml_segmenter.napari.napari_reader import napari_get_reader
from allencell_ml_segmenter.napari.sample_data import make_sample_data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
FakeUserSettings,
)
from allencell_ml_segmenter.main.experiments_model import ExperimentsModel
from allencell_ml_segmenter.utils.s3.s3_bucket_constants import PROD_BUCKET
from allencell_ml_segmenter.utils.s3.s3_bucket_constants import (
PROD_BUCKET,
STG_BUCKET,
)
from allencell_ml_segmenter.widgets.model_download_dialog import (
ModelDownloadDialog,
)
Expand Down Expand Up @@ -41,6 +44,17 @@ def model_download_dialog(
"adding_headers": {"X-Foo": "Bar"},
}
)

responses.add(
**{
"method": responses.GET,
"url": f"{STG_BUCKET}?list-type=2",
"body": s3_response_listobjectv2_contents_two_models,
"status": 200,
"content_type": "application/xml",
"adding_headers": {"X-Foo": "Bar"},
}
)
return ModelDownloadDialog(None, exp_model)


Expand Down
2 changes: 1 addition & 1 deletion src/allencell_ml_segmenter/services/prediction_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def write_csv_for_inputs(self, list_images: List[Path]) -> None:
"""
data_folder: Optional[Path] = self._experiments_model.get_csv_path()
if data_folder is not None:
data_folder.mkdir(parents=False, exist_ok=True)
(data_folder / "prediction_csv").mkdir(parents=True, exist_ok=True)
csv_path: Path = data_folder / "prediction_csv" / "test_csv.csv"
with open(csv_path, "w") as file:
writer = csv.writer(file)
Expand Down
4 changes: 2 additions & 2 deletions src/allencell_ml_segmenter/widgets/model_download_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from allencell_ml_segmenter.utils.s3.s3_model_bucket import (
S3ModelBucket,
)
from allencell_ml_segmenter.utils.s3.s3_bucket_constants import PROD_BUCKET
from allencell_ml_segmenter.utils.s3.s3_bucket_constants import STG_BUCKET


class ModelDownloadDialog(QDialog):
Expand All @@ -32,7 +32,7 @@ def __init__(
"Cannot download model when experiment dir is unknown"
)
self._available_models = S3ModelBucket(
PROD_BUCKET, exp_path
STG_BUCKET, exp_path
).get_available_models()
layout: QVBoxLayout = QVBoxLayout()
self.setLayout(layout)
Expand Down

0 comments on commit 8ae5ff6

Please sign in to comment.