Skip to content

Commit

Permalink
Merge pull request #56 from ickc/pandoc-2_11
Browse files Browse the repository at this point in the history
Closes #51
  • Loading branch information
ickc authored Dec 19, 2020
2 parents bb0566d + 7269146 commit 14e3e30
Show file tree
Hide file tree
Showing 112 changed files with 5,695 additions and 1,997 deletions.
24 changes: 24 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[bumpversion]
current_version = 0.13.0
commit = True
tag = True

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:makefile]
search = "pantable-{current_version}"
replace = "pantable-{new_version}"

[bumpversion:file:docs/badges.csv]
search = v{current_version}.
replace = v{new_version}.

[bumpversion:file:docs/conf.py]
search = version = release = "{current_version}"
replace = version = release = "{new_version}"

[bumpversion:file:src/pantable/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
10 changes: 0 additions & 10 deletions .coveragerc

This file was deleted.

20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# see https://editorconfig.org/
root = true

[*]
# Use Unix-style newlines for most files (except Windows files, see below).
end_of_line = lf
trim_trailing_whitespace = true
indent_style = space
insert_final_newline = true
indent_size = 4
charset = utf-8

[*.{bat,cmd,ps1}]
end_of_line = crlf

[*.{yml,yaml}]
indent_size = 2

[*.tsv]
indent_style = tab
47 changes: 35 additions & 12 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ jobs:
fail-fast: false
matrix:
# see setup.py for supported versions
python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
python-version:
# - 3.6
- 3.7
- 3.8
- 3.9
- pypy3
# should test sparingly across API breaking boundaries
pandoc-version:
- 2.0.6
# - 2.0.6
# - 2.1.3
# - 2.2.3.2
# - 2.3.1
Expand All @@ -27,13 +32,13 @@ jobs:
# - 2.7.3
# no major API change between 2.7 to 2.9
# - 2.8.1
- 2.9.2.1
# - 2.9.2.1
# as of writing, panflute only support pandoc<= 2.9. But GitHub workflow does not support "allow failure" yet. See https://github.com/actions/toolkit/issues/399
# 2.10 has breaking change
# - 2.10.1
# 2.11 has minor breaking change, fixing some quirks in 2.10
# - 2.11.1
# - latest
# - 2.11.0.4
- latest

steps:
- uses: actions/checkout@v2
Expand All @@ -43,9 +48,19 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies—pip
run: |
pip install --upgrade setuptools pip
pip install wheel
pip install -e .[test]
# TODO cleanup when pypy 3.7 and numpy for pypy 3.7 stable release
if [[ ${{ matrix.python-version }} == pypy3 ]]; then
# install our own pypy37
mkdir -p ~/.local
wget -qO- https://downloads.python.org/pypy/pypy3.7-v7.3.3-linux64.tar.bz2 | tar -xjf - -C ~/.local --strip-components=1
export PATH="$HOME/.local/bin:$PATH"
pypy -m ensurepip
pypy -m pip install -U 'numpy==1.20.0rc1' poetry setuptools
make editable EXTRAS=[extras,tests] python=pypy
else
pip install -U poetry setuptools
make editable EXTRAS=[extras,tests]
fi
- name: Install dependencies—pandoc
run: |
# pandoc
Expand All @@ -54,13 +69,21 @@ jobs:
wget --quiet "$downloadUrl"
sudo dpkg -i "${downloadUrl##*/}"
- name: Tests
run: make clean && make test -j1
run: |
# TODO cleanup when pypy 3.7 and numpy for pypy 3.7 stable release
if [[ ${{ matrix.python-version }} == pypy3 ]]; then
export PATH="$HOME/.local/bin:$PATH"
make test COVHTML= python=pypy
else
# TODO cleanup when pytest-parallel support python 3.9 and runs sucessfully
[[ ${{ matrix.python-version }} == 3.9 ]] && make test COVHTML= PYTESTPARALLEL= || make test COVHTML=
fi
# c.f. https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
- name: Build a binary wheel and a source tarball
if: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.python-version == 3.9 && matrix.pandoc-version == '2.9.2.1' }}
run: python setup.py sdist bdist_wheel
if: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.python-version == 3.9 && matrix.pandoc-version == 'latest' }}
run: poetry build
- name: Publish distribution 📦 to PyPI
if: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.python-version == 3.9 && matrix.pandoc-version == '2.9.2.1' }}
if: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.python-version == 3.9 && matrix.pandoc-version == 'latest' }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
41 changes: 41 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: GitHub Pages

on: push
# TODO
# push:
# branches:
# - master

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.9
pandoc-version:
- latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies—pip
run: |
pip install -U poetry setuptools tox
make editable EXTRAS=[docs]
- name: Install dependencies—pandoc
run: |
# pandoc
[[ ${{ matrix.pandoc-version }} == "latest" ]] && url="https://github.com/jgm/pandoc/releases/latest" || url="https://github.com/jgm/pandoc/releases/tag/${{ matrix.pandoc-version }}"
downloadUrl="https://github.com$(curl -L $url | grep -o '/jgm/pandoc/releases/download/.*-amd64\.deb')"
wget --quiet "$downloadUrl"
sudo dpkg -i "${downloadUrl##*/}"
- name: Make docs
run: make html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist/docs
108 changes: 72 additions & 36 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,83 @@
# macOS files
.DS_Store
docs/modules.rst
docs/pantable*.rst
docs/dot/pipeline-simple.dot

