treescope 0.0.0.dev0__tar.gz → 0.1.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 (95) hide show
  1. treescope-0.1.0/.github/workflows/unittests.yml +32 -0
  2. treescope-0.1.0/.gitignore +28 -0
  3. treescope-0.1.0/.pylintrc +439 -0
  4. treescope-0.1.0/.readthedocs.yaml +39 -0
  5. treescope-0.1.0/.vscode/extensions.json +5 -0
  6. treescope-0.1.0/.vscode/settings.json +28 -0
  7. treescope-0.1.0/AUTHORS +8 -0
  8. treescope-0.1.0/CONTRIBUTING.md +25 -0
  9. treescope-0.1.0/LICENSE +202 -0
  10. treescope-0.1.0/PKG-INFO +148 -0
  11. treescope-0.1.0/README.md +100 -0
  12. treescope-0.1.0/docs/.gitignore +2 -0
  13. treescope-0.1.0/docs/Makefile +21 -0
  14. treescope-0.1.0/docs/_autogen_root.rst +24 -0
  15. treescope-0.1.0/docs/_include/_glue_figures.ipynb +152 -0
  16. treescope-0.1.0/docs/_static/custom.css +59 -0
  17. treescope-0.1.0/docs/_static/custom.js +64 -0
  18. treescope-0.1.0/docs/_static/readme_teaser_after.png +0 -0
  19. treescope-0.1.0/docs/_static/readme_teaser_before.png +0 -0
  20. treescope-0.1.0/docs/_templates/pzbase.rst +5 -0
  21. treescope-0.1.0/docs/_templates/pzclass.rst +79 -0
  22. treescope-0.1.0/docs/_templates/pzdata.rst +6 -0
  23. treescope-0.1.0/docs/_templates/pzmodule.rst +69 -0
  24. treescope-0.1.0/docs/_templates/pzmodule_full.rst +69 -0
  25. treescope-0.1.0/docs/api/treescope.rst +130 -0
  26. treescope-0.1.0/docs/conf.py +246 -0
  27. treescope-0.1.0/docs/ext/nb_output_cell_to_iframe.py +56 -0
  28. treescope-0.1.0/docs/ext/treescope_sphinx_customizations.py +32 -0
  29. treescope-0.1.0/docs/index.rst +125 -0
  30. treescope-0.1.0/docs/notebooks/array_visualization.ipynb +1004 -0
  31. treescope-0.1.0/docs/notebooks/building_custom_visualizations.ipynb +590 -0
  32. treescope-0.1.0/docs/notebooks/pretty_printing.ipynb +1082 -0
  33. treescope-0.1.0/pyproject.toml +81 -0
  34. treescope-0.1.0/run_tests.py +19 -0
  35. treescope-0.1.0/tests/canonical_aliases_test.py +407 -0
  36. treescope-0.1.0/tests/fixtures/__init__.py +13 -0
  37. treescope-0.1.0/tests/fixtures/treescope_examples_fixture.py +199 -0
  38. treescope-0.1.0/tests/ndarray_adapters_test.py +207 -0
  39. treescope-0.1.0/tests/renderer_test.py +1107 -0
  40. treescope-0.1.0/tests/representation_test.py +1181 -0
  41. treescope-0.1.0/tests/utils_test.py +114 -0
  42. treescope-0.1.0/treescope/__init__.py +171 -0
  43. treescope-0.1.0/treescope/_internal/__init__.py +13 -0
  44. treescope-0.1.0/treescope/_internal/api/__init__.py +13 -0
  45. treescope-0.1.0/treescope/_internal/api/array_autovisualizer.py +397 -0
  46. treescope-0.1.0/treescope/_internal/api/arrayviz.py +1034 -0
  47. treescope-0.1.0/treescope/_internal/api/autovisualize.py +128 -0
  48. treescope-0.1.0/treescope/_internal/api/default_renderer.py +209 -0
  49. treescope-0.1.0/treescope/_internal/api/ipython_integration.py +417 -0
  50. treescope-0.1.0/treescope/_internal/arrayviz_impl.py +708 -0
  51. treescope-0.1.0/treescope/_internal/docs_util.py +25 -0
  52. treescope-0.1.0/treescope/_internal/figures_impl.py +102 -0
  53. treescope-0.1.0/treescope/_internal/handlers/__init__.py +15 -0
  54. treescope-0.1.0/treescope/_internal/handlers/autovisualizer_hook.py +181 -0
  55. treescope-0.1.0/treescope/_internal/handlers/basic_types_handler.py +456 -0
  56. treescope-0.1.0/treescope/_internal/handlers/canonical_alias_postprocessor.py +124 -0
  57. treescope-0.1.0/treescope/_internal/handlers/custom_type_handlers.py +102 -0
  58. treescope-0.1.0/treescope/_internal/handlers/function_reflection_handlers.py +134 -0
  59. treescope-0.1.0/treescope/_internal/handlers/generic_pytree_handler.py +90 -0
  60. treescope-0.1.0/treescope/_internal/handlers/generic_repr_handler.py +117 -0
  61. treescope-0.1.0/treescope/_internal/handlers/repr_html_postprocessor.py +120 -0
  62. treescope-0.1.0/treescope/_internal/handlers/shared_value_postprocessor.py +351 -0
  63. treescope-0.1.0/treescope/_internal/html_encapsulation.py +385 -0
  64. treescope-0.1.0/treescope/_internal/html_escaping.py +50 -0
  65. treescope-0.1.0/treescope/_internal/js/arrayviz.js +1291 -0
  66. treescope-0.1.0/treescope/_internal/object_inspection.py +77 -0
  67. treescope-0.1.0/treescope/_internal/parts/__init__.py +22 -0
  68. treescope-0.1.0/treescope/_internal/parts/basic_parts.py +1620 -0
  69. treescope-0.1.0/treescope/_internal/parts/common_structures.py +280 -0
  70. treescope-0.1.0/treescope/_internal/parts/common_styles.py +573 -0
  71. treescope-0.1.0/treescope/_internal/parts/custom_dataclass_util.py +163 -0
  72. treescope-0.1.0/treescope/_internal/parts/embedded_iframe.py +174 -0
  73. treescope-0.1.0/treescope/_internal/parts/foldable_impl.py +460 -0
  74. treescope-0.1.0/treescope/_internal/parts/part_interface.py +379 -0
  75. treescope-0.1.0/treescope/canonical_aliases.py +557 -0
  76. treescope-0.1.0/treescope/context.py +174 -0
  77. treescope-0.1.0/treescope/dataclass_util.py +105 -0
  78. treescope-0.1.0/treescope/dtype_util.py +89 -0
  79. treescope-0.1.0/treescope/external/__init__.py +21 -0
  80. treescope-0.1.0/treescope/external/jax_support.py +606 -0
  81. treescope-0.1.0/treescope/external/numpy_support.py +314 -0
  82. treescope-0.1.0/treescope/external/torch_support.py +532 -0
  83. treescope-0.1.0/treescope/figures.py +262 -0
  84. treescope-0.1.0/treescope/formatting_util.py +110 -0
  85. treescope-0.1.0/treescope/handlers.py +66 -0
  86. treescope-0.1.0/treescope/layout_algorithms.py +244 -0
  87. treescope-0.1.0/treescope/lowering.py +444 -0
  88. treescope-0.1.0/treescope/ndarray_adapters.py +296 -0
  89. treescope-0.1.0/treescope/renderers.py +415 -0
  90. treescope-0.1.0/treescope/rendering_parts.py +115 -0
  91. treescope-0.1.0/treescope/repr_lib.py +308 -0
  92. treescope-0.1.0/treescope/type_registries.py +251 -0
  93. treescope-0.0.0.dev0/PKG-INFO +0 -4
  94. treescope-0.0.0.dev0/pyproject.toml +0 -8
  95. treescope-0.0.0.dev0/treescope/__init__.py +0 -0
