docview 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.
- docview-0.1.0/.coveragerc +22 -0
- docview-0.1.0/.editorconfig +21 -0
- docview-0.1.0/.gitignore +112 -0
- docview-0.1.0/.travis.yml +13 -0
- docview-0.1.0/CHANGELOG.rst +11 -0
- docview-0.1.0/LICENSE +168 -0
- docview-0.1.0/Makefile +164 -0
- docview-0.1.0/PKG-INFO +33 -0
- docview-0.1.0/README.rst +4 -0
- docview-0.1.0/cliff.toml +98 -0
- docview-0.1.0/docview/__init__.py +7 -0
- docview-0.1.0/docview/__version__.py +19 -0
- docview-0.1.0/pyproject.toml +46 -0
- docview-0.1.0/scripts/__init__.py +4 -0
- docview-0.1.0/tests/__init__.py +1 -0
- docview-0.1.0/tox.ini +51 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[run]
|
|
2
|
+
branch = True
|
|
3
|
+
source = docview
|
|
4
|
+
|
|
5
|
+
[report]
|
|
6
|
+
ignore_errors = True
|
|
7
|
+
; Regexes for lines to exclude from consideration
|
|
8
|
+
exclude_lines =
|
|
9
|
+
; Have to re-enable the standard pragma
|
|
10
|
+
pragma: no cover
|
|
11
|
+
|
|
12
|
+
; Don't complain about missing debug-only code:
|
|
13
|
+
def __repr__
|
|
14
|
+
if self\.debug
|
|
15
|
+
|
|
16
|
+
; Don't complain if tests don't hit defensive assertion code:
|
|
17
|
+
raise AssertionError
|
|
18
|
+
raise NotImplementedError
|
|
19
|
+
|
|
20
|
+
; Don't complain if non-runnable code isn't run:
|
|
21
|
+
if 0:
|
|
22
|
+
if __name__ == .__main__.:
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
charset = utf-8
|
|
11
|
+
end_of_line = lf
|
|
12
|
+
|
|
13
|
+
[*.bat]
|
|
14
|
+
indent_style = tab
|
|
15
|
+
end_of_line = crlf
|
|
16
|
+
|
|
17
|
+
[LICENSE]
|
|
18
|
+
insert_final_newline = false
|
|
19
|
+
|
|
20
|
+
[Makefile]
|
|
21
|
+
indent_style = tab
|
docview-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
*.py[cod]
|
|
2
|
+
|
|
3
|
+
# C extensions
|
|
4
|
+
*.so
|
|
5
|
+
|
|
6
|
+
# Packages
|
|
7
|
+
*.egg
|
|
8
|
+
*.egg-info
|
|
9
|
+
/dist
|
|
10
|
+
/build
|
|
11
|
+
/eggs
|
|
12
|
+
/parts
|
|
13
|
+
/bin
|
|
14
|
+
/var
|
|
15
|
+
/sdist
|
|
16
|
+
/develop-eggs
|
|
17
|
+
/lib
|
|
18
|
+
/lib64
|
|
19
|
+
.installed.cfg
|
|
20
|
+
/.pybuild
|
|
21
|
+
|
|
22
|
+
# Installer logs
|
|
23
|
+
pip-log.txt
|
|
24
|
+
|
|
25
|
+
# Unit test / coverage reports
|
|
26
|
+
.coverage
|
|
27
|
+
.tox
|
|
28
|
+
nosetests.xml
|
|
29
|
+
htmlcov
|
|
30
|
+
|
|
31
|
+
# Translations
|
|
32
|
+
*.mo
|
|
33
|
+
|
|
34
|
+
# Mr Developer
|
|
35
|
+
.mr.developer.cfg
|
|
36
|
+
.project
|
|
37
|
+
.pydevproject
|
|
38
|
+
|
|
39
|
+
# Complexity
|
|
40
|
+
output/*.html
|
|
41
|
+
output/*/index.html
|
|
42
|
+
|
|
43
|
+
# Sphinx
|
|
44
|
+
docs/_build
|
|
45
|
+
|
|
46
|
+
#Idea
|
|
47
|
+
.idea
|
|
48
|
+
|
|
49
|
+
#Miscellaneous
|
|
50
|
+
/misc
|
|
51
|
+
/overig
|
|
52
|
+
|
|
53
|
+
# debian tmps
|
|
54
|
+
/debian/source
|
|
55
|
+
/debian/tmp
|
|
56
|
+
/debian/changelog
|
|
57
|
+
/debian/compat
|
|
58
|
+
/debian/control
|
|
59
|
+
/debian/rules
|
|
60
|
+
/debian/watch
|
|
61
|
+
|
|
62
|
+
# Elastic Beanstalk Files
|
|
63
|
+
.elasticbeanstalk/*
|
|
64
|
+
!.elasticbeanstalk/*.cfg.yml
|
|
65
|
+
!.elasticbeanstalk/*.global.yml
|
|
66
|
+
|
|
67
|
+
# MAC os files
|
|
68
|
+
.DS_Store
|
|
69
|
+
|
|
70
|
+
#########
|
|
71
|
+
## Latex
|
|
72
|
+
#########
|
|
73
|
+
## Core latex/pdflatex auxiliary files:
|
|
74
|
+
*.aux
|
|
75
|
+
*.lof
|
|
76
|
+
*.log
|
|
77
|
+
*.lot
|
|
78
|
+
*.fls
|
|
79
|
+
*.out
|
|
80
|
+
*.toc
|
|
81
|
+
*.fmt
|
|
82
|
+
*.fot
|
|
83
|
+
*.cb
|
|
84
|
+
*.cb2
|
|
85
|
+
.*.lb
|
|
86
|
+
|
|
87
|
+
## Intermediate documents:
|
|
88
|
+
*.dvi
|
|
89
|
+
*.xdv
|
|
90
|
+
*-converted-to.*
|
|
91
|
+
|
|
92
|
+
## Bibliography auxiliary files (bibtex/biblatex/biber):
|
|
93
|
+
*.bbl
|
|
94
|
+
*.bcf
|
|
95
|
+
*.blg
|
|
96
|
+
*-blx.aux
|
|
97
|
+
*-blx.bib
|
|
98
|
+
*.run.xml
|
|
99
|
+
|
|
100
|
+
## Build tool auxiliary files:
|
|
101
|
+
*.fdb_latexmk
|
|
102
|
+
*.synctex
|
|
103
|
+
*.synctex(busy)
|
|
104
|
+
*.synctex.gz
|
|
105
|
+
*.synctex.gz(busy)
|
|
106
|
+
*.pdfsync
|
|
107
|
+
|
|
108
|
+
#########
|
|
109
|
+
## End Latex
|
|
110
|
+
#########
|
|
111
|
+
|
|
112
|
+
.python-version
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Config file for automatic testing at travis-ci.org
|
|
2
|
+
|
|
3
|
+
language: python
|
|
4
|
+
|
|
5
|
+
python:
|
|
6
|
+
- "3.14"
|
|
7
|
+
|
|
8
|
+
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
|
|
9
|
+
install:
|
|
10
|
+
- python -c 'import tomllib; f = open("pyproject.toml", "rb"); c = tomllib.load(f); print("\n".join(c["project"]["dependencies"]));' | pip install -r /dev/stdin
|
|
11
|
+
|
|
12
|
+
# command to run tests, e.g. python setup.py test
|
|
13
|
+
script: make test
|
docview-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Copyright (c) 2015, Robbert Harms
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
5
|
+
Version 3, 29 June 2007
|
|
6
|
+
|
|
7
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
8
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
9
|
+
of this license document, but changing it is not allowed.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
This version of the GNU Lesser General Public License incorporates
|
|
13
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
14
|
+
License, supplemented by the additional permissions listed below.
|
|
15
|
+
|
|
16
|
+
0. Additional Definitions.
|
|
17
|
+
|
|
18
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
19
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
20
|
+
General Public License.
|
|
21
|
+
|
|
22
|
+
"The Library" refers to a covered work governed by this License,
|
|
23
|
+
other than an Application or a Combined Work as defined below.
|
|
24
|
+
|
|
25
|
+
An "Application" is any work that makes use of an interface provided
|
|
26
|
+
by the Library, but which is not otherwise based on the Library.
|
|
27
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
28
|
+
of using an interface provided by the Library.
|
|
29
|
+
|
|
30
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
31
|
+
Application with the Library. The particular version of the Library
|
|
32
|
+
with which the Combined Work was made is also called the "Linked
|
|
33
|
+
Version".
|
|
34
|
+
|
|
35
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
36
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
37
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
38
|
+
based on the Application, and not on the Linked Version.
|
|
39
|
+
|
|
40
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
41
|
+
object code and/or source code for the Application, including any data
|
|
42
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
43
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
44
|
+
|
|
45
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
48
|
+
without being bound by section 3 of the GNU GPL.
|
|
49
|
+
|
|
50
|
+
2. Conveying Modified Versions.
|
|
51
|
+
|
|
52
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
53
|
+
facility refers to a function or data to be supplied by an Application
|
|
54
|
+
that uses the facility (other than as an argument passed when the
|
|
55
|
+
facility is invoked), then you may convey a copy of the modified
|
|
56
|
+
version:
|
|
57
|
+
|
|
58
|
+
a) under this License, provided that you make a good faith effort to
|
|
59
|
+
ensure that, in the event an Application does not supply the
|
|
60
|
+
function or data, the facility still operates, and performs
|
|
61
|
+
whatever part of its purpose remains meaningful, or
|
|
62
|
+
|
|
63
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
64
|
+
this License applicable to that copy.
|
|
65
|
+
|
|
66
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
67
|
+
|
|
68
|
+
The object code form of an Application may incorporate material from
|
|
69
|
+
a header file that is part of the Library. You may convey such object
|
|
70
|
+
code under terms of your choice, provided that, if the incorporated
|
|
71
|
+
material is not limited to numerical parameters, data structure
|
|
72
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
73
|
+
(ten or fewer lines in length), you do both of the following:
|
|
74
|
+
|
|
75
|
+
a) Give prominent notice with each copy of the object code that the
|
|
76
|
+
Library is used in it and that the Library and its use are
|
|
77
|
+
covered by this License.
|
|
78
|
+
|
|
79
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
80
|
+
document.
|
|
81
|
+
|
|
82
|
+
4. Combined Works.
|
|
83
|
+
|
|
84
|
+
You may convey a Combined Work under terms of your choice that,
|
|
85
|
+
taken together, effectively do not restrict modification of the
|
|
86
|
+
portions of the Library contained in the Combined Work and reverse
|
|
87
|
+
engineering for debugging such modifications, if you also do each of
|
|
88
|
+
the following:
|
|
89
|
+
|
|
90
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
91
|
+
the Library is used in it and that the Library and its use are
|
|
92
|
+
covered by this License.
|
|
93
|
+
|
|
94
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
95
|
+
document.
|
|
96
|
+
|
|
97
|
+
c) For a Combined Work that displays copyright notices during
|
|
98
|
+
execution, include the copyright notice for the Library among
|
|
99
|
+
these notices, as well as a reference directing the user to the
|
|
100
|
+
copies of the GNU GPL and this license document.
|
|
101
|
+
|
|
102
|
+
d) Do one of the following:
|
|
103
|
+
|
|
104
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
105
|
+
License, and the Corresponding Application Code in a form
|
|
106
|
+
suitable for, and under terms that permit, the user to
|
|
107
|
+
recombine or relink the Application with a modified version of
|
|
108
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
109
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
110
|
+
Corresponding Source.
|
|
111
|
+
|
|
112
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
113
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
114
|
+
a copy of the Library already present on the user's computer
|
|
115
|
+
system, and (b) will operate properly with a modified version
|
|
116
|
+
of the Library that is interface-compatible with the Linked
|
|
117
|
+
Version.
|
|
118
|
+
|
|
119
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
120
|
+
be required to provide such information under section 6 of the
|
|
121
|
+
GNU GPL, and only to the extent that such information is
|
|
122
|
+
necessary to install and execute a modified version of the
|
|
123
|
+
Combined Work produced by recombining or relinking the
|
|
124
|
+
Application with a modified version of the Linked Version. (If
|
|
125
|
+
you use option 4d0, the Installation Information must accompany
|
|
126
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
127
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
128
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
129
|
+
for conveying Corresponding Source.)
|
|
130
|
+
|
|
131
|
+
5. Combined Libraries.
|
|
132
|
+
|
|
133
|
+
You may place library facilities that are a work based on the
|
|
134
|
+
Library side by side in a single library together with other library
|
|
135
|
+
facilities that are not Applications and are not covered by this
|
|
136
|
+
License, and convey such a combined library under terms of your
|
|
137
|
+
choice, if you do both of the following:
|
|
138
|
+
|
|
139
|
+
a) Accompany the combined library with a copy of the same work based
|
|
140
|
+
on the Library, uncombined with any other library facilities,
|
|
141
|
+
conveyed under the terms of this License.
|
|
142
|
+
|
|
143
|
+
b) Give prominent notice with the combined library that part of it
|
|
144
|
+
is a work based on the Library, and explaining where to find the
|
|
145
|
+
accompanying uncombined form of the same work.
|
|
146
|
+
|
|
147
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
148
|
+
|
|
149
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
150
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
151
|
+
versions will be similar in spirit to the present version, but may
|
|
152
|
+
differ in detail to address new problems or concerns.
|
|
153
|
+
|
|
154
|
+
Each version is given a distinguishing version number. If the
|
|
155
|
+
Library as you received it specifies that a certain numbered version
|
|
156
|
+
of the GNU Lesser General Public License "or any later version"
|
|
157
|
+
applies to it, you have the option of following the terms and
|
|
158
|
+
conditions either of that published version or of any later version
|
|
159
|
+
published by the Free Software Foundation. If the Library as you
|
|
160
|
+
received it does not specify a version number of the GNU Lesser
|
|
161
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
162
|
+
General Public License ever published by the Free Software Foundation.
|
|
163
|
+
|
|
164
|
+
If the Library as you received it specifies that a proxy can decide
|
|
165
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
166
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
167
|
+
permanent authorization for you to choose that version for the
|
|
168
|
+
Library.
|
docview-0.1.0/Makefile
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
SHELL := /bin/bash
|
|
2
|
+
PYTHON := $$(which python3)
|
|
3
|
+
PIP := $$(which pip3)
|
|
4
|
+
PYTEST := $$(which pytest)
|
|
5
|
+
PROJECT_NAME := docview
|
|
6
|
+
GIT_BRANCH := $$(git branch --show-current)
|
|
7
|
+
PROJECT_VERSION := $(shell grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
|
|
8
|
+
|
|
9
|
+
.PHONY: help
|
|
10
|
+
help:
|
|
11
|
+
@echo "clean: remove all build, test, coverage and Python artifacts (no uninstall)"
|
|
12
|
+
@echo "test(s): run unit and integration tests with the default Python."
|
|
13
|
+
@echo "test-unit: run the unit tests using the default Python."
|
|
14
|
+
@echo "test-integration: run the integration tests using the default Python."
|
|
15
|
+
@echo "test-all: run all tests using all environments using tox"
|
|
16
|
+
@echo "docs: generate Sphinx HTML documentation, including API docs"
|
|
17
|
+
@echo "docs-pdf: generate the PDF documentation, including API docs"
|
|
18
|
+
@echo "docs-man: generate the linux manpages"
|
|
19
|
+
@echo "docs-changelog: generate the changelog documentation"
|
|
20
|
+
@echo "install-deps: install all the dependencies"
|
|
21
|
+
@echo "install-symlink: install the package as a symlink, to allow continuous development"
|
|
22
|
+
@echo "uninstall: uninstall PySchematron (while keeping the dependencies)"
|
|
23
|
+
@echo "prepare-release: prepare for a new release"
|
|
24
|
+
@echo "release: package and release the new version"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
.PHONY: clean
|
|
28
|
+
clean: clean-build clean-pyc clean-test
|
|
29
|
+
|
|
30
|
+
.PHONY: clean-build
|
|
31
|
+
clean-build:
|
|
32
|
+
rm -fr build/
|
|
33
|
+
rm -fr dist/
|
|
34
|
+
rm -fr .eggs/
|
|
35
|
+
find . -name '*.egg-info' -exec rm -fr {} +
|
|
36
|
+
find . -name '*.egg' -exec rm -f {} +
|
|
37
|
+
|
|
38
|
+
.PHONY: clean-pyc
|
|
39
|
+
clean-pyc:
|
|
40
|
+
find . -name '*.pyc' -exec rm -f {} +
|
|
41
|
+
find . -name '*.pyo' -exec rm -f {} +
|
|
42
|
+
find . -name '*~' -exec rm -f {} +
|
|
43
|
+
find . -name '__pycache__' -exec rm -fr {} +
|
|
44
|
+
|
|
45
|
+
.PHONY: clean-test
|
|
46
|
+
clean-test:
|
|
47
|
+
rm -rf .tox/
|
|
48
|
+
rm -f .coverage
|
|
49
|
+
rm -rf htmlcov/
|
|
50
|
+
rm -rf .pytest_cache
|
|
51
|
+
rm -rf tests/htmlcov
|
|
52
|
+
rm -rf tests/.coverage
|
|
53
|
+
find tests -name 'build' -exec rm -rf {} +
|
|
54
|
+
find tests -name '.coverage' -exec rm -rf {} +
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
.PHONY: tests
|
|
58
|
+
tests: test
|
|
59
|
+
|
|
60
|
+
.PHONY: test
|
|
61
|
+
test:
|
|
62
|
+
mkdir -p build
|
|
63
|
+
COVERAGE_FILE=build/.coverage \
|
|
64
|
+
$(PYTEST) tests --cov=$(PROJECT_NAME) --cov-report=html:build/coverage/defaultenv --cov-report=term --html=build/pytest/report-defaultenv.html --self-contained-html
|
|
65
|
+
|
|
66
|
+
.PHONY: test-unit
|
|
67
|
+
test-unit:
|
|
68
|
+
mkdir -p build
|
|
69
|
+
COVERAGE_FILE=build/.coverage \
|
|
70
|
+
$(PYTEST) tests/unit --cov=$(PROJECT_NAME) --cov-report=html:build/coverage/defaultenv --cov-report=term --html=build/pytest/report-defaultenv.html --self-contained-html
|
|
71
|
+
|
|
72
|
+
.PHONY: test-integration
|
|
73
|
+
test-integration:
|
|
74
|
+
mkdir -p build
|
|
75
|
+
COVERAGE_FILE=build/.coverage \
|
|
76
|
+
$(PYTEST) tests/integration --cov=$(PROJECT_NAME) --cov-report=html:build/coverage/defaultenv --cov-report=term --html=build/pytest/report-defaultenv.html --self-contained-html
|
|
77
|
+
|
|
78
|
+
.PHONY: test-all
|
|
79
|
+
test-all:
|
|
80
|
+
tox
|
|
81
|
+
|
|
82
|
+
.PHONY: docs
|
|
83
|
+
docs:
|
|
84
|
+
mkdir -p build
|
|
85
|
+
rm -f docs/$(PROJECT_NAME)*.rst
|
|
86
|
+
rm -f docs/modules.rst
|
|
87
|
+
$(MAKE) -C docs clean
|
|
88
|
+
sphinx-apidoc -o docs/ $(PROJECT_NAME)
|
|
89
|
+
$(MAKE) -C docs html SPHINXBUILD='python3 $(shell which sphinx-build)'
|
|
90
|
+
@echo "To view results type: firefox docs/_build/html/index.html &"
|
|
91
|
+
|
|
92
|
+
.PHONY: docs-pdf
|
|
93
|
+
docs-pdf:
|
|
94
|
+
mkdir -p build
|
|
95
|
+
rm -f docs/$(PROJECT_NAME)*.rst
|
|
96
|
+
rm -f docs/modules.rst
|
|
97
|
+
$(MAKE) -C docs clean
|
|
98
|
+
sphinx-apidoc -o docs/ $(PROJECT_NAME)
|
|
99
|
+
$(MAKE) -C docs latexpdf SPHINXBUILD='python3 $(shell which sphinx-build)'
|
|
100
|
+
@echo "To view results use something like: evince docs/_build/latex/$(PROJECT_NAME).pdf &"
|
|
101
|
+
|
|
102
|
+
.PHONY: docs-man
|
|
103
|
+
docs-man:
|
|
104
|
+
rm -f docs/$(PROJECT_NAME)*.rst
|
|
105
|
+
rm -f docs/modules.rst
|
|
106
|
+
$(MAKE) -C docs clean
|
|
107
|
+
sphinx-apidoc -o docs/ $(PROJECT_NAME)
|
|
108
|
+
$(MAKE) -C docs man SPHINXBUILD='python3 $(shell which sphinx-build)'
|
|
109
|
+
@echo "To view results use something like: man docs/_build/man/$(PROJECT_NAME).1 &"
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
.PHONY: docs-changelog
|
|
113
|
+
docs-changelog:
|
|
114
|
+
git cliff --prepend CHANGELOG.rst -l -u
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
.PHONY: prepare-release
|
|
118
|
+
prepare-release: clean
|
|
119
|
+
@echo "Current version: "$(PROJECT_VERSION)
|
|
120
|
+
@while [ -z "$$NEW_VERSION" ]; do \
|
|
121
|
+
read -r -p "Give new version: " NEW_VERSION;\
|
|
122
|
+
done && \
|
|
123
|
+
( \
|
|
124
|
+
printf 'Setting new version: %s \n\n' \
|
|
125
|
+
"$$NEW_VERSION " \
|
|
126
|
+
) && sed -i 's/version = \"\(.*\)\"/version = "'$$NEW_VERSION'"/g' pyproject.toml \
|
|
127
|
+
&& git cliff -l -u --tag $$NEW_VERSION --prepend CHANGELOG.rst \
|
|
128
|
+
&& echo "Please manually inspect CHANGELOG.rst before continuing." \
|
|
129
|
+
&& read ans \
|
|
130
|
+
&& git add -u \
|
|
131
|
+
&& git diff-index --quiet HEAD || git commit -am "release: New release" \
|
|
132
|
+
&& git tag -a v$$NEW_VERSION -m "Version $$NEW_VERSION" \
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
.PHONY: release
|
|
136
|
+
release: clean release-git release-pip
|
|
137
|
+
|
|
138
|
+
.PHONY: release-git
|
|
139
|
+
release-git:
|
|
140
|
+
git push
|
|
141
|
+
git push origin --tags
|
|
142
|
+
|
|
143
|
+
.PHONY: release-pip
|
|
144
|
+
release-pip:
|
|
145
|
+
flit publish
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
.PHONY: dist
|
|
149
|
+
dist: clean
|
|
150
|
+
$(PYTHON) setup.py sdist
|
|
151
|
+
$(PYTHON) setup.py bdist_wheel
|
|
152
|
+
ls -l dist
|
|
153
|
+
|
|
154
|
+
.PHONY: install-deps
|
|
155
|
+
install-deps:
|
|
156
|
+
flit install --only-deps
|
|
157
|
+
|
|
158
|
+
.PHONY: install-symlink
|
|
159
|
+
install-symlink:
|
|
160
|
+
flit install --symlink
|
|
161
|
+
|
|
162
|
+
.PHONY: uninstall
|
|
163
|
+
uninstall:
|
|
164
|
+
$(PIP) uninstall -y $(PROJECT_NAME)
|
docview-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: docview
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Main package for the docview ecosystem.
|
|
5
|
+
Keywords: Document rendering,Markdown,Synchronization
|
|
6
|
+
Author-email: Robbert Harms <robbert@xkls.nl>
|
|
7
|
+
Requires-Python: >=3.14
|
|
8
|
+
Description-Content-Type: text/x-rst
|
|
9
|
+
Classifier: Development Status :: 1 - Planning
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Natural Language :: English
|
|
14
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Topic :: Communications
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: sphinx~=7.2.6 ; extra == "doc"
|
|
19
|
+
Requires-Dist: git-cliff~=2.8.0 ; extra == "doc"
|
|
20
|
+
Requires-Dist: pytest~=8.0.2 ; extra == "test"
|
|
21
|
+
Requires-Dist: pytest-check~=2.3.1 ; extra == "test"
|
|
22
|
+
Requires-Dist: pytest-cov~=4.1.0 ; extra == "test"
|
|
23
|
+
Requires-Dist: pytest-html~=4.1.1 ; extra == "test"
|
|
24
|
+
Requires-Dist: tox~=4.14.1 ; extra == "test"
|
|
25
|
+
Project-URL: homepage, https://github.com/robbert-harms/docview
|
|
26
|
+
Provides-Extra: doc
|
|
27
|
+
Provides-Extra: test
|
|
28
|
+
|
|
29
|
+
#######
|
|
30
|
+
DocView
|
|
31
|
+
#######
|
|
32
|
+
Main package for the DocView ecosystem.
|
|
33
|
+
|
docview-0.1.0/README.rst
ADDED
docview-0.1.0/cliff.toml
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Git Cliff configuration file. See: https://git-cliff.org/docs/configuration
|
|
2
|
+
|
|
3
|
+
[changelog]
|
|
4
|
+
header = """
|
|
5
|
+
*********
|
|
6
|
+
Changelog
|
|
7
|
+
*********
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# template for the changelog body
|
|
12
|
+
# https://keats.github.io/tera/docs/#introduction
|
|
13
|
+
body = """
|
|
14
|
+
{% if version %}\
|
|
15
|
+
Version {{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%Y-%m-%d") }})
|
|
16
|
+
{%- set header_length = version | trim_start_matches(pat="v") | length + timestamp | date(format="%Y-%m-%d") | length + 11 %}
|
|
17
|
+
{% for i in range(end=header_length) %}={% endfor %}
|
|
18
|
+
{% else %}\
|
|
19
|
+
[unreleased]
|
|
20
|
+
{% for i in range(end=12) %}-{% endfor %}
|
|
21
|
+
{% endif %}\
|
|
22
|
+
|
|
23
|
+
{% for group, commits in commits | group_by(attribute="group") %}
|
|
24
|
+
{{ group | striptags | trim | upper_first }}
|
|
25
|
+
{%- set subheader_length = group | striptags | trim | length%}
|
|
26
|
+
{% for i in range(end=subheader_length) %}-{% endfor %}
|
|
27
|
+
{%- for commit in commits %}
|
|
28
|
+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
|
29
|
+
{% if commit.breaking %}[**breaking**] {% endif %}\
|
|
30
|
+
{{ commit.message | upper_first }}\
|
|
31
|
+
{% endfor %}
|
|
32
|
+
{% endfor %}\n
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
# template for the changelog footer
|
|
36
|
+
footer = ""
|
|
37
|
+
|
|
38
|
+
# remove the leading and trailing s
|
|
39
|
+
trim = false
|
|
40
|
+
|
|
41
|
+
# postprocessors
|
|
42
|
+
postprocessors = [
|
|
43
|
+
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
|
|
44
|
+
]
|
|
45
|
+
# render body even when there are no releases to process
|
|
46
|
+
# render_always = true
|
|
47
|
+
# output file path
|
|
48
|
+
# output = "test.rst"
|
|
49
|
+
|
|
50
|
+
[git]
|
|
51
|
+
# parse the commits based on https://www.conventionalcommits.org
|
|
52
|
+
conventional_commits = true
|
|
53
|
+
|
|
54
|
+
# filter out the commits that are not conventional
|
|
55
|
+
filter_unconventional = false
|
|
56
|
+
|
|
57
|
+
# process each line of a commit as an individual commit
|
|
58
|
+
split_commits = false
|
|
59
|
+
|
|
60
|
+
# regex for preprocessing the commit messages
|
|
61
|
+
commit_preprocessors = [
|
|
62
|
+
# Replace issue numbers
|
|
63
|
+
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
|
64
|
+
# Check spelling of the commit with https://github.com/crate-ci/typos
|
|
65
|
+
# If the spelling is incorrect, it will be automatically fixed.
|
|
66
|
+
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
# regex for parsing and grouping commits
|
|
70
|
+
commit_parsers = [
|
|
71
|
+
{ message = "^feat", group = "<!-- 0 -->Features" },
|
|
72
|
+
{ message = "^fix", group = "<!-- 1 -->Bug Fixes" },
|
|
73
|
+
{ message = "^doc", group = "<!-- 3 -->Documentation" },
|
|
74
|
+
{ message = "^perf", group = "<!-- 4 -->Performance" },
|
|
75
|
+
{ message = "^refactor", group = "<!-- 2 -->Refactor" },
|
|
76
|
+
{ message = "^style", group = "<!-- 5 -->Styling" },
|
|
77
|
+
{ message = "^test", group = "<!-- 6 -->Testing" },
|
|
78
|
+
{ message = "^chore\\(release\\): prepare for", skip = true },
|
|
79
|
+
{ message = "^chore\\(deps.*\\)", skip = true },
|
|
80
|
+
{ message = "^chore\\(pr\\)", skip = true },
|
|
81
|
+
{ message = "^chore\\(pull\\)", skip = true },
|
|
82
|
+
{ message = "^chore|^ci", group = "<!-- 7 -->Miscellaneous Tasks" },
|
|
83
|
+
{ body = ".*security", group = "<!-- 8 -->Security" },
|
|
84
|
+
{ message = "^revert", group = "<!-- 9 -->Revert" },
|
|
85
|
+
{ message = ".*", group = "<!-- 10 -->Other" },
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
# filter out the commits that are not matched by commit parsers
|
|
89
|
+
filter_commits = false
|
|
90
|
+
|
|
91
|
+
# sort the tags topologically
|
|
92
|
+
topo_order = false
|
|
93
|
+
|
|
94
|
+
# sort the commits inside sections by oldest/newest order
|
|
95
|
+
sort_commits = "oldest"
|
|
96
|
+
|
|
97
|
+
# git tag pattern for finding the versions (taken from https://semver.org/)
|
|
98
|
+
tag_pattern = "^v(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
__author__ = 'Robbert Harms'
|
|
2
|
+
__date__ = '2015-01-01'
|
|
3
|
+
__email__ = 'robbert@xkls.nl'
|
|
4
|
+
__license__ = "LGPL v3"
|
|
5
|
+
__maintainer__ = "Robbert Harms"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
from importlib import metadata
|
|
9
|
+
from importlib.metadata import PackageNotFoundError
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
import tomllib
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
__version__ = metadata.version('docview')
|
|
16
|
+
except PackageNotFoundError:
|
|
17
|
+
with open(Path(__file__).parent.parent / 'pyproject.toml', 'rb') as f:
|
|
18
|
+
pyproject = tomllib.load(f)
|
|
19
|
+
__version__ = pyproject['project']['version']
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "docview"
|
|
3
|
+
description = "Main package for the docview ecosystem."
|
|
4
|
+
readme = "README.rst"
|
|
5
|
+
version = "0.1.0"
|
|
6
|
+
requires-python = ">=3.14"
|
|
7
|
+
keywords = ["Document rendering", "Markdown", "Synchronization"]
|
|
8
|
+
classifiers = [
|
|
9
|
+
"Development Status :: 1 - Planning",
|
|
10
|
+
"Environment :: Console",
|
|
11
|
+
"Intended Audience :: Developers",
|
|
12
|
+
"Intended Audience :: Science/Research",
|
|
13
|
+
"Natural Language :: English",
|
|
14
|
+
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
|
15
|
+
"Programming Language :: Python :: 3.14",
|
|
16
|
+
"Topic :: Communications"
|
|
17
|
+
]
|
|
18
|
+
license = { file="LICENSE" }
|
|
19
|
+
authors = [
|
|
20
|
+
{ name = "Robbert Harms", email = "robbert@xkls.nl" }
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.optional-dependencies]
|
|
26
|
+
test = [
|
|
27
|
+
"pytest~=8.0.2",
|
|
28
|
+
"pytest-check~=2.3.1",
|
|
29
|
+
"pytest-cov~=4.1.0",
|
|
30
|
+
"pytest-html~=4.1.1",
|
|
31
|
+
"tox~=4.14.1"
|
|
32
|
+
]
|
|
33
|
+
doc = [
|
|
34
|
+
"sphinx~=7.2.6",
|
|
35
|
+
"git-cliff~=2.8.0"
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
homepage = "https://github.com/robbert-harms/docview"
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
docview = "docview.cli:app"
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = ["flit_core >=3.9,<4"]
|
|
46
|
+
build-backend = "flit_core.buildapi"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
docview-0.1.0/tox.ini
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
; with ideas copied from: https://github.com/zopefoundation/RestrictedPython/blob/master/tox.ini
|
|
2
|
+
|
|
3
|
+
[tox]
|
|
4
|
+
isolated_build = True
|
|
5
|
+
envlist = setup,py312,report
|
|
6
|
+
toxworkdir = {toxinidir}/build/.tox
|
|
7
|
+
|
|
8
|
+
[testenv]
|
|
9
|
+
usedevelop = True
|
|
10
|
+
allowlist_externals = which
|
|
11
|
+
commands =
|
|
12
|
+
python --version
|
|
13
|
+
which python
|
|
14
|
+
which pip
|
|
15
|
+
which pytest
|
|
16
|
+
pytest --cov=docview --cov-report=html:build/coverage/{envname} --cov-append --html=build/pytest/report-{envname}.html --self-contained-html {posargs}
|
|
17
|
+
deps =
|
|
18
|
+
pytest
|
|
19
|
+
pytest-cov
|
|
20
|
+
pytest-html
|
|
21
|
+
joblib
|
|
22
|
+
tqdm
|
|
23
|
+
moto
|
|
24
|
+
docker
|
|
25
|
+
setenv =
|
|
26
|
+
COVERAGE_FILE=build/.coverage.{envname}
|
|
27
|
+
|
|
28
|
+
[testenv:report]
|
|
29
|
+
deps = coverage
|
|
30
|
+
skip_install = true
|
|
31
|
+
depends = py312
|
|
32
|
+
setenv =
|
|
33
|
+
COVERAGE_FILE=build/.coverage
|
|
34
|
+
commands =
|
|
35
|
+
coverage erase
|
|
36
|
+
coverage combine
|
|
37
|
+
coverage html -d build/coverage/all/
|
|
38
|
+
coverage report
|
|
39
|
+
|
|
40
|
+
[testenv:setup]
|
|
41
|
+
deps = coverage
|
|
42
|
+
skip_install = true
|
|
43
|
+
setenv =
|
|
44
|
+
COVERAGE_FILE=build/.coverage
|
|
45
|
+
commands = coverage erase
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
[pytest]
|
|
49
|
+
testpaths = tests
|
|
50
|
+
cache_dir = build/.pytest_cache
|
|
51
|
+
addopts = --capture=tee-sys
|