diff --git a/.buildinfo b/.buildinfo index 14d6376a..9da9e883 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 83fc8b3d93aabf933981e660f670aecf +config: f3accd61f28ed912573026661e4390b3 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/auto_examples/load_and_explore_poses.doctree b/.doctrees/auto_examples/load_and_explore_poses.doctree index 99ba1a63..8a8b04fb 100644 Binary files a/.doctrees/auto_examples/load_and_explore_poses.doctree and b/.doctrees/auto_examples/load_and_explore_poses.doctree differ diff --git a/.doctrees/auto_examples/sg_execution_times.doctree b/.doctrees/auto_examples/sg_execution_times.doctree index 0a9e92f9..e4661dae 100644 Binary files a/.doctrees/auto_examples/sg_execution_times.doctree and b/.doctrees/auto_examples/sg_execution_times.doctree differ diff --git a/.doctrees/contributing.doctree b/.doctrees/contributing.doctree index 2e82cf73..4fca8a18 100644 Binary files a/.doctrees/contributing.doctree and b/.doctrees/contributing.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index b781c3a9..1f658bde 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip b/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip index 772f52d1..81f4f349 100644 Binary files a/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip and b/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip differ diff --git a/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip b/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip index afae95ad..c0d0720e 100644 Binary files a/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip and b/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip differ diff --git a/_modules/index.html b/_modules/index.html index 81767b1f..d78eb93f 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -39,7 +39,7 @@ - + @@ -119,7 +119,7 @@ -
movement v0.0.7
+movement v0.0.8
diff --git a/_modules/movement/datasets.html b/_modules/movement/datasets.html index 2430ff23..61f35291 100644 --- a/_modules/movement/datasets.html +++ b/_modules/movement/datasets.html @@ -39,7 +39,7 @@ - + @@ -119,7 +119,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/_modules/movement/io/load_poses.html b/_modules/movement/io/load_poses.html index bbd78719..74a8db7e 100644 --- a/_modules/movement/io/load_poses.html +++ b/_modules/movement/io/load_poses.html @@ -39,7 +39,7 @@ - + @@ -119,7 +119,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/_modules/movement/io/save_poses.html b/_modules/movement/io/save_poses.html index 2ecf0c35..6dfb7537 100644 --- a/_modules/movement/io/save_poses.html +++ b/_modules/movement/io/save_poses.html @@ -39,7 +39,7 @@ - + @@ -119,7 +119,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/_modules/movement/io/validators.html b/_modules/movement/io/validators.html index 4014f12e..64c1832a 100644 --- a/_modules/movement/io/validators.html +++ b/_modules/movement/io/validators.html @@ -39,7 +39,7 @@ - + @@ -119,7 +119,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/_modules/movement/logging.html b/_modules/movement/logging.html index b12f7887..d2b785c1 100644 --- a/_modules/movement/logging.html +++ b/_modules/movement/logging.html @@ -39,7 +39,7 @@ - + @@ -119,7 +119,7 @@ -movement v0.0.7
+movement v0.0.8
@@ -411,34 +411,37 @@
# Set the log directory and file path
log_directory.mkdir(parents=True, exist_ok=True)
- log_file = log_directory / f"{logger_name}.log"
-
- # If a logger with the given name is already configured
- if logger_name in logging.root.manager.loggerDict:
- logger = logging.getLogger(logger_name)
- handlers = logger.handlers[:]
- # If the log file path has changed
- if log_file.as_posix() != handlers[0].baseFilename: # type: ignore
- # remove the handlers to allow for reconfiguration
- for handler in handlers:
- logger.removeHandler(handler)
- else:
- # otherwise, do nothing
- return
+ log_file = (log_directory / f"{logger_name}.log").as_posix()
+
+ # Check if logger with the given name is already configured
+ logger_configured = logger_name in logging.root.manager.loggerDict
logger = logging.getLogger(logger_name)
- logger.setLevel(log_level)
- # Create a rotating file handler
- max_log_size = 5 * 1024 * 1024 # 5 MB
- handler = RotatingFileHandler(log_file, maxBytes=max_log_size)
+ # Logger needs to be (re)configured if unconfigured or
+ # if configured but the log file path has changed
+ configure_logger = (
+ not logger_configured
+ or log_file != logger.handlers[0].baseFilename # type: ignore
+ )
+
+ if configure_logger:
+ if logger_configured:
+ # remove the handlers to allow for reconfiguration
+ logger.handlers.clear()
+
+ logger.setLevel(log_level)
+
+ # Create a rotating file handler
+ max_log_size = 5 * 1024 * 1024 # 5 MB
+ handler = RotatingFileHandler(log_file, maxBytes=max_log_size)
- # Create a formatter and set it to the handler
- formatter = logging.Formatter(FORMAT)
- handler.setFormatter(formatter)
+ # Create a formatter and set it to the handler
+ formatter = logging.Formatter(FORMAT)
+ handler.setFormatter(formatter)
- # Add the handler to the logger
- logger.addHandler(handler)
movement v0.0.7
+movement v0.0.8
movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.datasets.list_pose_data.html b/auto_api/movement.datasets.list_pose_data.html index d978d2d0..e9b1b9ab 100644 --- a/auto_api/movement.datasets.list_pose_data.html +++ b/auto_api/movement.datasets.list_pose_data.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.load_poses.from_dlc_df.html b/auto_api/movement.io.load_poses.from_dlc_df.html index 6ba1d83c..5116ddb3 100644 --- a/auto_api/movement.io.load_poses.from_dlc_df.html +++ b/auto_api/movement.io.load_poses.from_dlc_df.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.load_poses.from_dlc_file.html b/auto_api/movement.io.load_poses.from_dlc_file.html index fee2217d..6289d693 100644 --- a/auto_api/movement.io.load_poses.from_dlc_file.html +++ b/auto_api/movement.io.load_poses.from_dlc_file.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.load_poses.from_sleap_file.html b/auto_api/movement.io.load_poses.from_sleap_file.html index 8ffdc35e..c261e891 100644 --- a/auto_api/movement.io.load_poses.from_sleap_file.html +++ b/auto_api/movement.io.load_poses.from_sleap_file.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.save_poses.to_dlc_df.html b/auto_api/movement.io.save_poses.to_dlc_df.html index cb0b60e9..120b0689 100644 --- a/auto_api/movement.io.save_poses.to_dlc_df.html +++ b/auto_api/movement.io.save_poses.to_dlc_df.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.save_poses.to_dlc_file.html b/auto_api/movement.io.save_poses.to_dlc_file.html index aae9ee46..79273a5e 100644 --- a/auto_api/movement.io.save_poses.to_dlc_file.html +++ b/auto_api/movement.io.save_poses.to_dlc_file.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.validators.ValidFile.html b/auto_api/movement.io.validators.ValidFile.html index 1077b9ab..30be2092 100644 --- a/auto_api/movement.io.validators.ValidFile.html +++ b/auto_api/movement.io.validators.ValidFile.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.validators.ValidHDF5.html b/auto_api/movement.io.validators.ValidHDF5.html index 7ee7e921..582354ee 100644 --- a/auto_api/movement.io.validators.ValidHDF5.html +++ b/auto_api/movement.io.validators.ValidHDF5.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.validators.ValidPoseTracks.html b/auto_api/movement.io.validators.ValidPoseTracks.html index f266268e..eb9c48a7 100644 --- a/auto_api/movement.io.validators.ValidPoseTracks.html +++ b/auto_api/movement.io.validators.ValidPoseTracks.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.io.validators.ValidPosesCSV.html b/auto_api/movement.io.validators.ValidPosesCSV.html index 5dd59147..5ee6b7dd 100644 --- a/auto_api/movement.io.validators.ValidPosesCSV.html +++ b/auto_api/movement.io.validators.ValidPosesCSV.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.logging.configure_logging.html b/auto_api/movement.logging.configure_logging.html index ad4e5473..56792104 100644 --- a/auto_api/movement.logging.configure_logging.html +++ b/auto_api/movement.logging.configure_logging.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.logging.log_error.html b/auto_api/movement.logging.log_error.html index f67aa0f2..b66ae6a7 100644 --- a/auto_api/movement.logging.log_error.html +++ b/auto_api/movement.logging.log_error.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_api/movement.logging.log_warning.html b/auto_api/movement.logging.log_warning.html index 84c01e72..9fba48d6 100644 --- a/auto_api/movement.logging.log_warning.html +++ b/auto_api/movement.logging.log_warning.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_examples/index.html b/auto_examples/index.html index f747f301..dfef2f10 100644 --- a/auto_examples/index.html +++ b/auto_examples/index.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
diff --git a/auto_examples/load_and_explore_poses.html b/auto_examples/load_and_explore_poses.html index 843a3a2f..0559f90c 100644 --- a/auto_examples/load_and_explore_poses.html +++ b/auto_examples/load_and_explore_poses.html @@ -40,7 +40,7 @@ - + @@ -122,7 +122,7 @@ -movement v0.0.7
+movement v0.0.8
@@ -440,7 +440,7 @@0.00B [00:00, ?B/s]
-34.8kB [00:00, 246kB/s]
+34.8kB [00:00, 253kB/s]
0.00B [00:00, ?B/s]
0.00B [00:00, ?B/s]
da.plot.line(x="time", row="space", aspect=2, size=2.5)
<xarray.plot.facetgrid.FacetGrid object at 0x7f2817159c50>
+<xarray.plot.facetgrid.FacetGrid object at 0x7fc24ee1e390>
Similarly we could plot the same keypoint’s x, y coordinates
@@ -508,7 +508,7 @@
Select and plot data with xarrayda.plot.line(x="time", row="individuals", aspect=2, size=2.5)
<xarray.plot.facetgrid.FacetGrid object at 0x7f2815d1a350>
+<xarray.plot.facetgrid.FacetGrid object at 0x7fc24ea73ad0>
@@ -532,10 +532,10 @@ Trajectory plotsplt.colorbar(label="time (sec)")
<matplotlib.colorbar.Colorbar object at 0x7f2813b5f050>
+<matplotlib.colorbar.Colorbar object at 0x7fc24b938510>
-Total running time of the script: (0 minutes 1.595 seconds)
+Total running time of the script: (0 minutes 1.882 seconds)