tests/reference_idempotent.native
tests/*.native
!tests/reference_pantable.native
tests/*.pdf
poetry.lock
setup.py

# python auxiliary
__pycache__/
.cache
*.pyc
.ipynb_checkpoints
*.ipynb

# pypi
dist/
pantable.egg-info/
*.py[cod]
__pycache__

# coverage
.coverage
.coverage.*
htmlcov/
# C extensions
*.so

# pycharm
.idea/
# Packages
*.egg
*.egg-info
dist
build
eggs
.eggs
parts
bin
var
sdist
wheelhouse
develop-eggs
.installed.cfg
lib
lib64
venv*/
pyvenv*/
pip-wheel-metadata/

# rst2html
README.rst
README.html
# Installer logs
pip-log.txt

.mypy_cache/
# Unit test / coverage reports
.coverage*
.tox
.pytest_cache/
build/
.vscode/
nosetests.xml
coverage.xml
htmlcov

# Translations
*.mo

# Buildout
.mr.developer.cfg

# IDE project files
.project
.pydevproject
.idea
.vscode
*.iml
*.komodoproject

gh-pages/
# Complexity
output/*.html
output/*/index.html

docs/*
!docs/badges.markdown
!docs/comparison.csv
!docs/example.csv
!docs/README.md
# Sphinx
!docs/conf.py
!docs/index.rst
!docs/make.bat
!docs/Makefile
!docs/requirements.txt
docs/_build

.DS_Store
*~
.*.sw[po]
.build
.ve
.env
.cache
.pytest
.benchmarks
.bootstrap
.appveyor.token
*.bak

# Mypy Cache
.mypy_cache/
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Revision history for Pantable

- v0.13:added pandoc 2.11.0.4+ & panflute 2+ support
- pandoc 2.10 introduces a new table AST. This version provides complete support of all features supported in the pandoc AST. Hence, older pandoc versions are no longer supported. Install `pantable=0.12.4` if you need to use `pandoc<2.10`.
- deprecated `pipe_tables`, `grid_tables`, `raw_markdown` options in pantable, which were introduced in v0.12. pantable v0.13 has a much better way to process markdown cells that these are no longer needed.
- slight changes on markdown output which should be functionally identical. Both changes in pandoc and pantable cause this. See commit eadc6fb.
- v0.12.4: Require panflute<2 explicitly
- panflute 2 is released to support pandoc API 1.22. This release ensures that version control is correct when people specify pantable==0.12 in the future.
- v0.12.3: Fixes test and CI; update on supported Python versions
- migrate from Travis CI to GitHub Actions
- supported Python versions are now 3.5-3.8, pypy3
- minor update in README
- v0.12.2: Add `grid_tables`
- v0.12.1: add `include-encoding`, `csv-kwargs`
- closes #36, #38. See doc for details on this new keys.
- v0.12: Drop Python 2 support; enhance CSV with markdown performance
- Dropping Python2 support, existing Python 2 users should be fine with pip>=9.0. See <https://python3statement.org/practicalities/>.

- add `pipe_tables`, `raw_markdown` options. See README for details. This for example will speed up CSV with markdown cells a lot (trading correctness for speed though.)
37 changes: 37 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.. This is auto-generated from `CHANGELOG.md`. Do not edit this file directly.
:Date: December 16, 2020

.. contents::
:depth: 3
..
Revision history for Pantable
=============================

- v0.13:added pandoc 2.11.0.4+ & panflute 2+ support

- pandoc 2.10 introduces a new table AST. This version provides complete support of all features supported in the pandoc AST. Hence, older pandoc versions are no longer supported. Install ``pantable=0.12.4`` if you need to use ``pandoc<2.10``.
- deprecated ``pipe_tables``, ``grid_tables``, ``raw_markdown`` options in pantable, which were introduced in v0.12. pantable v0.13 has a much better way to process markdown cells that these are no longer needed.
- slight changes on markdown output which should be functionally identical. Both changes in pandoc and pantable cause this. See commit eadc6fb.

- v0.12.4: Require panflute<2 explicitly

- panflute 2 is released to support pandoc API 1.22. This release ensures that version control is correct when people specify pantable==0.12 in the future.

- v0.12.3: Fixes test and CI; update on supported Python versions

- migrate from Travis CI to GitHub Actions
- supported Python versions are now 3.5-3.8, pypy3
- minor update in README

- v0.12.2: Add ``grid_tables``
- v0.12.1: add ``include-encoding``, ``csv-kwargs``

- closes #36, #38. See doc for details on this new keys.

- v0.12: Drop Python 2 support; enhance CSV with markdown performance

- Dropping Python2 support, existing Python 2 users should be fine with pip>=9.0. See https://python3statement.org/practicalities/.

- add ``pipe_tables``, ``raw_markdown`` options. See README for details. This for example will speed up CSV with markdown cells a lot (trading correctness for speed though.)
5 changes: 0 additions & 5 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 14e3e30

Please sign in to comment.