@@ -0,0 +1,32 @@
1
+ name: Unittests
2
+
3
+ # Allow to trigger the workflow manually (e.g. when deps changes)
4
+ on: [push, workflow_dispatch]
5
+
6
+ jobs:
7
+ unittest-job:
8
+ runs-on: ubuntu-latest
9
+ timeout-minutes: 30
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+
18
+ # Install deps
19
+ - uses: actions/setup-python@v4
20
+ with:
21
+ python-version: 3.10.14
22
+ # Uncomment to cache of pip dependencies (if tests too slow)
23
+ # cache: pip
24
+ # cache-dependency-path: '**/pyproject.toml'
25
+
26
+ - run: pip --version
27
+ - run: pip install -e .[dev,test]
28
+ - run: pip freeze
29
+
30
+ # Run tests
31
+ - name: Run tests
32
+ run: python run_tests.py
@@ -0,0 +1,28 @@
1
+ # Compiled python modules.
2
+ *.pyc
3
+
4
+ # Byte-compiled
5
+ _pycache__/
6
+ .cache/
7
+
8
+ # Poetry, setuptools, PyPI distribution artifacts.
9
+ /*.egg-info
10
+ .eggs/
11
+ build/
12
+ dist/
13
+ poetry.lock
14
+
15
+ # Tests
16
+ .pytest_cache/
17
+
18
+ # Type checking
19
+ .pytype/
20
+
21
+ # Virtual env
22
+ .venv/
23
+
24
+ # Other
25
+ *.DS_Store
26
+
27
+ # PyCharm
28
+ .idea
@@ -0,0 +1,439 @@
1
+ # This Pylint rcfile contains a best-effort configuration to uphold the
2
+ # best-practices and style described in the Google Python style guide:
3
+ # https://google.github.io/styleguide/pyguide.html
4
+ #
5
+ # Its original canonical open-source location is:
6
+ # https://google.github.io/styleguide/pylintrc
7
+ #
8
+ # Also includes some modifications specific to this repository.
9
+
10
+ [MASTER]
11
+
12
+ # Add files or directories to the ignore list. They should be base names, not
13
+ # paths.
14
+ ignore=third_party
15
+
16
+ # Add files or directories matching the regex patterns to the ignore list. The
17
+ # regex matches against base names, not paths.
18
+ ignore-patterns=
19
+
20
+ # Pickle collected data for later comparisons.
21
+ persistent=no
22
+
23
+ # List of plugins (as comma separated values of python modules names) to load,
24
+ # usually to register additional checkers.
25
+ load-plugins=
26
+
27
+ # Use multiple processes to speed up Pylint.
28
+ jobs=4
29
+
30
+ # Allow loading of arbitrary C extensions. Extensions are imported into the
31
+ # active Python interpreter and may run arbitrary code.
32
+ unsafe-load-any-extension=no
33
+
34
+ # A comma-separated list of package or module names from where C extensions may
35
+ # be loaded. Extensions are loading into the active Python interpreter and may
36
+ # run arbitrary code.
37
+ extension-pkg-allow-list=
38
+
39
+
40
+ [MESSAGES CONTROL]
41
+
42
+ # Only show warnings with the listed confidence levels. Leave empty to show
43
+ # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
44
+ confidence=
45
+
46
+ # Enable the message, report, category or checker with the given id(s). You can
47
+ # either give multiple identifier separated by comma (,) or put this option
48
+ # multiple time (only on the command line, not in the configuration file where
49
+ # it should appear only once). See also the "--disable" option for examples.
50
+ #enable=
51
+
52
+ # Disable the message, report, category or checker with the given id(s). You
53
+ # can either give multiple identifiers separated by comma (,) or put this
54
+ # option multiple times (only on the command line, not in the configuration
55
+ # file where it should appear only once).You can also use "--disable=all" to
56
+ # disable everything first and then reenable specific checks. For example, if
57
+ # you want to run only the similarities checker, you can use "--disable=all
58
+ # --enable=similarities". If you want to run only the classes checker, but have
59
+ # no Warning level messages displayed, use"--disable=all --enable=classes
60
+ # --disable=W"
61
+ disable=abstract-method,
62
+ apply-builtin,
63
+ arguments-differ,
64
+ attribute-defined-outside-init,
65
+ backtick,
66
+ bad-option-value,
67
+ basestring-builtin,
68
+ buffer-builtin,
69
+ c-extension-no-member,
70
+ consider-using-enumerate,
71
+ cmp-builtin,
72
+ cmp-method,
73
+ coerce-builtin,
74
+ coerce-method,
75
+ delslice-method,
76
+ div-method,
77
+ duplicate-code,
78
+ eq-without-hash,
79
+ execfile-builtin,
80
+ file-builtin,
81
+ filter-builtin-not-iterating,
82
+ fixme,
83
+ getslice-method,
84
+ global-statement,
85
+ hex-method,
86
+ idiv-method,
87
+ implicit-str-concat-in-sequence,
88
+ import-error,
89
+ import-self,
90
+ import-star-module-level,
91
+ inconsistent-return-statements,
92
+ input-builtin,
93
+ intern-builtin,
94
+ invalid-str-codec,
95
+ invalid-field-call,
96
+ locally-disabled,
97
+ long-builtin,
98
+ long-suffix,
99
+ map-builtin-not-iterating,
100
+ misplaced-comparison-constant,
101
+ missing-function-docstring,
102
+ metaclass-assignment,
103
+ next-method-called,
104
+ next-method-defined,
105
+ no-absolute-import,
106
+ no-else-break,
107
+ no-else-continue,
108
+ no-else-raise,
109
+ no-else-return,
110
+ no-init, # added
111
+ no-member,
112
+ no-name-in-module,
113
+ no-self-use,
114
+ nonzero-method,
115
+ not-callable, # false positives for jax.jit
116
+ oct-method,
117
+ old-division,
118
+ old-ne-operator,
119
+ old-octal-literal,
120
+ old-raise-syntax,
121
+ parameter-unpacking,
122
+ print-statement,
123
+ raising-string,
124
+ range-builtin-not-iterating,
125
+ raw_input-builtin,
126
+ rdiv-method,
127
+ reduce-builtin,
128
+ relative-import,
129
+ reload-builtin,
130
+ round-builtin,
131
+ setslice-method,
132
+ signature-differs,
133
+ standarderror-builtin,
134
+ suppressed-message,
135
+ sys-max-int,
136
+ too-few-public-methods,
137
+ too-many-ancestors,
138
+ too-many-arguments,
139
+ too-many-boolean-expressions,
140
+ too-many-branches,
141
+ too-many-instance-attributes,
142
+ too-many-locals,
143
+ too-many-nested-blocks,
144
+ too-many-public-methods,
145
+ too-many-return-statements,
146
+ too-many-statements,
147
+ trailing-newlines,
148
+ unichr-builtin,
149
+ unicode-builtin,
150
+ unnecessary-pass,
151
+ unpacking-in-except,
152
+ useless-else-on-loop,
153
+ useless-object-inheritance,
154
+ useless-suppression,
155
+ using-cmp-argument,
156
+ wrong-import-order,
157
+ xrange-builtin,
158
+ zip-builtin-not-iterating,
159
+
160
+
161
+ [REPORTS]
162
+
163
+ # Set the output format. Available formats are text, parseable, colorized, msvs
164
+ # (visual studio) and html. You can also give a reporter class, eg
165
+ # mypackage.mymodule.MyReporterClass.
166
+ output-format=text
167
+
168
+ # Tells whether to display a full report or only the messages
169
+ reports=no
170
+
171
+ # Python expression which should return a note less than 10 (10 is the highest
172
+ # note). You have access to the variables errors warning, statement which
173
+ # respectively contain the number of errors / warnings messages and the total
174
+ # number of statements analyzed. This is used by the global evaluation report
175
+ # (RP0004).
176
+ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
177
+
178
+ # Template used to display messages. This is a python new-style format string
179
+ # used to format the message information. See doc for all details
180
+ #msg-template=
181
+
182
+
183
+ [BASIC]
184
+
185
+ # Good variable names which should always be accepted, separated by a comma
186
+ good-names=main,_
187
+
188
+ # Bad variable names which should always be refused, separated by a comma
189
+ bad-names=
190
+
191
+ # Colon-delimited sets of names that determine each other's naming style when
192
+ # the name regexes allow several styles.
193
+ name-group=
194
+
195
+ # Include a hint for the correct naming format with invalid-name
196
+ include-naming-hint=no
197
+
198
+ # List of decorators that produce properties, such as abc.abstractproperty. Add
199
+ # to this list to register other decorators that produce valid properties.
200
+ property-classes=abc.abstractproperty,cached_property.cached_property,cached_property.threaded_cached_property,cached_property.cached_property_with_ttl,cached_property.threaded_cached_property_with_ttl
201
+
202
+ # Regular expression matching correct function names
203
+ function-rgx=^(?:(?P<exempt>setUp|tearDown|setUpModule|tearDownModule)|(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
204
+
205
+ # Regular expression matching correct variable names
206
+ variable-rgx=^[a-z][a-z0-9_]*$
207
+
208
+ # Regular expression matching correct constant names
209
+ const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
210
+
211
+ # Regular expression matching correct attribute names
212
+ attr-rgx=^_{0,2}[a-z][a-z0-9_]*$
213
+
214
+ # Regular expression matching correct argument names
215
+ argument-rgx=^[a-z][a-z0-9_]*$
216
+
217
+ # Regular expression matching correct class attribute names
218
+ class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
219
+
220
+ # Regular expression matching correct inline iteration names
221
+ inlinevar-rgx=^[a-z][a-z0-9_]*$
222
+
223
+ # Regular expression matching correct class names
224
+ class-rgx=^_?[A-Z][a-zA-Z0-9]*$
225
+
226
+ # Regular expression matching correct module names
227
+ module-rgx=^(_?[a-z][a-z0-9_]*|__init__)$
228
+
229
+ # Regular expression matching correct method names
230
+ method-rgx=(?x)^(?:(?P<exempt>_[a-z0-9_]+__|runTest|setUp|tearDown|setUpTestCase|tearDownTestCase|setupSelf|tearDownClass|setUpClass|(test|assert)_*[A-Z0-9][a-zA-Z0-9_]*|next)|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9_]*)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$
231
+
232
+ # Regular expression which should only match function or class names that do
233
+ # not require a docstring.
234
+ no-docstring-rgx=(__.*__|main|test.*|.*test|.*Test)$
235
+
236
+ # Minimum line length for functions/classes that require docstrings, shorter
237
+ # ones are exempt.
238
+ docstring-min-length=10
239
+
240
+
241
+ [TYPECHECK]
242
+
243
+ # List of decorators that produce context managers, such as
244
+ # contextlib.contextmanager. Add to this list to register other decorators that
245
+ # produce valid context managers.
246
+ contextmanager-decorators=contextlib.contextmanager,contextlib2.contextmanager
247
+
248
+ # Tells whether missing members accessed in mixin class should be ignored. A
249
+ # mixin class is detected if its name ends with "mixin" (case insensitive).
250
+ ignore-mixin-members=yes
251
+
252
+ # List of module names for which member attributes should not be checked
253
+ # (useful for modules/projects where namespaces are manipulated during runtime
254
+ # and thus existing member attributes cannot be deduced by static analysis. It
255
+ # supports qualified module names, as well as Unix pattern matching.
256
+ ignored-modules=
257
+
258
+ # List of class names for which member attributes should not be checked (useful
259
+ # for classes with dynamically set attributes). This supports the use of
260
+ # qualified names.
261
+ ignored-classes=optparse.Values,thread._local,_thread._local
262
+
263
+ # List of members which are set dynamically and missed by pylint inference
264
+ # system, and so shouldn't trigger E1101 when accessed. Python regular
265
+ # expressions are accepted.
266
+ generated-members=
267
+
268
+
269
+ [FORMAT]
270
+
271
+ # Maximum number of characters on a single line.
272
+ max-line-length=80
273
+
274
+ # TODO(https://github.com/PyCQA/pylint/issues/3352): Direct pylint to exempt
275
+ # lines made too long by directives to pytype.
276
+
277
+ # Regexp for a line that is allowed to be longer than the limit.
278
+ ignore-long-lines=(?x)(
279
+ ^\s*(\#\ )?<?https?://\S+>?$|
280
+ ^\s*(from\s+\S+\s+)?import\s+.+$)
281
+
282
+ # Allow the body of an if to be on the same line as the test if there is no
283
+ # else.
284
+ single-line-if-stmt=yes
285
+
286
+ # Maximum number of lines in a module
287
+ max-module-lines=99999
288
+
289
+ # String used as indentation unit. The internal Google style guide mandates 2
290
+ # spaces. Google's externaly-published style guide says 4, consistent with
291
+ # PEP 8. Here, we use 2 spaces, for conformity with many open-sourced Google
292
+ # projects (like TensorFlow).
293
+ indent-string=' '
294
+
295
+ # Number of spaces of indent required inside a hanging or continued line.
296
+ indent-after-paren=4
297
+
298
+ # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
299
+ expected-line-ending-format=
300
+
301
+
302
+ [MISCELLANEOUS]
303
+
304
+ # List of note tags to take in consideration, separated by a comma.
305
+ notes=TODO
306
+
307
+
308
+ [STRING]
309
+
310
+ # This flag controls whether inconsistent-quotes generates a warning when the
311
+ # character used as a quote delimiter is used inconsistently within a module.
312
+ check-quote-consistency=yes
313
+
314
+
315
+ [VARIABLES]
316
+
317
+ # Tells whether we should check for unused import in __init__ files.
318
+ init-import=no
319
+
320
+ # A regular expression matching the name of dummy variables (i.e. expectedly
321
+ # not used).
322
+ dummy-variables-rgx=^\*{0,2}(_$|unused_|dummy_)
323
+
324
+ # List of additional names supposed to be defined in builtins. Remember that
325
+ # you should avoid to define new builtins when possible.
326
+ additional-builtins=
327
+
328
+ # List of strings which can identify a callback function by name. A callback
329
+ # name must start or end with one of those strings.
330
+ callbacks=cb_,_cb
331
+
332
+ # List of qualified module names which can have objects that can redefine
333
+ # builtins.
334
+ redefining-builtins-modules=six,six.moves,past.builtins,future.builtins,functools
335
+
336
+
337
+ [LOGGING]
338
+
339
+ # Logging modules to check that the string format arguments are in logging
340
+ # function parameter format
341
+ logging-modules=logging,absl.logging,tensorflow.io.logging
342
+
343
+
344
+ [SIMILARITIES]
345
+
346
+ # Minimum lines number of a similarity.
347
+ min-similarity-lines=4
348
+
349
+ # Ignore comments when computing similarities.
350
+ ignore-comments=yes
351
+
352
+ # Ignore docstrings when computing similarities.
353
+ ignore-docstrings=yes
354
+
355
+ # Ignore imports when computing similarities.
356
+ ignore-imports=no
357
+
358
+
359
+ [SPELLING]
360
+
361
+ # Spelling dictionary name. Available dictionaries: none. To make it working
362
+ # install python-enchant package.
363
+ spelling-dict=
364
+
365
+ # List of comma separated words that should not be checked.
366
+ spelling-ignore-words=
367
+
368
+ # A path to a file that contains private dictionary; one word per line.
369
+ spelling-private-dict-file=
370
+
371
+ # Tells whether to store unknown words to indicated private dictionary in
372
+ # --spelling-private-dict-file option instead of raising a message.
373
+ spelling-store-unknown-words=no
374
+
375
+
376
+ [IMPORTS]
377
+
378
+ # Deprecated modules which should not be used, separated by a comma
379
+ deprecated-modules=regsub,
380
+ TERMIOS,
381
+ Bastion,
382
+ rexec,
383
+ sets
384
+
385
+ # Create a graph of every (i.e. internal and external) dependencies in the
386
+ # given file (report RP0402 must not be disabled)
387
+ import-graph=
388
+
389
+ # Create a graph of external dependencies in the given file (report RP0402 must
390
+ # not be disabled)
391
+ ext-import-graph=
392
+
393
+ # Create a graph of internal dependencies in the given file (report RP0402 must
394
+ # not be disabled)
395
+ int-import-graph=
396
+
397
+ # Force import order to recognize a module as part of the standard
398
+ # compatibility libraries.
399
+ known-standard-library=
400
+
401
+ # Force import order to recognize a module as part of a third party library.
402
+ known-third-party=enchant, absl
403
+
404
+ # Analyse import fallback blocks. This can be used to support both Python 2 and
405
+ # 3 compatible code, which means that the block might have code that exists
406
+ # only in one or another interpreter, leading to false positives when analysed.
407
+ analyse-fallback-blocks=no
408
+
409
+
410
+ [CLASSES]
411
+
412
+ # List of method names used to declare (i.e. assign) instance attributes.
413
+ defining-attr-methods=__init__,
414
+ __new__,
415
+ setUp
416
+
417
+ # List of member names, which should be excluded from the protected access
418
+ # warning.
419
+ exclude-protected=_asdict,
420
+ _fields,
421
+ _replace,
422
+ _source,
423
+ _make
424
+
425
+ # List of valid names for the first argument in a class method.
426
+ valid-classmethod-first-arg=cls,
427
+ class_
428
+
429
+ # List of valid names for the first argument in a metaclass class method.
430
+ valid-metaclass-classmethod-first-arg=mcs
431
+
432
+
433
+ [EXCEPTIONS]
434
+
435
+ # Exceptions that will emit a warning when being caught. Defaults to
436
+ # "Exception"
437
+ overgeneral-exceptions=StandardError,
438
+ Exception,
439
+ BaseException
@@ -0,0 +1,39 @@
1
+ # Copyright 2024 The Treescope Authors.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Read the Docs configuration file
16
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
17
+
18
+ version: 2
19
+
20
+ build:
21
+ os: ubuntu-22.04
22
+ tools:
23
+ python: "3.11"
24
+
25
+ sphinx:
26
+ builder: html
27
+ configuration: docs/conf.py
28
+ fail_on_warning: false
29
+
30
+ python:
31
+ install:
32
+ # Equivalent to 'pip install .'
33
+ - method: pip
34
+ path: .
35
+ # Equivalent to 'pip install .[docs]'
36
+ - method: pip
37
+ path: .
38
+ extra_requirements:
39
+ - docs
@@ -0,0 +1,5 @@
1
+ {
2
+ "recommendations": [
3
+ "ms-python.black-formatter"
4
+ ]
5
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "files.insertFinalNewline": true,
3
+ "files.trimFinalNewlines": true,
4
+ "files.trimTrailingWhitespace": true,
5
+ "files.associations": {
6
+ ".pylintrc": "ini"
7
+ },
8
+ "python.testing.unittestEnabled": false,
9
+ "python.testing.nosetestsEnabled": false,
10
+ "python.testing.pytestEnabled": true,
11
+ "python.linting.pylintUseMinimalCheckers": false,
12
+ "[python]": {
13
+ "editor.rulers": [80],
14
+ "editor.tabSize": 2,
15
+ "editor.formatOnSave": true,
16
+ "editor.detectIndentation": false
17
+ },
18
+ "python.formatting.provider": "black",
19
+ "python.formatting.blackPath": "pyink",
20
+ "files.watcherExclude": {
21
+ "**/.git/**": true
22
+ },
23
+ "files.exclude": {
24
+ "**/__pycache__": true,
25
+ "**/.pytest_cache": true,
26
+ "**/*.egg-info": true
27
+ }
28
+ }
@@ -0,0 +1,8 @@
1
+ # This is the list of Treescope's significant contributors.
2
+ #
3
+ # This does not necessarily list everyone who has contributed code,
4
+ # especially since many employees of one corporation may be contributing.
5
+ # To see the full list of contributors, see the revision history in
6
+ # source control.
7
+ DeepMind Technologies Limited
8
+ Daniel D. Johnson
@@ -0,0 +1,25 @@
1
+ # How to Contribute
2
+
3
+ ## Contributor License Agreement
4
+
5
+ Contributions to this project must be accompanied by a Contributor License
6
+ Agreement. You (or your employer) retain the copyright to your contribution,
7
+ this simply gives us permission to use and redistribute your contributions as
8
+ part of the project. Head over to <https://cla.developers.google.com/> to see
9
+ your current agreements on file or to sign a new one.
10
+
11
+ You generally only need to submit a CLA once, so if you've already submitted one
12
+ (even if it was for a different project), you probably don't need to do it
13
+ again.
14
+
15
+ ## Code reviews
16
+
17
+ All submissions, including submissions by project members, require review. We
18
+ use GitHub pull requests for this purpose. Consult
19
+ [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
20
+ information on using pull requests.
21
+
22
+ ## Community Guidelines
23
+
24
+ This project follows [Google's Open Source Community
25
+ Guidelines](https://opensource.google/conduct/).