forked from pdfminer/pdfminer.six
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* develop: Check blackness in github actions (pdfminer#711) Changed `log.info` to `log.debug` in six files (pdfminer#690) Update README.md batch for Continuous integration Update actions.yml so that it will run for all PR's Update development tools: travis ci to github actions, tox to nox, nose to pytest (pdfminer#704) Added feature: page labels (pdfminer#680) Remove obsolete returns (pdfminer#707) Revert "Remove obsolete returns" Remove obsolete returns Only use xref fallback if `PDFNoValidXRef` is raised and `fallback` is True (pdfminer#684) Use logger.warn instead of warnings.warn if warning cannot be prevented by user (pdfminer#673) Change log.info into log.debug to make pdfinterp.py less verbose Fix regression in page layout that sometimes returned text lines out of order (pdfminer#659) export type annotations in package (pdfminer#679) fix typos in PR template (pdfminer#681) pdf2txt: clean up construction of LAParams from arguments (pdfminer#682) Fixes jbig2 writer to write valid jb2 files Add support for JPEG2000 image encoding Added test case for CCITTFaxDecoder (pdfminer#700) Attempt to handle decompression error on some broken PDF files (pdfminer#637)
- Loading branch information
Showing
72 changed files
with
13,613 additions
and
7,776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = | ||
# See https://github.com/PyCQA/pycodestyle/issues/373 | ||
E203, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
**Pull request** | ||
|
||
Thanks for improving pdfminer.six! Please include the following information to | ||
help us discuss and merge this PR: | ||
|
||
- A description of why this PR is needed. What does it fix? What does it | ||
improve? | ||
- A summary of the things that this PR changes. | ||
- Reference the issues that this PR fixes (use the fixes #(issue nr) syntax). | ||
If this PR does not fix any issue, create the issue first and mention that | ||
you are willing to work on it. | ||
Please remove this paragraph and replace it with a description of your PR. | ||
Also include links to the issues that it fixes. | ||
|
||
**How Has This Been Tested?** | ||
|
||
Please describe the tests that you ran to verify your changes. Provide | ||
instructions so we can reproduce. Include an example pdf if you have one. | ||
Please repalce this paragraph with a description of how this PR has been | ||
tested. Include the necessary instructions and files such that other can | ||
reproduce it. | ||
|
||
**Checklist** | ||
|
||
- [ ] I have formatted my code with [black](https://github.com/psf/black). | ||
- [ ] I have added tests that prove my fix is effective or that my feature | ||
works | ||
- [ ] I have added docstrings to newly created methods and classes | ||
- [ ] I have optimized the code at least one time after creating the initial | ||
version | ||
- [ ] I have updated the [README.md](../README.md) or I am verified that this | ||
- [ ] I have updated the [README.md](../README.md) or verified that this | ||
is not necessary | ||
- [ ] I have updated the [readthedocs](../docs/source) documentation or I | ||
- [ ] I have updated the [readthedocs](../docs/source) documentation or | ||
verified that this is not necessary | ||
- [ ] I have added a consice human-readable description of the change to | ||
- [ ] I have added a concise human-readable description of the change to | ||
[CHANGELOG.md](../CHANGELOG.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Continuous integration | ||
|
||
on: | ||
push: # run when commits are added to master or develop | ||
branches: | ||
- master | ||
- develop | ||
pull_request: # run on pr's against master or develop | ||
branches: | ||
- master | ||
- develop | ||
|
||
env: | ||
default-python: "3.10" | ||
|
||
jobs: | ||
|
||
check-code-formatting: | ||
name: Check code formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Check code formatting | ||
uses: psf/black@stable | ||
|
||
check-coding-style: | ||
name: Check coding style | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ env.default-python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.default-python }} | ||
- name: Upgrade pip, Install nox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install nox | ||
- name: Check coding style | ||
run: | | ||
nox --error-on-missing-interpreters --non-interactive --session lint | ||
check-static-types: | ||
name: Check static types | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ env.default-python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.default-python }} | ||
- name: Upgrade pip, Install nox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install nox | ||
- name: Check static types | ||
run: | | ||
nox --error-on-missing-interpreters --non-interactive --session types | ||
tests: | ||
name: Run tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Determine pip cache directory | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Cache pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip${{ matrix.python-version }} | ||
- name: Upgrade pip and install nox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install nox | ||
- name: Run tests | ||
run: | | ||
nox --non-interactive --session tests-${{ matrix.python-version }} | ||
build-docs: | ||
name: Test building docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ env.default-python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.default-python }} | ||
- name: Upgrade pip and install nox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install nox | ||
- name: Build docs | ||
run: | | ||
nox --error-on-missing-interpreters --non-interactive --session docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ tests/*.xml | |
tests/*.txt | ||
.idea/ | ||
.tox/ | ||
.nox/ | ||
|
||
# python venv management tools | ||
Pipfile | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import nox | ||
|
||
|
||
PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
|
||
|
||
@nox.session | ||
def lint(session): | ||
session.install("flake8") | ||
session.run("flake8", "pdfminer/", "tools/", "tests/", "--count", "--statistics") | ||
|
||
|
||
@nox.session | ||
def types(session): | ||
session.install("mypy") | ||
session.run( | ||
"mypy", "--install-types", "--non-interactive", "--show-error-codes", "." | ||
) | ||
|
||
|
||
@nox.session(python=PYTHON_ALL_VERSIONS) | ||
def tests(session): | ||
session.install("-e", ".[dev]") | ||
session.run("pytest") | ||
|
||
|
||
@nox.session | ||
def docs(session): | ||
session.install("-e", ".[docs]") | ||
session.run( | ||
"python", "-m", "sphinx", "-b", "html", "docs/source", "docs/build/html" | ||
) | ||
session.run( | ||
"python", "-m", "sphinx", "-b", "doctest", "docs/source", "docs/build/doctest" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '20211125' | ||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
print(__version__) |
Oops, something went wrong.