diff --git a/.circleci/config.yml b/.circleci/config.yml index d295c9c0..df947633 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,9 @@ jobs: - restore_cache: keys: - cache-pip - - run: pip install --user -e .[sphinx,rtd] + - run: | + pip install --user -e .[sphinx,rtd] + pip install -r docs/requirements.txt - save_cache: key: cache-pip paths: diff --git a/.readthedocs.yml b/.readthedocs.yml index 123a4730..070d8d90 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,3 +8,4 @@ python: extra_requirements: - sphinx - rtd + - requirements: docs/requirments.txt diff --git a/.travis.yml b/.travis.yml index 6ebf110d..3dcbed2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ matrix: - python: 3.6 env: TEST_TYPE="pytest" - python: 3.7 - env: TEST_TYPE="pytest" + env: TEST_TYPE="pytest" PYPI_DEPLOY=true - python: 3.7 env: TEST_TYPE="pre-commit" install: @@ -37,3 +37,14 @@ after_success: if [[ "$TEST_TYPE" == "pytest" ]]; then coveralls fi + +deploy: + - provider: pypi + distributions: "sdist bdist_wheel" + user: cjsewell + password: + secure: XDaPRuCORFOvwXUfP6S5QOsFOpQmQiURGA603Rs3WkY0Y4up1uQjDWu2wUCh4cNPM5ITMXMFrRCWCFh289LM21c5pzExvx7RpsXfHol6F0hMGxjwmeU2aRltaVCa/zvevdBmgTa0aOMhOGmiLnSHxSAXYUHxkkHG4GmypsAshWNzJGSzSPBwt6YBkqXkeeJYC0S+t8tFEDjtEwn6E3Iy49L25+mI5ip8N6JRgAgR6umTCfKcCMBuyBii+/VDGKGsM4bdiDnXiDYWn0l9hzzSMr1xeiYtXB56N+6eRgm2oprRNnX4widbq3UJ5tp5/p3R7xXBi7NTz82d2vncNjk9Q3y35AyNb08Y2jJSsAw5CcWjQITvxMsHjhLibvrn/skkLgtE005ItNn4IFceH/y6HgmBn1yrA2z9bxfB5VLmsl4UqXYvn7Bd0l8C4IIbhsxtvH/yOtJ0sXQI3HTZVepJcrf8mAGfJVdnd9eqtMfXIr+6vlRqJByMK8f7drpdfWynC8bzfFrNIh/OHKoZzvEk7o6cDCj91vPcpxygecHvPDf0Tx/vdOFwEF8LTXNWVPjTHJMzurw946vpArCoAC1T8uwF+5fiu/ZcEfudKKincS6K9/2aFzgpoKOdbKP9/1h3hRjjPKc8HqTt9jziwuOl//KS0DJS3BSZZvFyaBI2p/Y= + on: + branch: master + tags: true + condition: $PYPI_DEPLOY = true diff --git a/README.md b/README.md index 4100b32d..a057cc18 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,18 @@ # MyST-Parser -[![Build Status](https://travis-ci.org/ExecutableBookProject/MyST-Parser.svg?branch=master)](https://travis-ci.org/ExecutableBookProject/MyST-Parser) -[![Coverage Status](https://coveralls.io/repos/github/ExecutableBookProject/MyST-Parser/badge.svg?branch=master)](https://coveralls.io/github/ExecutableBookProject/MyST-Parser?branch=master) -[![Documentation Status](https://readthedocs.org/projects/myst-parser/badge/?version=latest)](https://myst-parser.readthedocs.io/en/latest/?badge=latest) +[![CI Status][travis-badge]][travis-link] +[![Coverage][coveralls-badge]][coveralls-link] +[![Documentation Status][rtd-badge]][rtd-link] +[![Code style: black][black-badge]][black-link] +[![PyPI][pypi-badge]][pypi-link] + An extended commonmark compliant parser, with bridges to docutils & sphinx. ## Usage ```bash -pip install -e "git+https://github.com/ExecutableBookProject/MyST-Parser.git#egg=myst-parser[sphinx]" +pip install myst-parser[sphinx] ``` Or for package development: @@ -21,9 +24,6 @@ git checkout master pip install -e .[sphinx,code_style,testing,rtd] ``` -Note, this parser currently requires the [ExecutableBookProject/mistletoe](https://github.com/ExecutableBookProject/mistletoe) -fork of mistletoe (included in the above installation). - To use the MyST parser in Sphinx, simply add: `extensions = ["myst_parser"]` to your `conf.py`. ## Parsed Token Classes @@ -104,3 +104,17 @@ Merging pull requests: There are three ways of 'merging' pull requests on GitHub Examples: PRs that contain multiple commits with individually significant changes; PRs that have commits from different authors (squashing commits would remove attribution) - Merge with merge commit: put all commits as they are on the base branch, with a merge commit on top Choose for collaborative PRs with many commits. Here, the merge commit provides actual benefits. + + +[travis-badge]: https://travis-ci.org/ExecutableBookProject/MyST-Parser.svg?branch=master +[travis-link]: https://travis-ci.org/ExecutableBookProject/MyST-Parser +[coveralls-badge]: https://coveralls.io/repos/github/ExecutableBookProject/MyST-Parser/badge.svg?branch=master +[coveralls-link]: https://coveralls.io/github/ExecutableBookProject/MyST-Parser?branch=master +[rtd-badge]: https://readthedocs.org/projects/myst-parser/badge/?version=latest +[rtd-link]: https://myst-parser.readthedocs.io/en/latest/?badge=latest +[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg +[pypi-badge]: https://img.shields.io/pypi/v/myst-parser.svg +[pypi-link]: https://pypi.org/project/myst-parser +[conda-badge]: https://anaconda.org/conda-forge/myst-parser/badges/version.svg +[conda-link]: https://anaconda.org/conda-forge/myst-parser +[black-link]: https://github.com/ambv/black diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..e250c225 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +git+https://github.com/pandas-dev/pandas-sphinx-theme.git@master diff --git a/docs/using/install.md b/docs/using/install.md index 64a05227..99265bf3 100644 --- a/docs/using/install.md +++ b/docs/using/install.md @@ -8,7 +8,7 @@ Installing the MyST parser provides access to two tools: To install the MyST parser, run the following: ```bash -pip install -e "git+https://github.com/ExecutableBookProject/MyST-Parser.git#egg=myst-parser[sphinx]" +pip install myst-parser[sphinx] ``` Or for package development: @@ -19,6 +19,3 @@ cd MyST-Parser git checkout master pip install -e .[sphinx,code_style,testing,rtd] ``` - -This should install the myst fork of mistletoe, along with the Sphinx parser -that is included in the "extensions" configuration of this site. diff --git a/myst_parser/__init__.py b/myst_parser/__init__.py index d3d8902e..94e704e6 100644 --- a/myst_parser/__init__.py +++ b/myst_parser/__init__.py @@ -1,6 +1,6 @@ from .utils import traverse # noqa: F401 -__version__ = "0.3.0" +__version__ = "0.3.1" def text_to_tokens(text: str): diff --git a/setup.py b/setup.py index 4e412994..6e42fd20 100644 --- a/setup.py +++ b/setup.py @@ -35,12 +35,7 @@ ], keywords="markdown lexer parser development docutils sphinx", python_requires=">=3.5", - install_requires=[ - ( - "mistletoe @ " - "https://github.com/ExecutableBookProject/mistletoe/archive/myst.zip" - ) - ], + install_requires=["mistletoe-ebp==0.8.2"], extras_require={ "sphinx": ["pyyaml", "docutils>=0.15", "sphinx>=2,<3"], "code_style": ["flake8<3.8.0,>=3.7.0", "black", "pre-commit==1.17.0"], @@ -51,14 +46,7 @@ "pytest-regressions", "beautifulsoup4", ], - "rtd": [ - "sphinxcontrib-bibtex", - "ipython", - ( - "pandas_sphinx_theme @ " - "https://github.com/pandas-dev/pandas-sphinx-theme/archive/master.zip" - ), - ], + "rtd": ["sphinxcontrib-bibtex", "ipython"], }, zip_safe=True, )