entangled-cli 2.1.9__tar.gz → 2.1.11__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.
- entangled_cli-2.1.11/.gitignore +6 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/PKG-INFO +21 -23
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/README.md +3 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/stitch.py +3 -8
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/sync.py +2 -8
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/tangle.py +2 -4
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/config/templates.py +7 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/hooks/quarto_attributes.py +9 -4
- entangled_cli-2.1.11/pyproject.toml +60 -0
- entangled_cli-2.1.9/pyproject.toml +0 -52
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/LICENSE +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/__init__.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/code_reader.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/__init__.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/brei.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/new.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/status.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/commands/watch.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/config/__init__.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/config/language.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/config/version.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/construct.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/document.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/errors/__init__.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/errors/internal.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/errors/user.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/filedb.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/hooks/__init__.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/hooks/base.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/hooks/build.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/hooks/shebang.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/hooks/task.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/logging.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/main.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/markdown_reader.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/parsing.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/properties.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/py.typed +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/status.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/tangle.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/text_location.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/transaction.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/utility.py +0 -0
- {entangled_cli-2.1.9 → entangled_cli-2.1.11}/entangled/version.py +0 -0
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: entangled-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.11
|
|
4
4
|
Summary: Literate Programming toolbox
|
|
5
|
-
|
|
6
|
-
License: Apache 2
|
|
7
|
-
Author: Johan Hidding
|
|
8
|
-
Author-email: j.hidding@esciencecenter.nl
|
|
9
|
-
Requires-Python: >=3.11,<4.0
|
|
10
|
-
Classifier: License :: Other/Proprietary License
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Dist: argh (>=0.30,<0.31)
|
|
15
|
-
Requires-Dist: brei (>=0.2.3,<0.3.0)
|
|
16
|
-
Requires-Dist: copier (>=9,<10)
|
|
17
|
-
Requires-Dist: filelock (>=3.12.0,<4.0.0)
|
|
18
|
-
Requires-Dist: mawk (>=0.1.4,<0.2.0)
|
|
19
|
-
Requires-Dist: pexpect (>=4.9.0,<5.0.0)
|
|
20
|
-
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
21
|
-
Requires-Dist: rich (>=13.3.5,<14.0.0)
|
|
22
|
-
Requires-Dist: rich-argparse (>=1.4.0,<2.0.0)
|
|
23
|
-
Requires-Dist: tomlkit (>=0.12.1,<0.13.0)
|
|
24
|
-
Requires-Dist: watchdog (>=3.0.0,<4.0.0)
|
|
5
|
+
Project-URL: Homepage, https://entangled.github.io/
|
|
25
6
|
Project-URL: Repository, https://github.com/entangled/entangled.py
|
|
7
|
+
Author-email: Johan Hidding <j.hidding@esciencecenter.nl>
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Python: ~=3.11
|
|
11
|
+
Requires-Dist: argh<0.31,>=0.30
|
|
12
|
+
Requires-Dist: brei<0.3,>=0.2.3
|
|
13
|
+
Requires-Dist: copier<10,>=9
|
|
14
|
+
Requires-Dist: filelock<4,>=3.12.0
|
|
15
|
+
Requires-Dist: mawk<0.2,>=0.1.4
|
|
16
|
+
Requires-Dist: pexpect<5,>=4.9.0
|
|
17
|
+
Requires-Dist: pyyaml<7,>=6.0.1
|
|
18
|
+
Requires-Dist: rich-argparse<2,>=1.4.0
|
|
19
|
+
Requires-Dist: rich<14,>=13.3.5
|
|
20
|
+
Requires-Dist: tomlkit<0.13,>=0.12.1
|
|
21
|
+
Requires-Dist: watchdog<4,>=3.0.0
|
|
26
22
|
Description-Content-Type: text/markdown
|
|
27
23
|
|
|
28
24
|
# Entangled
|
|
@@ -181,6 +177,9 @@ identifiers = ["java"]
|
|
|
181
177
|
comment = { open = "//" }
|
|
182
178
|
```
|
|
183
179
|
|
|
180
|
+
## Working in VSCode
|
|
181
|
+
The [EntangleD-VSCode](https://github.com/deephbz/entangled-vscode) extension provides code block navigation, reference&symbol search, NOWEB high-lighting functionalities.
|
|
182
|
+
|
|
184
183
|
## Working with Git
|
|
185
184
|
|
|
186
185
|
When using Entangled in conjunction with Git, there are a few tricks that you may want to know about.
|
|
@@ -517,4 +516,3 @@ If you have an idea for improving Entangled, please file an issue before creatin
|
|
|
517
516
|
## License
|
|
518
517
|
|
|
519
518
|
Copyright 2023 Netherlands eScience Center, written by Johan Hidding, licensed under the Apache 2 license, see LICENSE.
|
|
520
|
-
|
|
@@ -154,6 +154,9 @@ identifiers = ["java"]
|
|
|
154
154
|
comment = { open = "//" }
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
+
## Working in VSCode
|
|
158
|
+
The [EntangleD-VSCode](https://github.com/deephbz/entangled-vscode) extension provides code block navigation, reference&symbol search, NOWEB high-lighting functionalities.
|
|
159
|
+
|
|
157
160
|
## Working with Git
|
|
158
161
|
|
|
159
162
|
When using Entangled in conjunction with Git, there are a few tricks that you may want to know about.
|
|
@@ -9,6 +9,7 @@ from ..config import config
|
|
|
9
9
|
from ..document import ReferenceMap, Content, PlainText, ReferenceId
|
|
10
10
|
from ..transaction import transaction, TransactionMode
|
|
11
11
|
from ..errors.user import UserError
|
|
12
|
+
from .tangle import get_input_files
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
def stitch_markdown(reference_map: ReferenceMap, content: list[Content]) -> str:
|
|
@@ -32,14 +33,8 @@ def stitch(*, force: bool = False, show: bool = False):
|
|
|
32
33
|
from ..markdown_reader import read_markdown_file
|
|
33
34
|
from ..code_reader import CodeReader
|
|
34
35
|
from ..hooks import get_hooks
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
exclude_file_list = list(
|
|
38
|
-
chain.from_iterable(map(Path(".").glob, config.ignore_list))
|
|
39
|
-
)
|
|
40
|
-
input_file_list = [
|
|
41
|
-
path for path in include_file_list if not path in exclude_file_list
|
|
42
|
-
]
|
|
36
|
+
|
|
37
|
+
input_file_list = get_input_files()
|
|
43
38
|
hooks = get_hooks()
|
|
44
39
|
|
|
45
40
|
if show:
|
|
@@ -6,7 +6,7 @@ import logging
|
|
|
6
6
|
|
|
7
7
|
from ..filedb import file_db
|
|
8
8
|
from ..config import config
|
|
9
|
-
from .stitch import stitch
|
|
9
|
+
from .stitch import stitch, get_input_files
|
|
10
10
|
from .tangle import tangle
|
|
11
11
|
|
|
12
12
|
|
|
@@ -16,13 +16,7 @@ def _stitch_then_tangle():
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def sync_action() -> Optional[Callable[[], None]]:
|
|
19
|
-
|
|
20
|
-
chain.from_iterable(map(Path().glob, config.watch_list))
|
|
21
|
-
)
|
|
22
|
-
exclude_file_list = set(
|
|
23
|
-
chain.from_iterable(map(Path().glob, config.ignore_list))
|
|
24
|
-
)
|
|
25
|
-
input_file_list = include_file_list - exclude_file_list
|
|
19
|
+
input_file_list = get_input_files()
|
|
26
20
|
|
|
27
21
|
with file_db(readonly=True) as db:
|
|
28
22
|
changed = set(db.changed())
|
|
@@ -14,11 +14,9 @@ from ..errors.user import UserError
|
|
|
14
14
|
|
|
15
15
|
def get_input_files() -> list[Path]:
|
|
16
16
|
include_file_list = chain.from_iterable(map(Path(".").glob, config.watch_list))
|
|
17
|
-
exclude_file_list = list(
|
|
18
|
-
chain.from_iterable(map(Path(".").glob, config.ignore_list))
|
|
19
|
-
)
|
|
20
17
|
input_file_list = [
|
|
21
|
-
path for path in include_file_list
|
|
18
|
+
path for path in include_file_list
|
|
19
|
+
if not any(path.match(pat) for pat in config.ignore_list)
|
|
22
20
|
]
|
|
23
21
|
return input_file_list
|
|
24
22
|
|
|
@@ -26,4 +26,11 @@ templates: list[Template] = [
|
|
|
26
26
|
"python, mkdocs",
|
|
27
27
|
"Fast, simple project documentation for Python",
|
|
28
28
|
),
|
|
29
|
+
Template(
|
|
30
|
+
"pandoc",
|
|
31
|
+
"Pandoc",
|
|
32
|
+
"gh:entangled/template-pandoc",
|
|
33
|
+
"pandoc",
|
|
34
|
+
"Supports HTML and PDF output, numbered equations and citations."
|
|
35
|
+
)
|
|
29
36
|
]
|
|
@@ -34,13 +34,18 @@ class Hook(HookBase):
|
|
|
34
34
|
attrs = yaml.safe_load(header)
|
|
35
35
|
if attrs is None:
|
|
36
36
|
return
|
|
37
|
+
if not isinstance(attrs, dict):
|
|
38
|
+
log.warning("quarto attributes do not evaluate to dictionary; skipping")
|
|
39
|
+
log.warning(f"tried to parse: {header}")
|
|
40
|
+
return
|
|
37
41
|
|
|
38
|
-
if "id" in attrs:
|
|
42
|
+
if "id" in attrs.keys():
|
|
39
43
|
code.properties.append(Id(attrs["id"]))
|
|
40
44
|
|
|
41
|
-
if "classes" in attrs:
|
|
45
|
+
if "classes" in attrs.keys():
|
|
42
46
|
code.properties.extend(Class(c) for c in attrs["classes"])
|
|
43
|
-
|
|
44
|
-
code.properties.extend(Attribute(k, v) for k, v in attrs.items()
|
|
47
|
+
|
|
48
|
+
code.properties.extend(Attribute(k, v) for k, v in attrs.items()
|
|
49
|
+
if k not in ("id", "classes"))
|
|
45
50
|
|
|
46
51
|
log.debug("quarto attributes: %s", attrs)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "entangled-cli"
|
|
3
|
+
version = "2.1.11"
|
|
4
|
+
description = "Literate Programming toolbox"
|
|
5
|
+
authors = [{ name = "Johan Hidding", email = "j.hidding@esciencecenter.nl" }]
|
|
6
|
+
requires-python = "~=3.11"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
license = "Apache-2.0"
|
|
9
|
+
dependencies = [
|
|
10
|
+
"mawk>=0.1.4,<0.2",
|
|
11
|
+
"watchdog>=3.0.0,<4",
|
|
12
|
+
"filelock>=3.12.0,<4",
|
|
13
|
+
"argh>=0.30,<0.31",
|
|
14
|
+
"rich>=13.3.5,<14",
|
|
15
|
+
"tomlkit>=0.12.1,<0.13",
|
|
16
|
+
"copier>=9,<10",
|
|
17
|
+
"brei>=0.2.3,<0.3",
|
|
18
|
+
"rich-argparse>=1.4.0,<2",
|
|
19
|
+
"pexpect>=4.9.0,<5",
|
|
20
|
+
"pyyaml>=6.0.1,<7",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Homepage = "https://entangled.github.io/"
|
|
25
|
+
Repository = "https://github.com/entangled/entangled.py"
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
entangled = "entangled.main:cli"
|
|
29
|
+
|
|
30
|
+
[dependency-groups]
|
|
31
|
+
dev = [
|
|
32
|
+
"pytest>=7.3.1,<8",
|
|
33
|
+
"mypy>=1.3.0,<2",
|
|
34
|
+
"black>=23.3.0,<24",
|
|
35
|
+
"pytest-cov>=4.0.0,<5",
|
|
36
|
+
"mkdocs>=1.4.3,<2",
|
|
37
|
+
"mkdocs-material>=9.1.13,<10",
|
|
38
|
+
"mkdocstrings[python]>=0.21.2,<0.22",
|
|
39
|
+
"pytest-asyncio>=0.21.1,<0.22",
|
|
40
|
+
"ruff>=0.4.4,<0.5",
|
|
41
|
+
"types-pyyaml>=6.0.12.20240311,<7",
|
|
42
|
+
"types-pygments>=2.18.0.20240506,<3",
|
|
43
|
+
"types-colorama>=0.4.15.20240311,<0.5",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.sdist]
|
|
47
|
+
include = ["entangled"]
|
|
48
|
+
|
|
49
|
+
[tool.hatch.build.targets.wheel]
|
|
50
|
+
include = ["entangled"]
|
|
51
|
+
|
|
52
|
+
[build-system]
|
|
53
|
+
requires = ["hatchling"]
|
|
54
|
+
build-backend = "hatchling.build"
|
|
55
|
+
|
|
56
|
+
[tool.pytest.ini_options]
|
|
57
|
+
testpaths = ["test"]
|
|
58
|
+
|
|
59
|
+
[tool.mypy]
|
|
60
|
+
packages = ["entangled"]
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "entangled-cli"
|
|
3
|
-
version = "2.1.9"
|
|
4
|
-
description = "Literate Programming toolbox"
|
|
5
|
-
repository = "https://github.com/entangled/entangled.py"
|
|
6
|
-
homepage = "https://entangled.github.io/"
|
|
7
|
-
authors = ["Johan Hidding <j.hidding@esciencecenter.nl>"]
|
|
8
|
-
license = "Apache 2"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
packages = [{ include = "entangled" }]
|
|
11
|
-
|
|
12
|
-
[tool.poetry.dependencies]
|
|
13
|
-
python = "^3.11"
|
|
14
|
-
mawk = "^0.1.4" # use mawk as line parsing engine
|
|
15
|
-
watchdog = "^3.0.0" # file watching
|
|
16
|
-
filelock = "^3.12.0" # file lock for json db
|
|
17
|
-
argh = "^0.30" # easy argument parsing
|
|
18
|
-
rich = "^13.3.5" # colourful output
|
|
19
|
-
tomlkit = "^0.12.1" # read/write toml files
|
|
20
|
-
copier = "^9" # project templates
|
|
21
|
-
brei = "^0.2.3" # build system
|
|
22
|
-
rich-argparse = "^1.4.0" # colourful help messages
|
|
23
|
-
pexpect = "^4.9.0"
|
|
24
|
-
pyyaml = "^6.0.1"
|
|
25
|
-
|
|
26
|
-
[tool.poetry.group.dev.dependencies]
|
|
27
|
-
pytest = "^7.3.1"
|
|
28
|
-
mypy = "^1.3.0"
|
|
29
|
-
black = "^23.3.0"
|
|
30
|
-
pytest-cov = "^4.0.0"
|
|
31
|
-
mkdocs = "^1.4.3"
|
|
32
|
-
mkdocs-material = "^9.1.13"
|
|
33
|
-
mkdocstrings = { extras = ["python"], version = "^0.21.2" }
|
|
34
|
-
twine = "^4.0.2"
|
|
35
|
-
pytest-asyncio = "^0.21.1"
|
|
36
|
-
ruff = "^0.4.4"
|
|
37
|
-
types-pyyaml = "^6.0.12.20240311"
|
|
38
|
-
types-pygments = "^2.18.0.20240506"
|
|
39
|
-
types-colorama = "^0.4.15.20240311"
|
|
40
|
-
|
|
41
|
-
[build-system]
|
|
42
|
-
requires = ["poetry-core"]
|
|
43
|
-
build-backend = "poetry.core.masonry.api"
|
|
44
|
-
|
|
45
|
-
[tool.pytest.ini_options]
|
|
46
|
-
testpaths = ["test"]
|
|
47
|
-
|
|
48
|
-
[tool.mypy]
|
|
49
|
-
packages = ["entangled"]
|
|
50
|
-
|
|
51
|
-
[tool.poetry.scripts]
|
|
52
|
-
entangled = "entangled.main:cli"
|
|
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
|
|
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
|