nbsync 0.2.2__tar.gz → 0.3.0__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 (28) hide show
  1. {nbsync-0.2.2 → nbsync-0.3.0}/PKG-INFO +1 -1
  2. {nbsync-0.2.2 → nbsync-0.3.0}/pyproject.toml +1 -1
  3. {nbsync-0.2.2 → nbsync-0.3.0}/src/nbsync/logger.py +1 -1
  4. {nbsync-0.2.2 → nbsync-0.3.0}/src/nbsync/sync.py +1 -1
  5. {nbsync-0.2.2 → nbsync-0.3.0}/tests/test_logger.py +2 -2
  6. {nbsync-0.2.2 → nbsync-0.3.0}/.devcontainer/devcontainer.json +0 -0
  7. {nbsync-0.2.2 → nbsync-0.3.0}/.devcontainer/postCreate.sh +0 -0
  8. {nbsync-0.2.2 → nbsync-0.3.0}/.devcontainer/starship.toml +0 -0
  9. {nbsync-0.2.2 → nbsync-0.3.0}/.gitattributes +0 -0
  10. {nbsync-0.2.2 → nbsync-0.3.0}/.github/workflows/ci.yaml +0 -0
  11. {nbsync-0.2.2 → nbsync-0.3.0}/.github/workflows/docs.yaml +0 -0
  12. {nbsync-0.2.2 → nbsync-0.3.0}/.github/workflows/publish.yaml +0 -0
  13. {nbsync-0.2.2 → nbsync-0.3.0}/.gitignore +0 -0
  14. {nbsync-0.2.2 → nbsync-0.3.0}/LICENSE +0 -0
  15. {nbsync-0.2.2 → nbsync-0.3.0}/README.md +0 -0
  16. {nbsync-0.2.2 → nbsync-0.3.0}/docs/index.md +0 -0
  17. {nbsync-0.2.2 → nbsync-0.3.0}/mkdocs.yaml +0 -0
  18. {nbsync-0.2.2 → nbsync-0.3.0}/src/nbsync/__init__.py +0 -0
  19. {nbsync-0.2.2 → nbsync-0.3.0}/src/nbsync/cell.py +0 -0
  20. {nbsync-0.2.2 → nbsync-0.3.0}/src/nbsync/markdown.py +0 -0
  21. {nbsync-0.2.2 → nbsync-0.3.0}/src/nbsync/notebook.py +0 -0
  22. {nbsync-0.2.2 → nbsync-0.3.0}/src/nbsync/py.typed +0 -0
  23. {nbsync-0.2.2 → nbsync-0.3.0}/tests/__init__.py +0 -0
  24. {nbsync-0.2.2 → nbsync-0.3.0}/tests/conftest.py +0 -0
  25. {nbsync-0.2.2 → nbsync-0.3.0}/tests/test_cell.py +0 -0
  26. {nbsync-0.2.2 → nbsync-0.3.0}/tests/test_markdown.py +0 -0
  27. {nbsync-0.2.2 → nbsync-0.3.0}/tests/test_notebook.py +0 -0
  28. {nbsync-0.2.2 → nbsync-0.3.0}/tests/test_sync.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbsync
3
- Version: 0.2.2
3
+ Version: 0.3.0
4
4
  Summary: A core library to synchronize Jupyter notebooks and Markdown documents, enabling seamless integration and dynamic content execution
5
5
  Project-URL: Documentation, https://daizutabi.github.io/nbsync/
6
6
  Project-URL: Source, https://github.com/daizutabi/nbsync
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "nbsync"
7
- version = "0.2.2"
7
+ version = "0.3.0"
8
8
  description = "A core library to synchronize Jupyter notebooks and Markdown documents, enabling seamless integration and dynamic content execution"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -7,7 +7,7 @@ from typing import Any
7
7
  _logger = logging.getLogger("nbsync")
8
8
 
9
9
 
10
- def configure(logger: Logger | LoggerAdapter | None = None) -> Logger | LoggerAdapter:
10
+ def set_logger(logger: Logger | LoggerAdapter | None = None) -> Logger | LoggerAdapter:
11
11
  global _logger # noqa: PLW0603
12
12
 
13
13
  if logger:
@@ -92,7 +92,7 @@ def convert(
92
92
  elem: Image | CodeBlock,
93
93
  notebooks: dict[str, Notebook],
94
94
  ) -> str | Cell:
95
- if elem.identifier not in [".", "_"]:
95
+ if elem.identifier not in [".", "_"] or "source" in elem.attributes:
96
96
  if isinstance(elem, Image):
97
97
  if elem.url not in notebooks:
98
98
  logger.warning(f"Notebook not found: {elem.url}")
@@ -23,7 +23,7 @@ def test_default_logger():
23
23
  def test_configure(reset_logger):
24
24
  custom_logger = logging.getLogger("custom_logger")
25
25
 
26
- result = logger.configure(custom_logger)
26
+ result = logger.set_logger(custom_logger)
27
27
 
28
28
  assert result is custom_logger
29
29
  assert logger._logger is custom_logger
@@ -34,7 +34,7 @@ def test_configure_no_args(reset_logger):
34
34
  custom_logger = logging.getLogger("custom_logger")
35
35
  logger._logger = custom_logger
36
36
 
37
- result = logger.configure()
37
+ result = logger.set_logger()
38
38
 
39
39
  assert result is custom_logger
40
40
  assert logger._logger is custom_logger
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes