zombie-squirrel 0.8.3__tar.gz → 0.8.4__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 (26) hide show
  1. {zombie_squirrel-0.8.3/src/zombie_squirrel.egg-info → zombie_squirrel-0.8.4}/PKG-INFO +1 -1
  2. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/__init__.py +1 -1
  3. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/acorn_contents/asset_basics.py +2 -0
  4. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/acorn_contents/raw_to_derived.py +2 -0
  5. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/acorn_contents/source_data.py +2 -0
  6. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/acorn_contents/unique_project_names.py +2 -1
  7. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/acorn_contents/unique_subject_ids.py +2 -1
  8. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/acorns.py +11 -0
  9. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/sync.py +0 -6
  10. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/utils.py +14 -0
  11. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4/src/zombie_squirrel.egg-info}/PKG-INFO +1 -1
  12. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/LICENSE +0 -0
  13. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/README.md +0 -0
  14. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/pyproject.toml +0 -0
  15. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/setup.cfg +0 -0
  16. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/setup.py +0 -0
  17. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/acorn_contents/__init__.py +0 -0
  18. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel/forest.py +0 -0
  19. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel.egg-info/SOURCES.txt +0 -0
  20. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel.egg-info/dependency_links.txt +0 -0
  21. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel.egg-info/requires.txt +0 -0
  22. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/src/zombie_squirrel.egg-info/top_level.txt +0 -0
  23. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/tests/test_acorns.py +0 -0
  24. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/tests/test_sync.py +0 -0
  25. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/tests/test_trees.py +0 -0
  26. {zombie_squirrel-0.8.3 → zombie_squirrel-0.8.4}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zombie-squirrel
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Summary: Generated from aind-library-template
5
5
  Author: Allen Institute for Neural Dynamics
6
6
  License: MIT
@@ -3,7 +3,7 @@
3
3
  Provides functions to fetch and cache project names, subject IDs, and asset
