Skip to content

Commit 835b717

Browse files
committed
DEP: Remove Scripts, Resources, Tests, Sample_Code (py-pdf#845)
* All of them are removed from the package distributions * Scripts is additionally moved to the cpdf project * Sample_Code is moved to the docs
1 parent 4b069dd commit 835b717

Some content is hidden

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

55 files changed

+44
-269
lines changed

.github/workflows/benchmark.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
pip install .
3131
- name: Run benchmark
3232
run: |
33-
pytest Tests/bench.py --benchmark-json output.json
33+
pytest tests/bench.py --benchmark-json output.json
3434
- name: Store benchmark result
3535
uses: benchmark-action/github-action-benchmark@v1
3636
with:

.github/workflows/github-ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646
flake8 . --ignore=E203,W503,W504,E,F403,F405 --exclude build,sample-files
4747
- name: Test with pytest
4848
run: |
49-
python -m coverage run --parallel-mode -m pytest Tests -vv
49+
python -m coverage run --parallel-mode -m pytest tests -vv
5050
if: matrix.python-version != '3.10.1'
5151
- name: Test with pytest (OO flag)
5252
run: |
53-
python -OO -m coverage run --parallel-mode -m pytest Tests -vv
53+
python -OO -m coverage run --parallel-mode -m pytest tests -vv
5454
if: matrix.python-version == '3.10.1'
5555
- name: Upload coverage data
5656
uses: actions/upload-artifact@v3

CHANGELOG

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ Deprecations (DEP):
2121
- `PyPDF2.pdf` (the `pdf` module) no longer exists. The contents were moved with
2222
the library. You should most likely import directly from `PyPDF2` instead.
2323
The `RectangleObject` is in `PyPDF2.generic`.
24+
- The `Resources`, `Scripts`, and `Tests` will no longer be part of the distribution
25+
files on PyPI. This should have little to no impact on most people. The
26+
`Tests` are renamed to `tests`, the `Resources` are renamed to `resources`.
27+
Both are still in the git repository. The `Scripts` are now in
28+
https://github.com/py-pdf/cpdf. `Sample_Code` was moved to the `docs`.
2429

2530
Version 1.27.12, 2022-05-02
2631
---------------------------

MANIFEST.in

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
include CHANGELOG
22
include LICENSE
3-
recursive-include Resources *
4-
recursive-include Scripts *
5-
recursive-include Tests *

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ upload:
1414
clean:
1515
python setup.py clean --all
1616
pyclean .
17-
rm -rf Tests/__pycache__ PyPDF2/__pycache__ Image9.png htmlcov docs/_build dist dont_commit_merged.pdf dont_commit_writer.pdf PyPDF2.egg-info PyPDF2_pdfLocation.txt .pytest_cache .mypy_cache .benchmarks
17+
rm -rf tests/__pycache__ PyPDF2/__pycache__ Image9.png htmlcov docs/_build dist dont_commit_merged.pdf dont_commit_writer.pdf PyPDF2.egg-info PyPDF2_pdfLocation.txt .pytest_cache .mypy_cache .benchmarks
1818

1919
test:
20-
pytest Tests --cov --cov-report term-missing -vv --cov-report html --durations=3 --timeout=30
20+
pytest tests --cov --cov-report term-missing -vv --cov-report html --durations=3 --timeout=30
2121

2222
mutation-test:
2323
mutmut run
@@ -27,4 +27,4 @@ mutmut-results:
2727
junit2html mutmut-results.xml mutmut-results.html
2828

2929
benchmark:
30-
pytest Tests/bench.py
30+
pytest tests/bench.py

README.md

+21-14

Sample_Code/hierarchical_toc.md

-3
This file was deleted.

Scripts/2-up.py

-36
This file was deleted.

Scripts/booklet.py

-73
This file was deleted.

Scripts/pdf-image-extractor.py

-41
This file was deleted.

Scripts/pdfcat

-81
This file was deleted.

docs/dev/intro.md

+1-1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Tests/bench.py tests/bench.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
88
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)
9-
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "Resources")
9+
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "resources")
1010

1111

1212
def page_ops(pdf_path, password):

Tests/test_basic_features.py tests/test_basic_features.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
1010
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)
11-
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "Resources")
11+
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "resources")
1212

1313

1414
def test_basic_features():
File renamed without changes.
File renamed without changes.
File renamed without changes.

Tests/test_javascript.py tests/test_javascript.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Configure path environment
88
TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
99
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)
10-
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "Resources")
10+
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "resources")
1111

1212

1313
@pytest.fixture()

Tests/test_merger.py tests/test_merger.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
88
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)
9-
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "Resources")
9+
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "resources")
1010

1111
sys.path.append(PROJECT_ROOT)
1212

Tests/test_page.py tests/test_page.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
1010
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)
11-
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "Resources")
11+
RESOURCE_ROOT = os.path.join(PROJECT_ROOT, "resources")
1212
EXTERNAL_ROOT = os.path.join(PROJECT_ROOT, "sample-files")
1313

1414

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)