pastastore 1.10.2__py3-none-any.whl → 1.12.0__py3-none-any.whl

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.
docs/conf.py CHANGED
@@ -53,8 +53,7 @@ extensions = [
53
53
  "sphinx.ext.viewcode",
54
54
  "IPython.sphinxext.ipython_console_highlighting", # lowercase didn't work
55
55
  "sphinx.ext.autosectionlabel",
56
- "nbsphinx",
57
- "nbsphinx_link",
56
+ "myst_nb",
58
57
  ]
59
58
 
60
59
  # Add any paths that contain templates here, relative to this directory.
@@ -114,102 +113,16 @@ html_theme_options = {
114
113
  # Add any paths that contain custom static files (such as style sheets) here,
115
114
  # relative to this directory. They are copied after the builtin static files,
116
115
  # so a file named "default.css" will overwrite the builtin "default.css".
117
- html_static_path = ["_static"]
116
+ # html_static_path = ["_static"]
118
117
 
119
- # Custom sidebar templates, must be a dictionary that maps document names
120
- # to template names.
121
- #
122
- # The default sidebars (for documents that don't match any pattern) are
123
- # defined by theme itself. Builtin themes are using these templates by
124
- # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
125
- # 'searchbox.html']``.
126
- #
127
- # html_sidebars = {}
128
-
129
- # -- Options for HTMLHelp output ---------------------------------------------
130
-
131
- # Output file base name for HTML help builder.
132
- htmlhelp_basename = "pastastoredoc"
133
-
134
-
135
- # -- Options for LaTeX output ------------------------------------------------
136
-
137
- latex_elements = {
138
- # The paper size ('letterpaper' or 'a4paper').
139
- #
140
- # 'papersize': 'letterpaper',
141
- # The font size ('10pt', '11pt' or '12pt').
142
- #
143
- # 'pointsize': '10pt',
144
- # Additional stuff for the LaTeX preamble.
145
- #
146
- "preamble": r"""\makeatletter
147
- \def\UTFviii@defined#1{%
148
- \ifx#1\relax
149
- -%
150
- \else\expandafter
151
- #1%
152
- \fi
153
- }
154
-
155
- \makeatother""",
156
- # Latex figure (float) alignment
157
- #
158
- # 'figure_align': 'htbp',
159
- }
160
-
161
- # Grouping the document tree into LaTeX files. List of tuples
162
- # (source start file, target name, title,
163
- # author, documentclass [howto, manual, or own class]).
164
- latex_documents = [
165
- (
166
- master_doc,
167
- "pastastore.tex",
168
- "pastastore Documentation",
169
- "D.A. Brakenhoff",
170
- "manual",
171
- ),
172
- ]
173
-
174
-
175
- # -- Options for manual page output ------------------------------------------
176
-
177
- # One entry per manual page. List of tuples
178
- # (source start file, name, description, authors, manual section).
179
- man_pages = [(master_doc, "pastastore", "pastastore Documentation", [author], 1)]
180
118
 
119
+ # -- myst_nb options ------------------------------------------------------------------
181
120
 
182
- # -- Options for Texinfo output ----------------------------------------------
183
-
184
- # Grouping the document tree into Texinfo files. List of tuples
185
- # (source start file, target name, title, author,
186
- # dir menu entry, description, category)
187
- texinfo_documents = [
188
- (
189
- master_doc,
190
- "pastastore",
191
- "pastastore Documentation",
192
- author,
193
- "pastastore",
194
- "Tools for managing time series and Pastas models",
195
- "Miscellaneous",
196
- ),
197
- ]
198
-
199
-
200
- # -- Options for Epub output -------------------------------------------------
201
-
202
- # Bibliographic Dublin Core info.
203
- epub_title = project
204
-
205
- # The unique identifier of the text. This can be a ISBN number
206
- # or the project homepage.
207
- #
208
- # epub_identifier = ''
209
-
210
- # A unique identification for the text.
211
- #
212
- # epub_uid = ''
121
+ nb_execution_allow_errors = True # Allow errors in notebooks, to see the error online
122
+ nb_execution_mode = "off"
123
+ nb_merge_streams = True
213
124
 
214
- # A list of files that should not be packed into the epub file.
215
- epub_exclude_files = ["search.html"]
125
+ myst_enable_extensions = ["dollarmath", "amsmath"]
126
+ myst_dmath_double_inline = True
127
+ nb_render_markdown_format = "myst" # Enable MyST markdown parsing in notebooks
128
+ nb_render_text_lexer = "myst-ansi" # Better rendering of ANSI output
pastastore/__init__.py CHANGED
@@ -1,4 +1,6 @@
1
1
  # ruff: noqa: F401 D104
2
+ import logging
3
+
2
4
  from pastastore import connectors, styling, util
3
5
  from pastastore.connectors import (
4
6
  ArcticDBConnector,
@@ -6,9 +8,11 @@ from pastastore.connectors import (
6
8
  PasConnector,
7
9
  )
8
10
  from pastastore.store import PastaStore
11
+ from pastastore.util import get_color_logger
9
12
  from pastastore.version import __version__, show_versions
10
13
 
14
+ logger = get_color_logger("INFO", logger_name="pastastore")
11
15
  try:
12
16
  from pastastore import extensions
13
17
  except ModuleNotFoundError:
14
- print("Could not import extensions module. Update pastas to >=1.3.0!")
18
+ logging.warning("Could not import extensions module. Update pastas to >=1.3.0!")