4
4
  metadata from the AIND metadata database with support for multiple backends."""
5
5
 
6
- __version__ = "0.8.3"
6
+ __version__ = "0.8.4"
7
7
 
8
8
  from zombie_squirrel.acorn_contents.asset_basics import asset_basics # noqa: F401
9
9
  from zombie_squirrel.acorn_contents.raw_to_derived import raw_to_derived # noqa: F401
@@ -6,6 +6,7 @@ import pandas as pd
6
6
  from aind_data_access_api.document_db import MetadataDbClient
7
7
 
8
8
  import zombie_squirrel.acorns as acorns
9
+ from zombie_squirrel.utils import setup_logging
9
10
 
10
11
 
11
12
  @acorns.register_acorn(acorns.NAMES["basics"])
@@ -43,6 +44,7 @@ def asset_basics(force_update: bool = False) -> pd.DataFrame:
43
44
  )
44
45
 
45
46
  if df.empty or force_update:
47
+ setup_logging()
46
48
  logging.info("Updating cache for asset basics")
47
49
  df = pd.DataFrame(
48
50
  columns=[
@@ -6,6 +6,7 @@ import pandas as pd
6
6
  from aind_data_access_api.document_db import MetadataDbClient
7
7
 
8
8
  import zombie_squirrel.acorns as acorns
9
+ from zombie_squirrel.utils import setup_logging
9
10
 
10
11
 
11
12
  @acorns.register_acorn(acorns.NAMES["r2d"])
@@ -28,6 +29,7 @@ def raw_to_derived(force_update: bool = False) -> pd.DataFrame:
28
29
  )
29
30
 
30
31
  if df.empty or force_update:
32
+ setup_logging()
31
33
  logging.info("Updating cache for raw to derived mapping")
32
34
  client = MetadataDbClient(
33
35
  host=acorns.API_GATEWAY_HOST,
@@ -6,6 +6,7 @@ import pandas as pd
6
6
  from aind_data_access_api.document_db import MetadataDbClient
7
7
 
8
8
  import zombie_squirrel.acorns as acorns
9
+ from zombie_squirrel.utils import setup_logging
9
10
 
10
11
 
11
12
  @acorns.register_acorn(acorns.NAMES["d2r"])
@@ -28,6 +29,7 @@ def source_data(force_update: bool = False) -> pd.DataFrame:
28
29
  )
29
30
 
30
31
  if df.empty or force_update:
32
+ setup_logging()
31
33
  logging.info("Updating cache for source data")
32
34
  client = MetadataDbClient(
33
35
  host=acorns.API_GATEWAY_HOST,
@@ -6,6 +6,7 @@ import pandas as pd
6
6
  from aind_data_access_api.document_db import MetadataDbClient
7
7
 
8
8
  import zombie_squirrel.acorns as acorns
9
+ from zombie_squirrel.utils import setup_logging
9
10
 
10
11
 
11
12
  @acorns.register_acorn(acorns.NAMES["upn"])
@@ -28,7 +29,7 @@ def unique_project_names(force_update: bool = False) -> list[str]:
28
29
  )
29
30
 
30
31
  if df.empty or force_update:
31
- # If cache is missing, fetch data
32
+ setup_logging()
32
33
  logging.info("Updating cache for unique project names")
33
34
  client = MetadataDbClient(
34
35
  host=acorns.API_GATEWAY_HOST,
@@ -6,6 +6,7 @@ import pandas as pd
6
6
  from aind_data_access_api.document_db import MetadataDbClient
7
7
 
8
8
  import zombie_squirrel.acorns as acorns
9
+ from zombie_squirrel.utils import setup_logging
9
10
 
10
11
 
11
12
  @acorns.register_acorn(acorns.NAMES["usi"])
@@ -28,7 +29,7 @@ def unique_subject_ids(force_update: bool = False) -> list[str]:
28
29
  )
29
30
 
30
31
  if df.empty or force_update:
31
- # If cache is missing, fetch data
32
+ setup_logging()
32
33
  logging.info("Updating cache for unique subject IDs")
33
34
  client = MetadataDbClient(
34
35
  host=acorns.API_GATEWAY_HOST,
@@ -45,3 +45,14 @@ def register_acorn(name: str):
45
45
  return func
46
46
 
47
47
  return decorator
48
+
49
+
50
+ # Import acorn_contents modules to trigger registration
51
+ # This must be done after the registry and decorator are defined
52
+ from zombie_squirrel.acorn_contents import ( # noqa: E402, F401
53
+ asset_basics,
54
+ raw_to_derived,
55
+ source_data,
56
+ unique_project_names,
57
+ unique_subject_ids,
58
+ )
@@ -1,7 +1,5 @@
1
1
  """Synchronization utilities for updating all cached data."""
2
2
 
3
- import logging
4
-
5
3
  from .acorns import ACORN_REGISTRY
6
4
 
7
5
 
@@ -10,9 +8,5 @@ def hide_acorns():
10
8
 
11
9
  Calls each acorn function with force_update=True to refresh
12
10
  all cached data in the tree backend."""
13
- logging.basicConfig(
14
- level=logging.INFO,
15
- format="%(asctime)s %(levelname)s %(message)s"
16
- )
17
11
  for acorn in ACORN_REGISTRY.values():
18
12
  acorn(force_update=True)
@@ -1,5 +1,19 @@
1
1
  """Utility functions for zombie-squirrel package."""
2
2
 
3
+ import logging
4
+
5
+
6
+ def setup_logging():
7
+ """Configure logging for zombie-squirrel package.
8
+
9
+ Sets up INFO level logging with timestamp format.
10
+ Safe to call multiple times - uses force=True to reconfigure."""
11
+ logging.basicConfig(
12
+ level=logging.INFO,
13
+ format="%(asctime)s %(levelname)s %(message)s",
14
+ force=True
15
+ )
16
+
3
17
 
4
18
  def prefix_table_name(table_name: str) -> str:
5
19
  """Add zombie-squirrel prefix and parquet extension to filenames.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zombie-squirrel
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Summary: Generated from aind-library-template
5
5
  Author: Allen Institute for Neural Dynamics
6
6
  License: MIT
File without changes