walkmygraph 0.0.2__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.
- walkmygraph-0.0.2/.github/workflows/build.yml +54 -0
- walkmygraph-0.0.2/.github/workflows/upload-to-pypi.yml +27 -0
- walkmygraph-0.0.2/.gitignore +209 -0
- walkmygraph-0.0.2/PKG-INFO +55 -0
- walkmygraph-0.0.2/README.md +19 -0
- walkmygraph-0.0.2/pyproject.toml +72 -0
- walkmygraph-0.0.2/scripts/blackisort +7 -0
- walkmygraph-0.0.2/scripts/doc +88 -0
- walkmygraph-0.0.2/scripts/install +3 -0
- walkmygraph-0.0.2/scripts/release +8 -0
- walkmygraph-0.0.2/scripts/test +132 -0
- walkmygraph-0.0.2/tests/__init__.py +0 -0
- walkmygraph-0.0.2/wmg/__init__.py +1 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
# Signal to scripts/install that we are running in GitHub Actions
|
|
11
|
+
GHACTIONS: ACTIVE
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
|
|
17
|
+
defaults:
|
|
18
|
+
run:
|
|
19
|
+
shell: bash
|
|
20
|
+
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
24
|
+
# Testing across supported Python versions
|
|
25
|
+
# python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
26
|
+
python-version: [ '3.11']
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: |
|
|
38
|
+
python -m pip install --upgrade pip
|
|
39
|
+
|
|
40
|
+
- name: install
|
|
41
|
+
run: |
|
|
42
|
+
scripts/install
|
|
43
|
+
|
|
44
|
+
# see https://github.com/marketplace/actions/setup-xvfb
|
|
45
|
+
# avoid copykitten.CopykittenError: Clipboard was never initialized.
|
|
46
|
+
- name: Run tests (Linux with XVFB)
|
|
47
|
+
if: runner.os == 'Linux'
|
|
48
|
+
run: xvfb-run scripts/test
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
- name: Run tests (macOS/Windows)
|
|
52
|
+
if: runner.os != 'Linux'
|
|
53
|
+
run: |
|
|
54
|
+
scripts/test
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
deploy:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
12
|
+
id-token: write
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: '3.x'
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade pip
|
|
22
|
+
pip install hatch
|
|
23
|
+
- name: Build and publish
|
|
24
|
+
run: |
|
|
25
|
+
hatch build
|
|
26
|
+
- name: Publish distribution to PyPI
|
|
27
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
# MAC
|
|
209
|
+
.DS_Store
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: walkmygraph
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: WalkMyGraph (WMG) is a specification by example software development using Knowledge Graph Traversals and Named Parameterized Queries
|
|
5
|
+
Project-URL: Homepage, https://wiki.bitplan.com/index.php/WalkMyGraph
|
|
6
|
+
Project-URL: Repository, https://github.com/BITPlan/WalkMyGraph
|
|
7
|
+
Project-URL: Documentation, https://wiki.bitplan.com/index.php/WalkMyGraph
|
|
8
|
+
Project-URL: Wikidata, https://www.wikidata.org/entity/Q137971436
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/BITPlan/WalkMyGraph/issues
|
|
10
|
+
Author-email: Wolfgang Fahl <wf@bitplan.com>
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Environment :: Web Environment
|
|
15
|
+
Classifier: Framework :: FastAPI
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: Education
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Topic :: Database :: Front-Ends
|
|
27
|
+
Classifier: Topic :: Scientific/Engineering
|
|
28
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
29
|
+
Classifier: Topic :: Text Processing :: Markup
|
|
30
|
+
Requires-Python: >=3.10
|
|
31
|
+
Requires-Dist: networkx>=3.0
|
|
32
|
+
Requires-Dist: pybasemkit>=0.1.6
|
|
33
|
+
Requires-Dist: rdflib>=7.0.0
|
|
34
|
+
Requires-Dist: sparqlwrapper>=2.0.0
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
WalkMyGraph (WMG) is a specification by example software development using Knowledge Graph Traversals and Named Parameterized Queries
|
|
38
|
+
Created by BITPlan
|
|
39
|
+
Copyright(c) 2026 BITPlan GmbH, Willich, Germany https://www.bitplan.com
|
|
40
|
+
|
|
41
|
+
| | |
|
|
42
|
+
| :--- | :--- |
|
|
43
|
+
| **PyPi** | [](https://pypi.python.org/pypi/walkmygraph/) [](https://www.apache.org/licenses/LICENSE-2.0) [](https://pypi.org/project/walkmygraph/) [](https://pypi.org/project/walkmygraph/) [](https://pypi.org/project/walkmygraph/) |
|
|
44
|
+
| **GitHub** | [](https://github.com/BITPlan/WalkMyGraph/actions/workflows/build.yml) [](https://github.com/BITPlan/WalkMyGraph/releases) [](https://github.com/BITPlan/WalkMyGraph/graphs/contributors) [](https://github.com/BITPlan/WalkMyGraph/commits/) [](https://github.com/BITPlan/WalkMyGraph/issues) [](https://github.com/BITPlan/WalkMyGraph/issues/?q=is%3Aissue+is%3Aclosed) |
|
|
45
|
+
| **Code** | [](https://github.com/psf/black) [](https://pycqa.github.io/isort/) |
|
|
46
|
+
| **Docs** | [](https://BITPlan.github.io/WalkMyGraph/) [](https://github.com/PyCQA/docformatter) [](https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings) |
|
|
47
|
+
|
|
48
|
+
# Prototypes
|
|
49
|
+
- https://github.com/WolfgangFahl/DualViewKnowledgeGraphExplorer
|
|
50
|
+
|
|
51
|
+
# Papers
|
|
52
|
+
- https://github.com/WolfgangFahl/DualViewKnowledgeGraphExplorerPaper
|
|
53
|
+
|
|
54
|
+
# Docs
|
|
55
|
+
[Wiki](https://wiki.bitplan.com/index.php/WalkMyGraph)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
WalkMyGraph (WMG) is a specification by example software development using Knowledge Graph Traversals and Named Parameterized Queries
|
|
2
|
+
Created by BITPlan
|
|
3
|
+
Copyright(c) 2026 BITPlan GmbH, Willich, Germany https://www.bitplan.com
|
|
4
|
+
|
|
5
|
+
| | |
|
|
6
|
+
| :--- | :--- |
|
|
7
|
+
| **PyPi** | [](https://pypi.python.org/pypi/walkmygraph/) [](https://www.apache.org/licenses/LICENSE-2.0) [](https://pypi.org/project/walkmygraph/) [](https://pypi.org/project/walkmygraph/) [](https://pypi.org/project/walkmygraph/) |
|
|
8
|
+
| **GitHub** | [](https://github.com/BITPlan/WalkMyGraph/actions/workflows/build.yml) [](https://github.com/BITPlan/WalkMyGraph/releases) [](https://github.com/BITPlan/WalkMyGraph/graphs/contributors) [](https://github.com/BITPlan/WalkMyGraph/commits/) [](https://github.com/BITPlan/WalkMyGraph/issues) [](https://github.com/BITPlan/WalkMyGraph/issues/?q=is%3Aissue+is%3Aclosed) |
|
|
9
|
+
| **Code** | [](https://github.com/psf/black) [](https://pycqa.github.io/isort/) |
|
|
10
|
+
| **Docs** | [](https://BITPlan.github.io/WalkMyGraph/) [](https://github.com/PyCQA/docformatter) [](https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings) |
|
|
11
|
+
|
|
12
|
+
# Prototypes
|
|
13
|
+
- https://github.com/WolfgangFahl/DualViewKnowledgeGraphExplorer
|
|
14
|
+
|
|
15
|
+
# Papers
|
|
16
|
+
- https://github.com/WolfgangFahl/DualViewKnowledgeGraphExplorerPaper
|
|
17
|
+
|
|
18
|
+
# Docs
|
|
19
|
+
[Wiki](https://wiki.bitplan.com/index.php/WalkMyGraph)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "walkmygraph"
|
|
7
|
+
description = "WalkMyGraph (WMG) is a specification by example software development using Knowledge Graph Traversals and Named Parameterized Queries"
|
|
8
|
+
authors = [
|
|
9
|
+
{name = "Wolfgang Fahl", email = "wf@bitplan.com"}
|
|
10
|
+
]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
license = "Apache-2.0"
|
|
13
|
+
dependencies = [
|
|
14
|
+
# Core dependencies
|
|
15
|
+
"SPARQLWrapper>=2.0.0",
|
|
16
|
+
"rdflib>=7.0.0",
|
|
17
|
+
"networkx>=3.0",
|
|
18
|
+
|
|
19
|
+
# Optional: Wikidata/SPARQL support
|
|
20
|
+
# "wikibase-rest-api-client>=0.1.0",
|
|
21
|
+
|
|
22
|
+
# Your existing tools
|
|
23
|
+
"pybasemkit>=0.1.6",
|
|
24
|
+
]
|
|
25
|
+
requires-python = ">=3.10"
|
|
26
|
+
|
|
27
|
+
classifiers=[
|
|
28
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
29
|
+
"Environment :: Console",
|
|
30
|
+
"Environment :: Web Environment",
|
|
31
|
+
"Framework :: FastAPI",
|
|
32
|
+
"Intended Audience :: Developers",
|
|
33
|
+
"Intended Audience :: Education",
|
|
34
|
+
"Intended Audience :: Science/Research",
|
|
35
|
+
"License :: OSI Approved :: Apache Software License",
|
|
36
|
+
"Operating System :: OS Independent",
|
|
37
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
38
|
+
"Programming Language :: Python :: 3.10",
|
|
39
|
+
"Programming Language :: Python :: 3.11",
|
|
40
|
+
"Programming Language :: Python :: 3.12",
|
|
41
|
+
"Programming Language :: Python :: 3.13",
|
|
42
|
+
"Topic :: Database :: Front-Ends",
|
|
43
|
+
"Topic :: Scientific/Engineering",
|
|
44
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
45
|
+
"Topic :: Text Processing :: Markup",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
dynamic = ["version"]
|
|
49
|
+
|
|
50
|
+
[tool.hatch.version]
|
|
51
|
+
path = "wmg/__init__.py"
|
|
52
|
+
|
|
53
|
+
[tool.hatch.metadata]
|
|
54
|
+
allow-direct-references = true
|
|
55
|
+
|
|
56
|
+
[project.urls]
|
|
57
|
+
Homepage = "https://wiki.bitplan.com/index.php/WalkMyGraph"
|
|
58
|
+
Repository = "https://github.com/BITPlan/WalkMyGraph"
|
|
59
|
+
Documentation = "https://wiki.bitplan.com/index.php/WalkMyGraph"
|
|
60
|
+
Wikidata = "https://www.wikidata.org/entity/Q137971436"
|
|
61
|
+
"Bug Tracker" = "https://github.com/BITPlan/WalkMyGraph/issues"
|
|
62
|
+
|
|
63
|
+
[tool.hatch.build.targets.wheel]
|
|
64
|
+
only-include = ["wmg", "wmg_examples"]
|
|
65
|
+
|
|
66
|
+
[tool.hatch.build.targets.wheel.sources]
|
|
67
|
+
"wmg" = "wmg"
|
|
68
|
+
"wmg_examples" = "wmg_examples"
|
|
69
|
+
|
|
70
|
+
[project.scripts]
|
|
71
|
+
wmg = "wmg.cli:main"
|
|
72
|
+
walkmygraph = "wmg.cli:main"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# create docs for a configurable project
|
|
3
|
+
# WF 2024-07-30 - updated
|
|
4
|
+
|
|
5
|
+
# Extract project name from pyproject.toml
|
|
6
|
+
PROJECT_NAME=$(grep "\[project\]" pyproject.toml -A1 | grep name | cut -d '=' -f2 | tr -d ' "')
|
|
7
|
+
PACKAGE_NAME=$(grep "\[tool.hatch.build.targets.wheel.sources\]" pyproject.toml -A1 | tail -1 | cut -d '=' -f2 | tr -d ' "')
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# Function to print usage information
|
|
11
|
+
print_usage() {
|
|
12
|
+
echo "Usage: $0 [OPTIONS]"
|
|
13
|
+
echo "Options:"
|
|
14
|
+
echo " -pr, --project NAME Set the project name (default: $PROJECT_NAME)"
|
|
15
|
+
echo " -pa, --package NAME Set the package name (default: $PACKAGE_NAME)"
|
|
16
|
+
echo " -d, --deploy Deploy the documentation after building"
|
|
17
|
+
echo " -h, --help Display this help message"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
# Parse command line arguments
|
|
21
|
+
DEPLOY=false
|
|
22
|
+
while [[ "$#" -gt 0 ]]; do
|
|
23
|
+
case $1 in
|
|
24
|
+
-pr|--project) PROJECT_NAME="$2"; shift ;;
|
|
25
|
+
-pa|--package) PACKAGE_NAME="$2"; shift ;;
|
|
26
|
+
-d|--deploy) DEPLOY=true ;;
|
|
27
|
+
-h|--help) print_usage; exit 0 ;;
|
|
28
|
+
*) echo "Unknown parameter: $1"; print_usage; exit 1 ;;
|
|
29
|
+
esac
|
|
30
|
+
shift
|
|
31
|
+
done
|
|
32
|
+
|
|
33
|
+
# Ensure we're in the correct directory
|
|
34
|
+
if [[ ! -d "$PACKAGE_NAME" ]]; then
|
|
35
|
+
echo "Error: $PACKAGE_NAME package directory not found. Are you in the correct directory?"
|
|
36
|
+
exit 1
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Check if mkdocs is installed
|
|
40
|
+
if ! command -v mkdocs &> /dev/null; then
|
|
41
|
+
pip install mkdocs mkdocs-material mkdocstrings[python]
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
# Create or update mkdocs.yml
|
|
45
|
+
cat << EOF > mkdocs.yml
|
|
46
|
+
site_name: $PROJECT_NAME API Documentation
|
|
47
|
+
theme:
|
|
48
|
+
name: material
|
|
49
|
+
plugins:
|
|
50
|
+
- search
|
|
51
|
+
- mkdocstrings:
|
|
52
|
+
handlers:
|
|
53
|
+
python:
|
|
54
|
+
setup_commands:
|
|
55
|
+
- import sys
|
|
56
|
+
- import os
|
|
57
|
+
- sys.path.insert(0, os.path.abspath("."))
|
|
58
|
+
selection:
|
|
59
|
+
docstring_style: google
|
|
60
|
+
rendering:
|
|
61
|
+
show_source: true
|
|
62
|
+
nav:
|
|
63
|
+
- API: index.md
|
|
64
|
+
EOF
|
|
65
|
+
|
|
66
|
+
# Create or update index.md
|
|
67
|
+
index_md=docs/index.md
|
|
68
|
+
mkdir -p docs
|
|
69
|
+
cat << EOF > $index_md
|
|
70
|
+
# $PROJECT_NAME API Documentation
|
|
71
|
+
|
|
72
|
+
::: $PACKAGE_NAME
|
|
73
|
+
options:
|
|
74
|
+
show_submodules: true
|
|
75
|
+
EOF
|
|
76
|
+
|
|
77
|
+
# Ignore DeprecationWarnings during build
|
|
78
|
+
export PYTHONWARNINGS="ignore::DeprecationWarning"
|
|
79
|
+
|
|
80
|
+
# Build the documentation
|
|
81
|
+
mkdocs build --config-file ./mkdocs.yml
|
|
82
|
+
|
|
83
|
+
# Deploy if requested
|
|
84
|
+
if [ "$DEPLOY" = true ]; then
|
|
85
|
+
mkdocs gh-deploy --force --config-file ./mkdocs.yml
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
echo "Documentation process completed for $PROJECT_NAME."
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# WF 2022-08-20
|
|
3
|
+
# WF 2024-08-03
|
|
4
|
+
|
|
5
|
+
#ansi colors
|
|
6
|
+
#http://www.csc.uvic.ca/~sae/seng265/fall04/tips/s265s047-tips/bash-using-colors.html
|
|
7
|
+
blue='\033[0;34m'
|
|
8
|
+
red='\033[0;31m'
|
|
9
|
+
green='\033[0;32m' # '\e[1;32m' is too bright for white bg.
|
|
10
|
+
endColor='\033[0m'
|
|
11
|
+
|
|
12
|
+
#
|
|
13
|
+
# a colored message
|
|
14
|
+
# params:
|
|
15
|
+
# 1: l_color - the color of the message
|
|
16
|
+
# 2: l_msg - the message to display
|
|
17
|
+
#
|
|
18
|
+
color_msg() {
|
|
19
|
+
local l_color="$1"
|
|
20
|
+
local l_msg="$2"
|
|
21
|
+
echo -e "${l_color}$l_msg${endColor}"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# error
|
|
26
|
+
#
|
|
27
|
+
# show the given error message on stderr and exit
|
|
28
|
+
#
|
|
29
|
+
# params:
|
|
30
|
+
# 1: l_msg - the error message to display
|
|
31
|
+
#
|
|
32
|
+
error() {
|
|
33
|
+
local l_msg="$1"
|
|
34
|
+
# use ansi red for error
|
|
35
|
+
color_msg $red "Error:" 1>&2
|
|
36
|
+
color_msg $red "\t$l_msg" 1>&2
|
|
37
|
+
exit 1
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#
|
|
41
|
+
# show a negative message
|
|
42
|
+
#
|
|
43
|
+
negative() {
|
|
44
|
+
local l_msg="$1"
|
|
45
|
+
color_msg $red "❌:$l_msg"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#
|
|
49
|
+
# show a positive message
|
|
50
|
+
#
|
|
51
|
+
positive() {
|
|
52
|
+
local l_msg="$1"
|
|
53
|
+
color_msg $green "✅:$l_msg"
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
# show usage
|
|
57
|
+
#
|
|
58
|
+
usage() {
|
|
59
|
+
echo "$0 [-g|--green|-m|--module|-t|--tox|-h|--help]"
|
|
60
|
+
echo "-t |--tox: run tests with tox"
|
|
61
|
+
echo "-g |--green: run tests with green"
|
|
62
|
+
echo "-m |--module: run modulewise test"
|
|
63
|
+
echo "-h |--help: show this usage"
|
|
64
|
+
echo "default is running tests with unittest discover"
|
|
65
|
+
exit 1
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
#
|
|
69
|
+
# check and optional install the given package
|
|
70
|
+
#
|
|
71
|
+
check_package() {
|
|
72
|
+
local l_package="$1"
|
|
73
|
+
pip show $l_package > /dev/null
|
|
74
|
+
if [ $? -ne 0 ]
|
|
75
|
+
then
|
|
76
|
+
negative "$l_package"
|
|
77
|
+
color_msg $blue "installing $l_package"
|
|
78
|
+
pip install $l_package
|
|
79
|
+
else
|
|
80
|
+
positive "$l_package"
|
|
81
|
+
fi
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#
|
|
85
|
+
# test module by module
|
|
86
|
+
#
|
|
87
|
+
modulewise_test() {
|
|
88
|
+
foundErrors=0
|
|
89
|
+
foundTests=0
|
|
90
|
+
for testmodule in tests/test*.py
|
|
91
|
+
do
|
|
92
|
+
echo "testing $testmodule ..."
|
|
93
|
+
# see https://github.com/CleanCut/green/issues/263
|
|
94
|
+
#green $testmodule -s1
|
|
95
|
+
python -m unittest $testmodule
|
|
96
|
+
exit_code=$?
|
|
97
|
+
foundErrors=$((foundErrors+exit_code))
|
|
98
|
+
foundTests=$((foundTests+1))
|
|
99
|
+
done
|
|
100
|
+
echo "$foundErrors/$foundTests module unit tests failed" 1>&2
|
|
101
|
+
if [[ $foundErrors -gt 0 ]]
|
|
102
|
+
then
|
|
103
|
+
exit 1
|
|
104
|
+
fi
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export PYTHON_PATH="."
|
|
108
|
+
while [ "$1" != "" ]
|
|
109
|
+
do
|
|
110
|
+
option="$1"
|
|
111
|
+
case $option in
|
|
112
|
+
-h|--help)
|
|
113
|
+
usage
|
|
114
|
+
exit 0
|
|
115
|
+
;;
|
|
116
|
+
-g|--green)
|
|
117
|
+
check_package green
|
|
118
|
+
green tests -s 1
|
|
119
|
+
exit 0
|
|
120
|
+
;;
|
|
121
|
+
-m|--module)
|
|
122
|
+
modulewise_test
|
|
123
|
+
exit 0
|
|
124
|
+
;;
|
|
125
|
+
-t|--tox)
|
|
126
|
+
check_package tox
|
|
127
|
+
tox -e py
|
|
128
|
+
exit 0
|
|
129
|
+
;;
|
|
130
|
+
esac
|
|
131
|
+
done
|
|
132
|
+
python3 -m unittest discover
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.2"
|