add new debug messages
MODIFY
.github/workflows/main.yaml
.github/workflows/main.yaml
@@ -53,7 +53,7 @@ jobs:
- name: Run Tests
shell: bash -l {0}
run: |
- py.test tests -k caching_copying -x -v --redirect-dask-worker-logs-to-stdout=DEBUG -s \
+ py.test tests -k caching_copying -x -v --redirect-dask-worker-logs-to-stdout=DEBUG \
--cov=pangeo_forge_recipes --cov-config .coveragerc --cov-report term-missing
coverage xml
- name: Codecov

MODIFY
pangeo_forge_recipes/storage.py
pangeo_forge_recipes/storage.py
@@ -106,7 +106,10 @@ class FSSpecTarget(AbstractTarget):
@contextmanager
def open(self, path: str, **kwargs) -> Iterator[None]:
"""Open file with a context manager."""
- with self.fs.open(self._full_path(path), **kwargs) as f:
+ full_path = self._full_path(path)
+ logger.debug(f"entering fs.open context manager for {full_path}")
+ with self.fs.open(full_path, **kwargs) as f:
+ logger.debug(f"entered fs.open context manager for {full_path}")
yield f
def __post_init__(self):

MODIFY
tests/conftest.py
tests/conftest.py
@@ -242,7 +242,9 @@ def dask_cluster(request):
for log in ["pangeo_forge_recipes", "fsspec"]:
logger = logging.getLogger(log)
+ formatter = logging.Formatter("%(name)s - %(levelname)s - %(message)s")
handler = logging.StreamHandler()
+ handler.setFormatter(formatter)
handler.setLevel(level)
logger.setLevel(level)
logger.addHandler(handler)

add new debug messages