Skip to content

Commit 2e7a012

Browse files
committed
✨NEW: Initial commit
Code copied from: executablebooks/markdown-it-py@3a5bdcc
1 parent ea2193f commit 2e7a012

Some content is hidden

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

79 files changed

+8945
-1
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 100
3+
ignore = E203,W503

.github/workflows/tests.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: continuous-integration
5+
6+
on:
7+
push:
8+
branches: [master]
9+
tags:
10+
- 'v*'
11+
pull_request:
12+
13+
jobs:
14+
15+
pre-commit:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python 3.8
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: 3.8
25+
- uses: pre-commit/[email protected]
26+
27+
tests:
28+
29+
runs-on: ubuntu-latest
30+
strategy:
31+
matrix:
32+
python-version: [pypy3, 3.6, 3.7, 3.8, 3.9]
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Set up Python ${{ matrix.python-version }}
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install .[testing]
44+
- name: Run pytest
45+
run: |
46+
pytest --cov=mdit_py_plugins --cov-report=xml --cov-report=term-missing
47+
- name: Upload to Codecov
48+
uses: codecov/codecov-action@v1
49+
with:
50+
name: markdown-it-py-pytests
51+
flags: pytests
52+
file: ./coverage.xml
53+
fail_ci_if_error: true
54+
55+
publish:
56+
57+
name: Publish to PyPi
58+
needs: [pre-commit, tests]
59+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout source
63+
uses: actions/checkout@v2
64+
- name: Set up Python 3.7
65+
uses: actions/setup-python@v2
66+
with:
67+
python-version: 3.7
68+
- name: Build package
69+
run: |
70+
pip install wheel
71+
python setup.py sdist bdist_wheel
72+
- name: Publish
73+
uses: pypa/[email protected]
74+
with:
75+
user: __token__
76+
password: ${{ secrets.PYPI_KEY }}

.gitignore

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
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+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
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+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
benchmark/extra/
132+
node_modules/
133+
coverage/
134+
demo/
135+
apidoc/
136+
*.log
137+
__pycache__/
138+
.ropeproject/
139+
*.egg-info/
140+
.vscode/
141+
.DS_Store
142+
143+
docs/api/

.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Install pre-commit hooks via
2+
# pre-commit install
3+
4+
exclude: >
5+
(?x)^(
6+
\.vscode/settings\.json|
7+
test.*\.md|
8+
test.*\.txt|
9+
test.*\.html|
10+
)$
11+
12+
repos:
13+
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v3.2.0
16+
hooks:
17+
- id: check-json
18+
- id: check-yaml
19+
- id: end-of-file-fixer
20+
- id: trailing-whitespace
21+
22+
- repo: https://github.com/mgedmin/check-manifest
23+
rev: "0.42"
24+
hooks:
25+
- id: check-manifest
26+
27+
- repo: https://gitlab.com/pycqa/flake8
28+
rev: 3.8.3
29+
hooks:
30+
- id: flake8
31+
32+
- repo: https://github.com/psf/black
33+
rev: 20.8b1
34+
hooks:
35+
- id: black

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 ExecutableBookProject
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 all
13+
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 THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
exclude tests
2+
recursive-exclude tests *
3+
4+
exclude .pre-commit-config.yaml
5+
exclude .readthedocs.yml
6+
exclude tox.ini
7+
exclude .flake8
8+
exclude codecov.yml
9+
10+
include LICENSE
11+
include CHANGELOG.md
12+
13+
recursive-include mdit_py_plugins port.yaml LICENSE README.md

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
11
# mdit-py-plugins
22

3-
Collection of plugins for [markdown-it-py](https://github.com/executablebooks/markdown-it-py).
3+
[![Github-CI][github-ci]][github-link]
4+
[![Coverage Status][codecov-badge]][codecov-link]
5+
[![PyPI][pypi-badge]][pypi-link]
6+
[![Conda][conda-badge]][conda-link]
7+
[![Code style: black][black-badge]][black-link]
8+
9+
Collection of core plugins for [mdit-py-plugins](https://github.com/executablebooks/mdit-py-plugins).
10+
11+
[github-ci]: https://github.com/executablebooks/mdit-py-plugins/workflows/Python%20package/badge.svg?branch=master
12+
[github-link]: https://github.com/executablebooks/mdit-py-plugins
13+
[pypi-badge]: https://img.shields.io/pypi/v/mdit-py-plugins.svg
14+
[pypi-link]: https://pypi.org/project/mdit-py-plugins
15+
[conda-badge]: https://anaconda.org/conda-forge/mdit-py-plugins/badges/version.svg
16+
[conda-link]: https://anaconda.org/conda-forge/mdit-py-plugins
17+
[codecov-badge]: https://codecov.io/gh/executablebooks/mdit-py-plugins/branch/master/graph/badge.svg
18+
[codecov-link]: https://codecov.io/gh/executablebooks/mdit-py-plugins
19+
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
20+
[black-link]: https://github.com/ambv/black
21+
[install-badge]: https://img.shields.io/pypi/dw/mdit-py-plugins?label=pypi%20installs
22+
[install-link]: https://pypistats.org/packages/mdit-py-plugins

codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 95%
6+
threshold: 0.2%
7+
patch:
8+
default:
9+
target: 80%
10+
threshold: 0.2%

mdit_py_plugins/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0"

0 commit comments

Comments
 (0)