markdown-include-variants 0.0.1__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.
- markdown_include_variants-0.0.1/.github/DISCUSSION_TEMPLATE/questions.yml +127 -0
- markdown_include_variants-0.0.1/.github/FUNDING.yml +1 -0
- markdown_include_variants-0.0.1/.github/ISSUE_TEMPLATE/config.yml +10 -0
- markdown_include_variants-0.0.1/.github/ISSUE_TEMPLATE/privileged.yml +22 -0
- markdown_include_variants-0.0.1/.github/dependabot.yml +16 -0
- markdown_include_variants-0.0.1/.github/labeler.yml +10 -0
- markdown_include_variants-0.0.1/.github/workflows/add-labels.yml +16 -0
- markdown_include_variants-0.0.1/.github/workflows/check-labels.yml +21 -0
- markdown_include_variants-0.0.1/.github/workflows/issue-manager.yml +43 -0
- markdown_include_variants-0.0.1/.github/workflows/latest-changes.yml +40 -0
- markdown_include_variants-0.0.1/.github/workflows/publish.yml +30 -0
- markdown_include_variants-0.0.1/.github/workflows/smokeshow.yml +49 -0
- markdown_include_variants-0.0.1/.github/workflows/test.yml +125 -0
- markdown_include_variants-0.0.1/.gitignore +3 -0
- markdown_include_variants-0.0.1/.pre-commit-config.yaml +25 -0
- markdown_include_variants-0.0.1/.python-version +1 -0
- markdown_include_variants-0.0.1/CITATION.cff +21 -0
- markdown_include_variants-0.0.1/LICENSE +21 -0
- markdown_include_variants-0.0.1/PKG-INFO +145 -0
- markdown_include_variants-0.0.1/README.md +128 -0
- markdown_include_variants-0.0.1/docs_src/all_variants/tutorial001.py +10 -0
- markdown_include_variants-0.0.1/docs_src/all_variants/tutorial001_an.py +10 -0
- markdown_include_variants-0.0.1/docs_src/all_variants/tutorial001_an_py310.py +10 -0
- markdown_include_variants-0.0.1/docs_src/all_variants/tutorial001_an_py39.py +10 -0
- markdown_include_variants-0.0.1/docs_src/all_variants/tutorial001_py310.py +10 -0
- markdown_include_variants-0.0.1/docs_src/all_variants/tutorial001_py39.py +10 -0
- markdown_include_variants-0.0.1/docs_src/no_py39/tutorial001.py +10 -0
- markdown_include_variants-0.0.1/docs_src/no_py39/tutorial001_an.py +10 -0
- markdown_include_variants-0.0.1/docs_src/no_py39/tutorial001_an_py310.py +10 -0
- markdown_include_variants-0.0.1/docs_src/no_py39/tutorial001_py310.py +10 -0
- markdown_include_variants-0.0.1/docs_src/only_py310/tutorial001_an_py310.py +10 -0
- markdown_include_variants-0.0.1/docs_src/only_py310/tutorial001_py310.py +10 -0
- markdown_include_variants-0.0.1/docs_src/only_py_no_an/tutorial001.py +10 -0
- markdown_include_variants-0.0.1/docs_src/only_py_no_an/tutorial001_py310.py +10 -0
- markdown_include_variants-0.0.1/docs_src/only_py_no_an/tutorial001_py39.py +10 -0
- markdown_include_variants-0.0.1/docs_src/simple/tutorial001.py +10 -0
- markdown_include_variants-0.0.1/docs_src/up_to_py39/tutorial001.py +10 -0
- markdown_include_variants-0.0.1/docs_src/up_to_py39/tutorial001_an.py +10 -0
- markdown_include_variants-0.0.1/docs_src/up_to_py39/tutorial001_an_py39.py +10 -0
- markdown_include_variants-0.0.1/docs_src/up_to_py39/tutorial001_py39.py +10 -0
- markdown_include_variants-0.0.1/pyproject.toml +106 -0
- markdown_include_variants-0.0.1/release-notes.md +3 -0
- markdown_include_variants-0.0.1/scripts/format.sh +7 -0
- markdown_include_variants-0.0.1/scripts/lint.sh +8 -0
- markdown_include_variants-0.0.1/scripts/test.sh +9 -0
- markdown_include_variants-0.0.1/src/markdown_include_variants/__init__.py +4 -0
- markdown_include_variants-0.0.1/src/markdown_include_variants/_main.py +308 -0
- markdown_include_variants-0.0.1/src/markdown_include_variants/_version.py +1 -0
- markdown_include_variants-0.0.1/src/markdown_include_variants/py.typed +0 -0
- markdown_include_variants-0.0.1/tests/test_all_variants.py +241 -0
- markdown_include_variants-0.0.1/tests/test_no_py39.py +46 -0
- markdown_include_variants-0.0.1/tests/test_only_py310.py +35 -0
- markdown_include_variants-0.0.1/tests/test_only_py_no_an.py +36 -0
- markdown_include_variants-0.0.1/tests/test_simple_hl.py +143 -0
- markdown_include_variants-0.0.1/tests/test_simple_ln.py +491 -0
- markdown_include_variants-0.0.1/tests/test_simple_ln_hl.py +326 -0
- markdown_include_variants-0.0.1/tests/test_simple_no_configs.py +121 -0
- markdown_include_variants-0.0.1/tests/test_up_to_py39.py +93 -0
- markdown_include_variants-0.0.1/uv.lock +693 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
labels: [question]
|
|
2
|
+
body:
|
|
3
|
+
- type: markdown
|
|
4
|
+
attributes:
|
|
5
|
+
value: |
|
|
6
|
+
Thanks for your interest in this project! 🚀
|
|
7
|
+
|
|
8
|
+
Please follow these instructions, fill every question, and do every step. 🙏
|
|
9
|
+
|
|
10
|
+
I'm asking this because answering questions and solving problems in GitHub is what consumes most of the time.
|
|
11
|
+
|
|
12
|
+
I end up not being able to add new features, fix bugs, review pull requests, etc. as fast as I wish because I have to spend too much time handling questions.
|
|
13
|
+
|
|
14
|
+
All that, on top of all the incredible help provided by a bunch of community members that give a lot of their time to come here and help others.
|
|
15
|
+
|
|
16
|
+
If more users came to help others like them just a little bit more, it would be much less effort for them (and you and me 😅).
|
|
17
|
+
|
|
18
|
+
By asking questions in a structured way (following this) it will be much easier to help you.
|
|
19
|
+
|
|
20
|
+
And there's a high chance that you will find the solution along the way and you won't even have to submit it and wait for an answer. 😎
|
|
21
|
+
|
|
22
|
+
As there are too many questions, I'll have to discard and close the incomplete ones. That will allow me (and others) to focus on helping people like you that follow the whole process and help us help you. 🤓
|
|
23
|
+
- type: checkboxes
|
|
24
|
+
id: checks
|
|
25
|
+
attributes:
|
|
26
|
+
label: First Check
|
|
27
|
+
description: Please confirm and check all the following options.
|
|
28
|
+
options:
|
|
29
|
+
- label: I added a very descriptive title here.
|
|
30
|
+
required: true
|
|
31
|
+
- label: I used the GitHub search to find a similar question and didn't find it.
|
|
32
|
+
required: true
|
|
33
|
+
- label: I read all the documentation.
|
|
34
|
+
required: true
|
|
35
|
+
- label: I already searched in Google "How to do X" and didn't find any information.
|
|
36
|
+
required: true
|
|
37
|
+
- type: checkboxes
|
|
38
|
+
id: help
|
|
39
|
+
attributes:
|
|
40
|
+
label: Commit to Help
|
|
41
|
+
description: |
|
|
42
|
+
After submitting this, I commit to one of:
|
|
43
|
+
|
|
44
|
+
* Read question Discussions until I find 2 issues where I can help someone and add a comment to help there.
|
|
45
|
+
* I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
|
|
46
|
+
|
|
47
|
+
options:
|
|
48
|
+
- label: I commit to help with one of those options 👆
|
|
49
|
+
required: true
|
|
50
|
+
- type: textarea
|
|
51
|
+
id: example
|
|
52
|
+
attributes:
|
|
53
|
+
label: Example Code
|
|
54
|
+
description: |
|
|
55
|
+
Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case.
|
|
56
|
+
|
|
57
|
+
If I (or someone) can copy it, run it, and see it right away, there's a much higher chance I (or someone) will be able to help you.
|
|
58
|
+
|
|
59
|
+
placeholder: |
|
|
60
|
+
{% docs_src/first_steps/tutorial001.py %}
|
|
61
|
+
render: python
|
|
62
|
+
validations:
|
|
63
|
+
required: true
|
|
64
|
+
- type: textarea
|
|
65
|
+
id: description
|
|
66
|
+
attributes:
|
|
67
|
+
label: Description
|
|
68
|
+
description: |
|
|
69
|
+
What is the problem, question, or error?
|
|
70
|
+
|
|
71
|
+
Write a short description telling me what you are doing, what you expect to happen, and what is currently happening.
|
|
72
|
+
placeholder: |
|
|
73
|
+
* Write an include directive like that.
|
|
74
|
+
* It doesn't get expanded. I don't want to write it with *, I want it to work with %.
|
|
75
|
+
validations:
|
|
76
|
+
required: true
|
|
77
|
+
- type: dropdown
|
|
78
|
+
id: os
|
|
79
|
+
attributes:
|
|
80
|
+
label: Operating System
|
|
81
|
+
description: What operating system are you on?
|
|
82
|
+
multiple: true
|
|
83
|
+
options:
|
|
84
|
+
- Linux
|
|
85
|
+
- Windows
|
|
86
|
+
- macOS
|
|
87
|
+
- Other
|
|
88
|
+
validations:
|
|
89
|
+
required: true
|
|
90
|
+
- type: textarea
|
|
91
|
+
id: os-details
|
|
92
|
+
attributes:
|
|
93
|
+
label: Operating System Details
|
|
94
|
+
description: You can add more details about your operating system here, in particular if you chose "Other".
|
|
95
|
+
- type: input
|
|
96
|
+
id: markdown-include-variants-version
|
|
97
|
+
attributes:
|
|
98
|
+
label: markdown-include-variants Version
|
|
99
|
+
description: |
|
|
100
|
+
What markdown-include-variants version are you using?
|
|
101
|
+
|
|
102
|
+
You can find the version with:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
python -c "from importlib.metadata import version; print(version('markdown-include-variants'))"
|
|
106
|
+
```
|
|
107
|
+
validations:
|
|
108
|
+
required: true
|
|
109
|
+
- type: input
|
|
110
|
+
id: python-version
|
|
111
|
+
attributes:
|
|
112
|
+
label: Python Version
|
|
113
|
+
description: |
|
|
114
|
+
What Python version are you using?
|
|
115
|
+
|
|
116
|
+
You can find the Python version with:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
python --version
|
|
120
|
+
```
|
|
121
|
+
validations:
|
|
122
|
+
required: true
|
|
123
|
+
- type: textarea
|
|
124
|
+
id: context
|
|
125
|
+
attributes:
|
|
126
|
+
label: Additional Context
|
|
127
|
+
description: Add any additional context information or screenshots you think are useful.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github: [tiangolo]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Security Contact
|
|
4
|
+
about: Please report security vulnerabilities to security@tiangolo.com
|
|
5
|
+
- name: Question or Problem
|
|
6
|
+
about: Ask a question or ask about a problem in GitHub Discussions.
|
|
7
|
+
url: https://github.com/tiangolo/markdown-include-variants/discussions/categories/questions
|
|
8
|
+
- name: Feature Request
|
|
9
|
+
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already.
|
|
10
|
+
url: https://github.com/tiangolo/markdown-include-variants/discussions/categories/questions
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Privileged
|
|
2
|
+
description: You are @tiangolo or he asked you directly to create an issue here. If not, check the other options. 👇
|
|
3
|
+
body:
|
|
4
|
+
- type: markdown
|
|
5
|
+
attributes:
|
|
6
|
+
value: |
|
|
7
|
+
Thanks for your interest here! 🚀
|
|
8
|
+
|
|
9
|
+
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/tiangolo/markdown-include-variants/discussions/categories/questions) instead.
|
|
10
|
+
- type: checkboxes
|
|
11
|
+
id: privileged
|
|
12
|
+
attributes:
|
|
13
|
+
label: Privileged issue
|
|
14
|
+
description: Confirm that you are allowed to create an issue here.
|
|
15
|
+
options:
|
|
16
|
+
- label: I'm @tiangolo or he asked me directly to create an issue here.
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: content
|
|
20
|
+
attributes:
|
|
21
|
+
label: Issue Content
|
|
22
|
+
description: Add the content of the issue here.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# GitHub Actions
|
|
4
|
+
- package-ecosystem: "github-actions"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "daily"
|
|
8
|
+
commit-message:
|
|
9
|
+
prefix: ⬆
|
|
10
|
+
# Python
|
|
11
|
+
- package-ecosystem: "pip"
|
|
12
|
+
directory: "/"
|
|
13
|
+
schedule:
|
|
14
|
+
interval: "daily"
|
|
15
|
+
commit-message:
|
|
16
|
+
prefix: ⬆
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Check Labels
|
|
2
|
+
on:
|
|
3
|
+
pull_request_target:
|
|
4
|
+
types:
|
|
5
|
+
- opened
|
|
6
|
+
- synchronize
|
|
7
|
+
- reopened
|
|
8
|
+
# For label-checker
|
|
9
|
+
- labeled
|
|
10
|
+
- unlabeled
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
check-labels:
|
|
14
|
+
permissions:
|
|
15
|
+
pull-requests: read
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: docker://agilepathway/pull-request-label-checker:latest
|
|
19
|
+
with:
|
|
20
|
+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
|
|
21
|
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Issue Manager
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "13 18 * * *"
|
|
6
|
+
issue_comment:
|
|
7
|
+
types:
|
|
8
|
+
- created
|
|
9
|
+
issues:
|
|
10
|
+
types:
|
|
11
|
+
- labeled
|
|
12
|
+
pull_request_target:
|
|
13
|
+
types:
|
|
14
|
+
- labeled
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
issues: write
|
|
19
|
+
pull-requests: write
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
issue-manager:
|
|
23
|
+
if: github.repository_owner == 'tiangolo'
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- name: Dump GitHub context
|
|
27
|
+
env:
|
|
28
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
29
|
+
run: echo "$GITHUB_CONTEXT"
|
|
30
|
+
- uses: tiangolo/issue-manager@0.5.1
|
|
31
|
+
with:
|
|
32
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
config: >
|
|
34
|
+
{
|
|
35
|
+
"answered": {
|
|
36
|
+
"delay": 864000,
|
|
37
|
+
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
|
|
38
|
+
},
|
|
39
|
+
"waiting": {
|
|
40
|
+
"delay": 2628000,
|
|
41
|
+
"message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Latest Changes
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
types:
|
|
8
|
+
- closed
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
number:
|
|
12
|
+
description: PR number
|
|
13
|
+
required: true
|
|
14
|
+
debug_enabled:
|
|
15
|
+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
|
16
|
+
required: false
|
|
17
|
+
default: 'false'
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
latest-changes:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
with:
|
|
25
|
+
# To allow latest-changes to commit to the main branch
|
|
26
|
+
token: ${{ secrets.LATEST_CHANGES }}
|
|
27
|
+
# Allow debugging with tmate
|
|
28
|
+
- name: Setup tmate session
|
|
29
|
+
uses: mxschmitt/action-tmate@v3
|
|
30
|
+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
|
|
31
|
+
with:
|
|
32
|
+
limit-access-to-actor: true
|
|
33
|
+
- uses: tiangolo/latest-changes@0.3.1
|
|
34
|
+
with:
|
|
35
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
36
|
+
latest_changes_file: release-notes.md
|
|
37
|
+
latest_changes_header: '## Latest Changes'
|
|
38
|
+
end_regex: '^## '
|
|
39
|
+
debug_logs: true
|
|
40
|
+
label_header_prefix: '### '
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- created
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
debug_enabled:
|
|
10
|
+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
|
11
|
+
required: false
|
|
12
|
+
default: 'false'
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
publish:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
id-token: write
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
- name: Install build dependencies
|
|
26
|
+
run: pip install build
|
|
27
|
+
- name: Build distribution
|
|
28
|
+
run: python -m build
|
|
29
|
+
- name: Publish
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@v1.9.0
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Smokeshow
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows:
|
|
6
|
+
- Test
|
|
7
|
+
types:
|
|
8
|
+
- completed
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
statuses: write
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
UV_SYSTEM_PYTHON: 1
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
smokeshow:
|
|
18
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Dump GitHub context
|
|
23
|
+
env:
|
|
24
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
25
|
+
run: echo "$GITHUB_CONTEXT"
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.9'
|
|
29
|
+
- name: Setup uv
|
|
30
|
+
uses: astral-sh/setup-uv@v3
|
|
31
|
+
with:
|
|
32
|
+
version: "0.4.15"
|
|
33
|
+
enable-cache: true
|
|
34
|
+
- name: Install Dependencies
|
|
35
|
+
run: uv sync
|
|
36
|
+
- uses: actions/download-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: coverage-html
|
|
39
|
+
path: htmlcov
|
|
40
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
41
|
+
run-id: ${{ github.event.workflow_run.id }}
|
|
42
|
+
- run: uvx smokeshow upload htmlcov
|
|
43
|
+
env:
|
|
44
|
+
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
|
|
45
|
+
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100
|
|
46
|
+
SMOKESHOW_GITHUB_CONTEXT: coverage
|
|
47
|
+
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
48
|
+
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
|
49
|
+
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types:
|
|
9
|
+
- opened
|
|
10
|
+
- synchronize
|
|
11
|
+
schedule:
|
|
12
|
+
# cron every week on monday
|
|
13
|
+
- cron: "0 0 * * 1"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: Dump GitHub context
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
22
|
+
run: echo "$GITHUB_CONTEXT"
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.11"
|
|
28
|
+
- name: Setup uv
|
|
29
|
+
uses: astral-sh/setup-uv@v3
|
|
30
|
+
with:
|
|
31
|
+
version: "0.4.15"
|
|
32
|
+
enable-cache: true
|
|
33
|
+
- name: Install Dependencies
|
|
34
|
+
run: uv sync
|
|
35
|
+
- name: Lint
|
|
36
|
+
run: bash scripts/lint.sh
|
|
37
|
+
|
|
38
|
+
test:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
python-version:
|
|
43
|
+
- "3.9"
|
|
44
|
+
fail-fast: false
|
|
45
|
+
steps:
|
|
46
|
+
- name: Dump GitHub context
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
49
|
+
run: echo "$GITHUB_CONTEXT"
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
- name: Set up Python
|
|
52
|
+
uses: actions/setup-python@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: ${{ matrix.python-version }}
|
|
55
|
+
- name: Setup uv
|
|
56
|
+
uses: astral-sh/setup-uv@v3
|
|
57
|
+
with:
|
|
58
|
+
version: "0.4.15"
|
|
59
|
+
enable-cache: true
|
|
60
|
+
- name: Install Dependencies
|
|
61
|
+
run: uv sync
|
|
62
|
+
- run: mkdir coverage
|
|
63
|
+
- name: Test
|
|
64
|
+
run: uvx bash scripts/test.sh
|
|
65
|
+
env:
|
|
66
|
+
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
|
|
67
|
+
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
|
|
68
|
+
- name: Store coverage files
|
|
69
|
+
uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: coverage-${{ matrix.python-version }}
|
|
72
|
+
path: coverage
|
|
73
|
+
include-hidden-files: true
|
|
74
|
+
|
|
75
|
+
coverage-combine:
|
|
76
|
+
needs:
|
|
77
|
+
- test
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
steps:
|
|
80
|
+
- name: Dump GitHub context
|
|
81
|
+
env:
|
|
82
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
83
|
+
run: echo "$GITHUB_CONTEXT"
|
|
84
|
+
- uses: actions/checkout@v4
|
|
85
|
+
- uses: actions/setup-python@v5
|
|
86
|
+
with:
|
|
87
|
+
python-version: '3.11'
|
|
88
|
+
- name: Setup uv
|
|
89
|
+
uses: astral-sh/setup-uv@v3
|
|
90
|
+
with:
|
|
91
|
+
version: "0.4.15"
|
|
92
|
+
enable-cache: true
|
|
93
|
+
- name: Get coverage files
|
|
94
|
+
uses: actions/download-artifact@v4
|
|
95
|
+
with:
|
|
96
|
+
pattern: coverage-*
|
|
97
|
+
path: coverage
|
|
98
|
+
merge-multiple: true
|
|
99
|
+
- run: uv sync
|
|
100
|
+
- run: ls -la coverage
|
|
101
|
+
- run: uvx coverage combine coverage
|
|
102
|
+
- run: uvx coverage report
|
|
103
|
+
- run: uvx coverage html --title "Coverage for ${{ github.sha }}"
|
|
104
|
+
- name: Store coverage HTML
|
|
105
|
+
uses: actions/upload-artifact@v4
|
|
106
|
+
with:
|
|
107
|
+
name: coverage-html
|
|
108
|
+
path: htmlcov
|
|
109
|
+
include-hidden-files: true
|
|
110
|
+
|
|
111
|
+
# https://github.com/marketplace/actions/alls-green#why
|
|
112
|
+
tests-alls-green: # This job does nothing and is only used for the branch protection
|
|
113
|
+
if: always()
|
|
114
|
+
needs:
|
|
115
|
+
- coverage-combine
|
|
116
|
+
runs-on: ubuntu-latest
|
|
117
|
+
steps:
|
|
118
|
+
- name: Dump GitHub context
|
|
119
|
+
env:
|
|
120
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
121
|
+
run: echo "$GITHUB_CONTEXT"
|
|
122
|
+
- name: Decide whether the needed jobs succeeded or failed
|
|
123
|
+
uses: re-actors/alls-green@release/v1
|
|
124
|
+
with:
|
|
125
|
+
jobs: ${{ toJSON(needs) }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
+
default_language_version:
|
|
4
|
+
python: python3.10
|
|
5
|
+
repos:
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v4.6.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: check-added-large-files
|
|
10
|
+
- id: check-toml
|
|
11
|
+
- id: check-yaml
|
|
12
|
+
args:
|
|
13
|
+
- --unsafe
|
|
14
|
+
- id: end-of-file-fixer
|
|
15
|
+
- id: trailing-whitespace
|
|
16
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
17
|
+
rev: v0.6.5
|
|
18
|
+
hooks:
|
|
19
|
+
- id: ruff
|
|
20
|
+
args:
|
|
21
|
+
- --fix
|
|
22
|
+
- id: ruff-format
|
|
23
|
+
ci:
|
|
24
|
+
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
|
|
25
|
+
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.9
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This CITATION.cff file was generated with cffinit.
|
|
2
|
+
# Visit https://bit.ly/cffinit to generate yours today!
|
|
3
|
+
|
|
4
|
+
cff-version: 1.2.0
|
|
5
|
+
title: markdown-include-variants
|
|
6
|
+
message: >-
|
|
7
|
+
If you use this software, please cite it using the
|
|
8
|
+
metadata from this file.
|
|
9
|
+
type: software
|
|
10
|
+
authors:
|
|
11
|
+
- given-names: Sebastián
|
|
12
|
+
family-names: Ramírez
|
|
13
|
+
email: tiangolo@gmail.com
|
|
14
|
+
identifiers:
|
|
15
|
+
repository-code: 'https://github.com/tiangolo/markdown-include-variants'
|
|
16
|
+
url: 'https://github.com/tiangolo/markdown-include-variants'
|
|
17
|
+
abstract: >-
|
|
18
|
+
markdown-include-variants, expand multiple variants of source examples in Markdown.
|
|
19
|
+
keywords:
|
|
20
|
+
- markdown
|
|
21
|
+
license: MIT
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Sebastián Ramírez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|