Skip to content

Commit 2ae66f4

Browse files
authored
Merge pull request #615 from neerdoc/publisher_restruct
Publisher restruct
2 parents e91dc8f + 20e3ab4 commit 2ae66f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3609
-2161
lines changed

.github/workflows/execute-tests.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: ["3.8", "3.9", "3.10"]
21+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2222
name: Python ${{ matrix.python-version }}
2323

2424
defaults:
@@ -60,14 +60,22 @@ jobs:
6060
# very slow. Especially any client/server tests seems to be problematic.
6161
# This is a simple attempt to re-run the tests up to three times if they
6262
# fail. Does not add any execution time if successful.
63-
- name: Run tests attempt 1
64-
run: make test
65-
- name: Run tests attempt 2
66-
if: ${{ failure() }}
67-
run: make test
68-
- name: Run tests attempt 3
69-
if: ${{ failure() }}
70-
run: make test
63+
- uses: Wandalen/wretry.action@v1.0.20
64+
name: Run tests
65+
with:
66+
command: make test
67+
current_path: ${{ inputs.workpath }}
68+
attempt_limit: 3
69+
attempt_delay: 2000
70+
71+
# - name: Run tests attempt 1
72+
# run: make test
73+
# - name: Run tests attempt 2
74+
# if: ${{ failure() }}
75+
# run: make test
76+
# - name: Run tests attempt 3
77+
# if: ${{ failure() }}
78+
# run: make test
7179

7280
- name: Upload coverage
7381
uses: codecov/codecov-action@v1

.verchew.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version = GNU Make
66
[Python]
77

88
cli = python
9-
version = 3.8 || 3.9 || 3.10
9+
version = 3.8 || 3.9 || 3.10 || 3.11 || 3.12
1010

1111
[Poetry]
1212

docs/cli/publishing.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,30 @@ Supported formats:
6363
- Markdown: `.md`
6464
- HTML: `.html`
6565
- LaTeX: `.tex`
66+
67+
# Templates
68+
69+
Each output format also has support for templates that can adjust the formatting of the output. Any folder named `template` that is placed alongside the `.doorstop.yml` configuration file will be copied during the publishing process into the output folder. _Note: If multiple documents contain the `template` _folder, they will **all** be copied, although no overwriting is performed._
70+
71+
A command line `--template` flag is provided to allow choosing the template by name. By default, both LaTeX and HTML publishing formats _require_ a template! Therefore, _doorstop_ provides standard templates for these formats that will be used automatically if no template name is given during publishing.
72+
73+
The flag is used by providing the name of the template, i.e., `--template sidebar`.
74+
75+
## HTML templates
76+
77+
HTML template name will instruct the publisher to use the `<name>.css` file in the template folder as formatting. E.g., the default HTML template name is `sidebar`, which then will publish the HTML documents with the `sidebar.css` included in the output.
78+
79+
## LaTeX templates
80+
81+
LaTex template name will similarly instruct the publisher to use the `<name>.yml` _and_ the `<name>.cls` files in the template folder for formatting the output documents.
82+
83+
Due to the rather high complexity of typesetting LaTeX documents, a configuration file `<name>.yml` must be provided to allow _doorstop_ to understand how to typeset the output documents as well as a normal LaTeX class template to provide the LaTeX specific formatting.
84+
85+
The default LaTeX template is `doorstop`, and is included with _doorstop_. The `doorstop.yml` file is commented to provided guidance on how to write your own LaTeX template.
86+
87+
# Assets
88+
89+
In addition to the `template` folder, an `assets` folder placed next to the
90+
`.doorstop.yml` file for a document will also be copied in the same manner to
91+
the output folder. The purpose of the `assets` folder is to contain images or
92+
other external artifacts that can be included in the published documents.

doorstop/cli/tests/test_all.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
from doorstop.core.builder import _clear_tree
2323
from doorstop.core.document import Document
2424

25-
REQ_COUNT = 18
26-
ALL_COUNT = 50
25+
REQ_COUNT = 23
26+
ALL_COUNT = 55
2727

2828

2929
class TempTestCase(unittest.TestCase):
File renamed without changes.

doorstop/core/files/templates/html/doorstop/bootstrap.min.css renamed to doorstop/core/files/templates/html/bootstrap.min.css

File renamed without changes.

doorstop/core/files/templates/html/doorstop/bootstrap.min.js renamed to doorstop/core/files/templates/html/bootstrap.min.js

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)