dsa-helpers 0.4.dev1__tar.gz → 0.4.dev2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {dsa_helpers-0.4.dev1/dsa_helpers.egg-info → dsa_helpers-0.4.dev2}/PKG-INFO +1 -1
  2. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/mongo_utils.py +8 -10
  3. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2/dsa_helpers.egg-info}/PKG-INFO +1 -1
  4. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/pyproject.toml +1 -1
  5. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/.gitignore +0 -0
  6. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/LICENSE +0 -0
  7. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/README.md +0 -0
  8. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/app.py +0 -0
  9. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/__init__.py +0 -0
  10. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/dash/__init__.py +0 -0
  11. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/dash/header.py +0 -0
  12. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/dash/header_callbacks.py +0 -0
  13. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/girder_utils.py +0 -0
  14. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/image_utils.py +0 -0
  15. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/imread.py +0 -0
  16. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/imwrite.py +0 -0
  17. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/login.py +0 -0
  18. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/ml/__init__.py +0 -0
  19. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/ml/object_detection/__init__.py +0 -0
  20. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/ml/object_detection/get_pearce_roi_images.py +0 -0
  21. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/ml/object_detection/tile_image.py +0 -0
  22. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers/ml/object_detection/utils.py +0 -0
  23. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers.egg-info/SOURCES.txt +0 -0
  24. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers.egg-info/dependency_links.txt +0 -0
  25. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers.egg-info/requires.txt +0 -0
  26. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/dsa_helpers.egg-info/top_level.txt +0 -0
  27. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/readthedocs.yaml +0 -0
  28. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/requirements.txt +0 -0
  29. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/setup.cfg +0 -0
  30. {dsa_helpers-0.4.dev1 → dsa_helpers-0.4.dev2}/tests/test.ipynb +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dsa_helpers
3
- Version: 0.4.dev1
3
+ Version: 0.4.dev2
4
4
  Summary: Utility functions for working with the DSA girder client.
5
5
  Author-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
6
6
  Maintainer-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
@@ -13,7 +13,7 @@ def get_mongo_client(
13
13
  username: str | None = None,
14
14
  password: str | None = None,
15
15
  port: int | None = None,
16
- ) -> pymongo.MongoClient:
16
+ ):
17
17
  """Get a mongo client by providing the key parts of the URL. By default
18
18
  when the parameters are not passed, it sets them to default values first
19
19
  by looking at key environment variables. If the environment variables are
@@ -36,7 +36,7 @@ def get_mongo_client(
36
36
  missing it will default to 27017.
37
37
 
38
38
  Returns:
39
- pymongo.MongoClient: The mongo client.
39
+ The mongo client.
40
40
 
41
41
  """
42
42
  if username is None:
@@ -67,7 +67,7 @@ def chunks(lst: list, n=500):
67
67
 
68
68
 
69
69
  def add_many_to_collection(
70
- mongo_collection: pymongo.collection.Collection,
70
+ mongo_collection,
71
71
  items: dict | list,
72
72
  key: str = "_id",
73
73
  ) -> dict[str | dict]:
@@ -75,7 +75,7 @@ def add_many_to_collection(
75
75
  user key.
76
76
 
77
77
  Args:
78
- mongo_collection (pymongo.collection.Collection): The mongo collection to add to.
78
+ mongo_collection: The mongo collection to add to.
79
79
  items (dict | list): The items to add to the collection.
80
80
  key (str): The key to use to identify the items.
81
81
 
@@ -100,13 +100,11 @@ def add_many_to_collection(
100
100
  return items
101
101
 
102
102
 
103
- def get_img_from_db(
104
- mongo_db: pymongo.database.Database, img_id: str
105
- ) -> Union[np.ndarray, None]:
103
+ def get_img_from_db(mongo_db, img_id: str) -> Union[np.ndarray, None]:
106
104
  """Get an image from the database by its location id.
107
105
 
108
106
  Args:
109
- mongo_db (pymongo.database.Database): The mongo database.
107
+ mongo_db: The mongo database.
110
108
  img_loc (str): The image id in mongo.
111
109
 
112
110
  Returns:
@@ -131,13 +129,13 @@ def get_img_from_db(
131
129
 
132
130
 
133
131
  def add_img_to_db(
134
- mongo_db: pymongo.database.Database,
132
+ mongo_db,
135
133
  img: Image.Image | np.ndarray,
136
134
  ) -> str:
137
135
  """Add an image to the database.
138
136
 
139
137
  Args:
140
- mongo_db (pymongo.database.Database): The mongo database.
138
+ mongo_db: The mongo database.
141
139
  img (np.ndarray or PIL.Image.Image): The image.
142
140
 
143
141
  Returns:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dsa_helpers
3
- Version: 0.4.dev1
3
+ Version: 0.4.dev2
4
4
  Summary: Utility functions for working with the DSA girder client.
5
5
  Author-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
6
6
  Maintainer-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
@@ -31,7 +31,7 @@ classifiers = [
31
31
  "License :: OSI Approved :: MIT License",
32
32
  ]
33
33
  keywords = ["dsa", "girder", "girder_client"]
34
- version = "v0.4dev1"
34
+ version = "v0.4dev2"
35
35
 
36
36
  [project.urls]
37
37
  Repository = "https://github.com/Gutman-Lab/dsa-python-utils"
File without changes
File without changes
File without changes
File without changes