knit-graphs 0.0.10__tar.gz → 0.0.12__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.
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/PKG-INFO +3 -2
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/conf.py +71 -71
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/index.rst +0 -4
- knit_graphs-0.0.12/pyproject.toml +251 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/Course.py +64 -41
- knit_graphs-0.0.12/src/knit_graphs/Knit_Graph.py +209 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/Knit_Graph_Visualizer.py +386 -185
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/Loop.py +124 -117
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/Pull_Direction.py +5 -2
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/Yarn.py +257 -219
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/artin_wale_braids/Crossing_Direction.py +2 -0
- knit_graphs-0.0.12/src/knit_graphs/artin_wale_braids/Loop_Braid_Graph.py +96 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/artin_wale_braids/Wale.py +67 -79
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/artin_wale_braids/Wale_Braid.py +8 -2
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/artin_wale_braids/Wale_Braid_Word.py +45 -31
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/artin_wale_braids/Wale_Group.py +53 -43
- knit_graphs-0.0.12/src/knit_graphs/basic_knit_graph_generators.py +207 -0
- knit_graphs-0.0.12/src/knit_graphs/directed_loop_graph.py +454 -0
- knit_graphs-0.0.12/src/knit_graphs/knit_graph_builder.py +187 -0
- knit_graphs-0.0.12/src/knit_graphs/knit_graph_errors/__init__.py +0 -0
- knit_graphs-0.0.12/src/knit_graphs/knit_graph_errors/knit_graph_error.py +30 -0
- knit_graphs-0.0.12/src/knit_graphs/py.typed +0 -0
- knit_graphs-0.0.10/pyproject.toml +0 -296
- knit_graphs-0.0.10/src/knit_graphs/Knit_Graph.py +0 -301
- knit_graphs-0.0.10/src/knit_graphs/artin_wale_braids/Loop_Braid_Graph.py +0 -105
- knit_graphs-0.0.10/src/knit_graphs/basic_knit_graph_generators.py +0 -251
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/LICENSE +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/README.md +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/Makefile +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/make.bat +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.Course.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.Knit_Graph.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.Knit_Graph_Visualizer.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.Loop.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.Pull_Direction.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.Yarn.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.artin_wale_braids.Crossing_Direction.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.artin_wale_braids.Loop_Braid_Graph.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.artin_wale_braids.Wale.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.artin_wale_braids.Wale_Braid.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.artin_wale_braids.Wale_Braid_Word.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.artin_wale_braids.Wale_Group.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.artin_wale_braids.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.basic_knit_graph_generators.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/api/knit_graphs.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/docs/source/installation.rst +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/__init__.py +0 -0
- {knit_graphs-0.0.10 → knit_graphs-0.0.12}/src/knit_graphs/artin_wale_braids/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: knit-graphs
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
4
4
|
Summary: A graph representation of knitted structures where each loop is a node and edges represent yarn and stitch relationships.
|
|
5
5
|
Home-page: https://mhofmann-khoury.github.io/knit_graph/
|
|
6
6
|
License: MIT
|
|
@@ -20,8 +20,9 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
22
|
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Classifier: Typing :: Typed
|
|
23
24
|
Requires-Dist: networkx (>=3.5)
|
|
24
|
-
Requires-Dist: plotly (>=6.3.0
|
|
25
|
+
Requires-Dist: plotly (>=6.3.0)
|
|
25
26
|
Project-URL: Documentation, https://mhofmann-khoury.github.io/knit_graph/
|
|
26
27
|
Project-URL: Repository, https://github.com/mhofmann-Khoury/knit_graph/
|
|
27
28
|
Description-Content-Type: text/markdown
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
Configuration file for the Sphinx documentation builder.
|
|
3
|
+
=============================================================================
|
|
4
|
+
SPHINX DOCUMENTATION CONFIGURATION
|
|
5
|
+
=============================================================================
|
|
6
|
+
This file configures how Sphinx generates documentation from your Python code.
|
|
7
|
+
For the full list of built-in configuration values, see:
|
|
8
|
+
https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
import os
|
|
@@ -19,17 +19,17 @@ from importlib.metadata import PackageNotFoundError, version
|
|
|
19
19
|
# Add the project root and source directory to Python path so Sphinx can import your modules
|
|
20
20
|
|
|
21
21
|
# Path to your source code (adjust if not using src/ layout)
|
|
22
|
-
sys.path.insert(0, os.path.abspath(
|
|
23
|
-
sys.path.insert(0, os.path.abspath(
|
|
24
|
-
sys.path.insert(0, os.path.abspath(
|
|
22
|
+
sys.path.insert(0, os.path.abspath("..")) # Project root
|
|
23
|
+
sys.path.insert(0, os.path.abspath("../src")) # Source directory
|
|
24
|
+
sys.path.insert(0, os.path.abspath(".")) # Docs directory
|
|
25
25
|
|
|
26
26
|
# =============================================================================
|
|
27
27
|
# PROJECT INFORMATION
|
|
28
28
|
# =============================================================================
|
|
29
29
|
|
|
30
|
-
project =
|
|
31
|
-
copyright = f
|
|
32
|
-
author =
|
|
30
|
+
project = "knit-graphs"
|
|
31
|
+
copyright = f"{datetime.now().year}, Megan Hofmann"
|
|
32
|
+
author = "Megan Hofmann"
|
|
33
33
|
|
|
34
34
|
try:
|
|
35
35
|
# Get version from installed package metadata
|
|
@@ -49,19 +49,17 @@ release = version
|
|
|
49
49
|
# Extensions to enable (these add functionality to Sphinx)
|
|
50
50
|
extensions = [
|
|
51
51
|
# Core Sphinx extensions
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
"sphinx.ext.autodoc", # Generate docs from docstrings
|
|
53
|
+
"sphinx.ext.autosummary", # Generate summary tables automatically
|
|
54
|
+
"sphinx.ext.viewcode", # Add [source] links to documentation
|
|
55
|
+
"sphinx.ext.napoleon", # Support Google/NumPy docstring styles
|
|
56
|
+
"sphinx.ext.intersphinx", # Link to other project docs (e.g., Python docs)
|
|
57
|
+
"sphinx.ext.githubpages", # Publish to GitHub Pages (.nojekyll file)
|
|
58
|
+
"sphinx.ext.todo", # Support TODO items in docs
|
|
59
|
+
"sphinx.ext.coverage", # Check documentation coverage
|
|
60
|
+
"sphinx.ext.doctest", # Test code snippets in documentation
|
|
62
61
|
# Third-party extensions (these need to be installed)
|
|
63
|
-
|
|
64
|
-
'myst_parser', # Support for Markdown files (optional)
|
|
62
|
+
"myst_parser", # Support for Markdown files (optional)
|
|
65
63
|
]
|
|
66
64
|
|
|
67
65
|
# =============================================================================
|
|
@@ -70,19 +68,19 @@ extensions = [
|
|
|
70
68
|
|
|
71
69
|
# File extensions that Sphinx will process
|
|
72
70
|
source_suffix = {
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
".rst": None, # RestructuredText (default)
|
|
72
|
+
".md": "myst_parser", # Markdown (requires myst_parser extension)
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
# The master toctree document (main page)
|
|
78
|
-
master_doc =
|
|
76
|
+
master_doc = "index"
|
|
79
77
|
|
|
80
78
|
# Files and directories to exclude from processing
|
|
81
79
|
exclude_patterns = [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
"_build", # Build output directory
|
|
81
|
+
"Thumbs.db", # Windows thumbnail cache
|
|
82
|
+
".DS_Store", # macOS metadata
|
|
83
|
+
"**.ipynb_checkpoints", # Jupyter notebook checkpoints
|
|
86
84
|
]
|
|
87
85
|
|
|
88
86
|
# =============================================================================
|
|
@@ -90,31 +88,29 @@ exclude_patterns = [
|
|
|
90
88
|
# =============================================================================
|
|
91
89
|
|
|
92
90
|
# The theme to use for HTML pages
|
|
93
|
-
html_theme =
|
|
91
|
+
html_theme = "sphinx_rtd_theme" # Read the Docs theme (clean, professional)
|
|
94
92
|
|
|
95
93
|
# Directories containing static files (CSS, JS, images)
|
|
96
|
-
html_static_path = [
|
|
94
|
+
html_static_path = ["_static"]
|
|
97
95
|
|
|
98
96
|
|
|
99
97
|
# Theme-specific options
|
|
100
98
|
html_theme_options = {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
'style_nav_header_background': '#2980B9', # Header background color
|
|
107
|
-
|
|
99
|
+
"logo_only": False, # Show project name with logo
|
|
100
|
+
"prev_next_buttons_location": "bottom", # Navigation button placement
|
|
101
|
+
"style_external_links": True, # Style external links differently
|
|
102
|
+
"vcs_pageview_mode": "", # Version control integration
|
|
103
|
+
"style_nav_header_background": "#2980B9", # Header background color
|
|
108
104
|
# Table of contents options
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
"collapse_navigation": True, # Collapse subsections in nav
|
|
106
|
+
"sticky_navigation": True, # Keep navigation visible on scroll
|
|
107
|
+
"navigation_depth": 4, # Maximum navigation depth
|
|
108
|
+
"includehidden": True, # Include hidden toctrees
|
|
109
|
+
"titles_only": False, # Show subsection titles in nav
|
|
114
110
|
}
|
|
115
111
|
|
|
116
112
|
# Additional HTML options
|
|
117
|
-
html_title = f
|
|
113
|
+
html_title = f"{project} Documentation" # Browser window title
|
|
118
114
|
html_short_title = project # Short title for navigation
|
|
119
115
|
|
|
120
116
|
|
|
@@ -136,20 +132,20 @@ html_short_title = project # Short title for navigation
|
|
|
136
132
|
|
|
137
133
|
# Default options for all autodoc directives
|
|
138
134
|
autodoc_default_options = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
135
|
+
"members": True, # Include all members
|
|
136
|
+
"member-order": "bysource", # Order members as they appear in source
|
|
137
|
+
"special-members": "__init__", # Include __init__ methods
|
|
138
|
+
"undoc-members": True, # Include members without docstrings
|
|
139
|
+
"exclude-members": "__weakref__", # Exclude certain members
|
|
140
|
+
"show-inheritance": True, # Show class inheritance
|
|
141
|
+
"inherited-members": True, # Include inherited methods
|
|
146
142
|
}
|
|
147
143
|
|
|
148
144
|
# How to display class signatures
|
|
149
145
|
autodoc_class_signature = "mixed" # Show __init__ parameters with class
|
|
150
146
|
|
|
151
147
|
# Order of members in documentation
|
|
152
|
-
autodoc_member_order =
|
|
148
|
+
autodoc_member_order = "bysource" # bysource, alphabetical, or groupwise
|
|
153
149
|
|
|
154
150
|
# Mock imports for modules that might not be available during doc building
|
|
155
151
|
# Add any modules that cause import errors during doc building
|
|
@@ -159,6 +155,10 @@ autodoc_mock_imports = [
|
|
|
159
155
|
# 'some_optional_dependency',
|
|
160
156
|
]
|
|
161
157
|
|
|
158
|
+
# Enable type hints in signatures
|
|
159
|
+
autodoc_typehints = "signature" # Show type hints in function signatures
|
|
160
|
+
autodoc_typehints_description_target = "documented" # Where to show type info
|
|
161
|
+
|
|
162
162
|
# =============================================================================
|
|
163
163
|
# AUTOSUMMARY CONFIGURATION
|
|
164
164
|
# =============================================================================
|
|
@@ -193,13 +193,13 @@ napoleon_attr_annotations = True # Include attribute annotations
|
|
|
193
193
|
# Links to external documentation
|
|
194
194
|
|
|
195
195
|
intersphinx_mapping = {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
196
|
+
"python": ("https://docs.python.org/3", None),
|
|
197
|
+
"numpy": ("https://numpy.org/doc/stable/", None),
|
|
198
|
+
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
|
|
199
|
+
"matplotlib": ("https://matplotlib.org/stable/", None),
|
|
200
|
+
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
|
|
201
|
+
"sklearn": ("https://scikit-learn.org/stable/", None),
|
|
202
|
+
"typing": ("https://typing.readthedocs.io/en/latest/", None),
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
# =============================================================================
|
|
@@ -207,10 +207,8 @@ intersphinx_mapping = {
|
|
|
207
207
|
# =============================================================================
|
|
208
208
|
# Controls how type hints are displayed in documentation
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
# Note: These settings work with sphinx.ext.autodoc built-in type hint support
|
|
211
211
|
always_document_param_types = True # Always show parameter types
|
|
212
|
-
typehints_document_rtype = True # Document return types
|
|
213
|
-
typehints_use_rtype = True # Use :rtype: directive for return types
|
|
214
212
|
|
|
215
213
|
# =============================================================================
|
|
216
214
|
# TODO EXTENSION CONFIGURATION
|
|
@@ -245,16 +243,17 @@ add_module_names = False # Don't prepend module names to functions
|
|
|
245
243
|
show_authors = False # Don't show author info by default
|
|
246
244
|
|
|
247
245
|
# Syntax highlighting style
|
|
248
|
-
pygments_style =
|
|
246
|
+
pygments_style = "sphinx" # Code highlighting theme
|
|
249
247
|
|
|
250
248
|
# Language for content that doesn't specify a language
|
|
251
|
-
language =
|
|
249
|
+
language = "en"
|
|
252
250
|
|
|
253
251
|
|
|
254
252
|
# =============================================================================
|
|
255
253
|
# CUSTOM FUNCTIONS AND SETUP
|
|
256
254
|
# =============================================================================
|
|
257
255
|
|
|
256
|
+
|
|
258
257
|
def autodoc_skip_member(app, what, name, obj, skip, options):
|
|
259
258
|
"""
|
|
260
259
|
Custom function to control which members are included in documentation.
|
|
@@ -288,15 +287,16 @@ def setup(app):
|
|
|
288
287
|
app: The Sphinx application instance
|
|
289
288
|
"""
|
|
290
289
|
# Connect custom functions to Sphinx events
|
|
291
|
-
app.connect(
|
|
290
|
+
app.connect("autodoc-skip-member", autodoc_skip_member)
|
|
292
291
|
|
|
293
292
|
# Return extension metadata
|
|
294
293
|
return {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
"version": version,
|
|
295
|
+
"parallel_read_safe": True,
|
|
296
|
+
"parallel_write_safe": True,
|
|
298
297
|
}
|
|
299
298
|
|
|
299
|
+
|
|
300
300
|
# =============================================================================
|
|
301
301
|
# CHECKLIST FOR SPHINX SETUP
|
|
302
302
|
# =============================================================================
|
|
@@ -3,10 +3,6 @@ knit-graphs
|
|
|
3
3
|
|
|
4
4
|
A graph representation of knitted structures where each loop is a node and edges represent yarn and stitch relationships.
|
|
5
5
|
|
|
6
|
-
.. image:: https://img.shields.io/github/workflow/status/mhofmann-Khoury/knit-graphs/CI
|
|
7
|
-
:target: https://github.com/mhofmann-Khoury/knit-graphs/actions
|
|
8
|
-
:alt: Build Status
|
|
9
|
-
|
|
10
6
|
.. image:: https://img.shields.io/pypi/v/knit-graphs
|
|
11
7
|
:target: https://pypi.org/project/knit-graphs/
|
|
12
8
|
:alt: PyPI Version
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# POETRY BUILD SYSTEM CONFIGURATION
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# This section tells Poetry how to build your package
|
|
5
|
+
[build-system]
|
|
6
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"] # Poetry build backend version
|
|
7
|
+
build-backend = "poetry.core.masonry.api" # Use Poetry's build system
|
|
8
|
+
|
|
9
|
+
# =============================================================================
|
|
10
|
+
# PROJECT METADATA AND CONFIGURATION
|
|
11
|
+
# =============================================================================
|
|
12
|
+
# All the information about your project that will appear on PyPI
|
|
13
|
+
[tool.poetry]
|
|
14
|
+
name = "knit-graphs"
|
|
15
|
+
version = "0.0.12"
|
|
16
|
+
description = "A graph representation of knitted structures where each loop is a node and edges represent yarn and stitch relationships."
|
|
17
|
+
authors = ["Megan Hofmann <m.hofmann@northeastern.edu>"]
|
|
18
|
+
maintainers = ["Megan Hofmann <m.hofmann@northeastern.edu>"]
|
|
19
|
+
license = "MIT" # License type (shows up on PyPI)
|
|
20
|
+
readme = "README.md" # File to use as long description on PyPI
|
|
21
|
+
homepage = "https://mhofmann-khoury.github.io/knit_graph/"
|
|
22
|
+
repository = "https://github.com/mhofmann-Khoury/knit_graph/"
|
|
23
|
+
documentation = "https://mhofmann-khoury.github.io/knit_graph/"
|
|
24
|
+
keywords = [
|
|
25
|
+
"ACT Lab",
|
|
26
|
+
"Northeastern University",
|
|
27
|
+
"knit",
|
|
28
|
+
"machine knit",
|
|
29
|
+
"fabrication",
|
|
30
|
+
"textile"]
|
|
31
|
+
classifiers = [ # PyPI classifiers for categorization
|
|
32
|
+
"Development Status :: 3 - Alpha", # Update as project matures (Alpha -> Beta -> Production/Stable)
|
|
33
|
+
"Natural Language :: English", # Human language
|
|
34
|
+
"Intended Audience :: Developers", # Add other audiences if relevant
|
|
35
|
+
"License :: OSI Approved :: MIT License", # Update if using different license
|
|
36
|
+
"Operating System :: OS Independent", # Platform support
|
|
37
|
+
"Programming Language :: Python :: 3", # Python support
|
|
38
|
+
"Programming Language :: Python :: 3.11", # Update supported Python versions
|
|
39
|
+
"Programming Language :: Python :: 3.12",
|
|
40
|
+
"Programming Language :: Python :: 3.13", # Latest Python version
|
|
41
|
+
"Topic :: Scientific/Engineering",
|
|
42
|
+
"Typing :: Typed", # Signals type hint support
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
# =============================================================================
|
|
46
|
+
# PACKAGE STRUCTURE CONFIGURATION
|
|
47
|
+
# =============================================================================
|
|
48
|
+
# Tell Poetry where to find your Python packages in your repository
|
|
49
|
+
packages = [
|
|
50
|
+
{include = "knit_graphs", from = "src"},
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
# =============================================================================
|
|
54
|
+
# FILES TO INCLUDE/EXCLUDE IN DISTRIBUTION
|
|
55
|
+
# =============================================================================
|
|
56
|
+
# Include additional files when building the package for distribution
|
|
57
|
+
include = [
|
|
58
|
+
"README.md", # Project description
|
|
59
|
+
"LICENSE", # License file
|
|
60
|
+
"docs/**/*", # All documentation files
|
|
61
|
+
"src/knit_graphs/py.typed", # PEP 561 marker for type information
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
# Exclude files from the distribution package (keeps package size down)
|
|
65
|
+
exclude = [
|
|
66
|
+
"tests/**/*", # Don't include test files in distribution
|
|
67
|
+
"docs/_build/**/*", # Don't include built documentation
|
|
68
|
+
"*.pyc", # No compiled Python files
|
|
69
|
+
"__pycache__/**/*", # No Python cache directories
|
|
70
|
+
".coverage", # No coverage data files
|
|
71
|
+
"htmlcov/**/*", # No coverage HTML reports
|
|
72
|
+
".git/**/*", # No git files
|
|
73
|
+
".github/**/*", # No GitHub workflow files
|
|
74
|
+
".pytest_cache/**/*", # No pytest cache
|
|
75
|
+
".mypy_cache/**/*", # No MyPy cache
|
|
76
|
+
"*.egg-info/**/*", # No build artifacts
|
|
77
|
+
"dist/**/*", # No distribution files
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
# =============================================================================
|
|
81
|
+
# RUNTIME DEPENDENCIES
|
|
82
|
+
# =============================================================================
|
|
83
|
+
# These are packages your project needs to run in production
|
|
84
|
+
[tool.poetry.dependencies]
|
|
85
|
+
python = ">=3.11,<3.14"
|
|
86
|
+
networkx = ">=3.5"
|
|
87
|
+
plotly = ">=6.3.0"
|
|
88
|
+
|
|
89
|
+
# =============================================================================
|
|
90
|
+
# DEVELOPMENT DEPENDENCIES
|
|
91
|
+
# =============================================================================
|
|
92
|
+
# These packages are only needed during development and testing
|
|
93
|
+
[tool.poetry.group.dev.dependencies]
|
|
94
|
+
importlib-resources = ">=6.5.2"
|
|
95
|
+
coverage = "^7.3.0"
|
|
96
|
+
black = "^24.10.0"
|
|
97
|
+
ruff = "^0.7.4"
|
|
98
|
+
isort = "^5.13.2"
|
|
99
|
+
mypy = "^1.13.0"
|
|
100
|
+
pre-commit = "^3.8.0"
|
|
101
|
+
twine = "^5.1.0"
|
|
102
|
+
|
|
103
|
+
# =============================================================================
|
|
104
|
+
# DOCUMENTATION-SPECIFIC DEPENDENCIES
|
|
105
|
+
# =============================================================================
|
|
106
|
+
# Separate dependency group for building documentation (allows selective installation)
|
|
107
|
+
[tool.poetry.group.docs.dependencies]
|
|
108
|
+
sphinx = "^7.4.0"
|
|
109
|
+
sphinx-rtd-theme = "^3.0.0"
|
|
110
|
+
sphinx-autoapi = "^3.4.0"
|
|
111
|
+
myst-parser = "^4.0.0"
|
|
112
|
+
|
|
113
|
+
# =============================================================================
|
|
114
|
+
# BLACK CODE FORMATTER CONFIGURATION
|
|
115
|
+
# =============================================================================
|
|
116
|
+
[tool.black]
|
|
117
|
+
line-length = 120
|
|
118
|
+
target-version = ["py311"]
|
|
119
|
+
extend-exclude = "tests"
|
|
120
|
+
|
|
121
|
+
# =============================================================================
|
|
122
|
+
# RUFF LINTER CONFIGURATION
|
|
123
|
+
# =============================================================================
|
|
124
|
+
[tool.ruff]
|
|
125
|
+
line-length = 120
|
|
126
|
+
target-version = "py311"
|
|
127
|
+
|
|
128
|
+
exclude = [
|
|
129
|
+
".git",
|
|
130
|
+
".mypy_cache",
|
|
131
|
+
".ruff_cache",
|
|
132
|
+
".venv",
|
|
133
|
+
"__pycache__",
|
|
134
|
+
"build",
|
|
135
|
+
"dist",
|
|
136
|
+
"docs",
|
|
137
|
+
"tests",
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
[tool.ruff.lint]
|
|
141
|
+
select = [
|
|
142
|
+
"E", # pycodestyle errors
|
|
143
|
+
"W", # pycodestyle warnings
|
|
144
|
+
"F", # pyflakes
|
|
145
|
+
"I", # isort
|
|
146
|
+
"N", # pep8-naming
|
|
147
|
+
"UP", # pyupgrade
|
|
148
|
+
"B", # flake8-bugbear
|
|
149
|
+
"C4", # flake8-comprehensions
|
|
150
|
+
"SIM", # flake8-simplify
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
ignore = [
|
|
154
|
+
"E501", # Line too long (handled by Black)
|
|
155
|
+
"E741", # Ambiguous variable name (l, O, I) - allow single-letter loop variables
|
|
156
|
+
"N801", # CapWords convention ignored
|
|
157
|
+
"N999", # Module name conventions ignored
|
|
158
|
+
"UP038", # Use older isinstance tuple syntax for mypy compatibility
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
[tool.ruff.lint.per-file-ignores]
|
|
162
|
+
"tests/**/*.py" = [
|
|
163
|
+
"S101", # Allow assert statements in tests
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
[tool.ruff.format]
|
|
167
|
+
quote-style = "double"
|
|
168
|
+
indent-style = "space"
|
|
169
|
+
|
|
170
|
+
# =============================================================================
|
|
171
|
+
# ISORT IMPORT SORTER CONFIGURATION
|
|
172
|
+
# =============================================================================
|
|
173
|
+
[tool.isort]
|
|
174
|
+
profile = "black"
|
|
175
|
+
line_length = 120
|
|
176
|
+
multi_line_output = 3
|
|
177
|
+
include_trailing_comma = true
|
|
178
|
+
force_grid_wrap = 0
|
|
179
|
+
use_parentheses = true
|
|
180
|
+
ensure_newline_before_comments = true
|
|
181
|
+
known_first_party = ["knit_graphs"]
|
|
182
|
+
skip_glob = ["tests/*"]
|
|
183
|
+
|
|
184
|
+
# =============================================================================
|
|
185
|
+
# MYPY STATIC TYPE CHECKER CONFIGURATION
|
|
186
|
+
# =============================================================================
|
|
187
|
+
[tool.mypy]
|
|
188
|
+
python_version = "3.11"
|
|
189
|
+
warn_return_any = true
|
|
190
|
+
warn_unused_configs = true
|
|
191
|
+
disallow_untyped_defs = true
|
|
192
|
+
disallow_incomplete_defs = true
|
|
193
|
+
check_untyped_defs = true
|
|
194
|
+
disallow_untyped_decorators = true
|
|
195
|
+
no_implicit_optional = true
|
|
196
|
+
warn_redundant_casts = true
|
|
197
|
+
warn_unused_ignores = true
|
|
198
|
+
warn_no_return = false
|
|
199
|
+
warn_unreachable = true
|
|
200
|
+
strict_equality = true
|
|
201
|
+
show_error_codes = true
|
|
202
|
+
ignore_missing_imports = true
|
|
203
|
+
allow_redefinition = true
|
|
204
|
+
allow_untyped_globals = true
|
|
205
|
+
implicit_reexport = true
|
|
206
|
+
|
|
207
|
+
disable_error_code = [
|
|
208
|
+
"attr-defined",
|
|
209
|
+
"no-redef",
|
|
210
|
+
]
|
|
211
|
+
|
|
212
|
+
exclude = [
|
|
213
|
+
"tests/",
|
|
214
|
+
]
|
|
215
|
+
|
|
216
|
+
[[tool.mypy.overrides]]
|
|
217
|
+
module = "tests.*"
|
|
218
|
+
disallow_untyped_defs = false
|
|
219
|
+
disallow_incomplete_defs = false
|
|
220
|
+
check_untyped_defs = false
|
|
221
|
+
|
|
222
|
+
# =============================================================================
|
|
223
|
+
# COVERAGE.PY CONFIGURATION
|
|
224
|
+
# =============================================================================
|
|
225
|
+
[tool.coverage.run]
|
|
226
|
+
source = ["src"]
|
|
227
|
+
omit = [
|
|
228
|
+
"*/tests/*",
|
|
229
|
+
"*/test_*",
|
|
230
|
+
"*/__pycache__/*",
|
|
231
|
+
"*/site-packages/*",
|
|
232
|
+
"*/.venv/*",
|
|
233
|
+
]
|
|
234
|
+
branch = true
|
|
235
|
+
|
|
236
|
+
[tool.coverage.report]
|
|
237
|
+
exclude_lines = [
|
|
238
|
+
"pragma: no cover",
|
|
239
|
+
"def __repr__",
|
|
240
|
+
"if self.debug:",
|
|
241
|
+
"if settings.DEBUG",
|
|
242
|
+
"raise AssertionError",
|
|
243
|
+
"raise NotImplementedError",
|
|
244
|
+
"if 0:",
|
|
245
|
+
"if __name__ == .__main__.:",
|
|
246
|
+
"class .*\\bProtocol\\):",
|
|
247
|
+
"@(abc\\.)?abstractmethod",
|
|
248
|
+
]
|
|
249
|
+
show_missing = true
|
|
250
|
+
skip_covered = false
|
|
251
|
+
skip_empty = true
|