diff options
author | Bert JW Regeer <xistence@0x58.com> | 2022-05-15 20:16:25 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 20:16:25 -0600 |
commit | ac91794dfb7617b473c9d06d04900debfcdf585e (patch) | |
tree | de311f1e71d5306a9499e230a9537c2a530cc66f | |
parent | ee1d364dabd544fe4bf355b2c6578e4237b03992 (diff) | |
parent | d73a3389898cb18f5def996c252c494e6ad1966a (diff) | |
download | pastedeploy-git-ac91794dfb7617b473c9d06d04900debfcdf585e.tar.gz |
Merge pull request #35 from Pylons/src-folder
-rw-r--r-- | .coveragerc | 13 | ||||
-rw-r--r-- | .github/workflows/ci-tests.yml | 24 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | MANIFEST.in | 15 | ||||
-rw-r--r-- | docs/news.rst | 5 | ||||
-rw-r--r-- | pytest.ini | 5 | ||||
-rw-r--r-- | setup.cfg | 13 | ||||
-rw-r--r-- | src/paste/__init__.py (renamed from paste/__init__.py) | 0 | ||||
-rw-r--r-- | src/paste/deploy/__init__.py (renamed from paste/deploy/__init__.py) | 0 | ||||
-rw-r--r-- | src/paste/deploy/config.py (renamed from paste/deploy/config.py) | 0 | ||||
-rw-r--r-- | src/paste/deploy/converters.py (renamed from paste/deploy/converters.py) | 0 | ||||
-rw-r--r-- | src/paste/deploy/loadwsgi.py (renamed from paste/deploy/loadwsgi.py) | 0 | ||||
-rw-r--r-- | src/paste/deploy/paster_templates.py (renamed from paste/deploy/paster_templates.py) | 0 | ||||
-rw-r--r-- | src/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl (renamed from paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl) | 0 | ||||
-rw-r--r-- | src/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl (renamed from paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl) | 0 | ||||
-rw-r--r-- | src/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl (renamed from paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl) | 0 | ||||
-rw-r--r-- | src/paste/deploy/util.py (renamed from paste/deploy/util.py) | 0 | ||||
-rw-r--r-- | tox.ini | 57 |
18 files changed, 108 insertions, 27 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..1dec06f --- /dev/null +++ b/.coveragerc @@ -0,0 +1,13 @@ +[run] +source = + paste.deploy + +[paths] +source = + paste/deploy + */paste/deploy + */site-packages/paste/deploy + +[report] +show_missing = true +precision = 2 diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 92231fe..7ada44c 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -70,15 +70,15 @@ jobs: architecture: x64 - run: pip install tox - run: tox -e docs - # lint: - # runs-on: ubuntu-latest - # name: Lint the package - # steps: - # - uses: actions/checkout@v2 - # - name: Setup python - # uses: actions/setup-python@v2 - # with: - # python-version: "3.10" - # architecture: x64 - # - run: pip install tox - # - run: tox -e lint + lint: + runs-on: ubuntu-latest + name: Lint the package + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + architecture: x64 + - run: pip install tox + - run: tox -e lint @@ -1,7 +1,8 @@ .coverage +.coverage.* .tox *.pyc -PasteDeploy.egg-info +src/PasteDeploy.egg-info coverage.xml htmlcov .eggs diff --git a/MANIFEST.in b/MANIFEST.in index 938fb5c..1108a6c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,14 +1,21 @@ -graft .github +graft src/paste graft tests -graft paste/deploy/paster_templates +graft docs +graft .github -include docs/*.txt +include setup.cfg +include README.rst +include contributing.md include license.txt +include .coveragerc include pytest.ini include tox.ini include rtd.txt include pyproject.toml -include contributing.md + +prune docs/_build +prune docs/_themes +prune tests/fake_packages/FakeApp.egg/EGG-INFO global-exclude __pycache__ *.py[cod] global-exclude .DS_Store diff --git a/docs/news.rst b/docs/news.rst index b827317..05d8f9f 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -6,6 +6,11 @@ unreleased * Drop support for Python 2, as well as 3.4, 3.5, and 3.6. +* Fix a broken compatibility shim that would cause the ConfigParser to fail + on Python 3.12 when ``ConfigParser.readfp`` is removed. + +* Refactor repository into a src folder layout. + 2.1.1 (2020-10-12) ------------------ @@ -1,2 +1,5 @@ [pytest] -testpaths = tests +python_files = test_*.py +testpaths = + tests +addopts = -W always --cov @@ -39,6 +39,8 @@ project_urls = Issue Tracker = https://github.com/Pylons/pastedeploy/issues [options] +package_dir = + =src packages = find: zip_safe = False install_requires = @@ -48,8 +50,7 @@ namespace_packages = paste [options.packages.find] -exclude = - tests +where = src [options.extras_require] config = @@ -58,6 +59,10 @@ paste = docs = Sphinx >= 1.7.5 pylons-sphinx-themes +testing = + Paste + pytest + pytest-cov [options.entry_points] paste.filter_app_factory = @@ -66,3 +71,7 @@ paste.filter_app_factory = paste.paster_create_template = paste_deploy = paste.deploy.paster_templates:PasteDeploy + +[check-manifest] +ignore-bad-ideas = + tests/fake_packages/** diff --git a/paste/__init__.py b/src/paste/__init__.py index cdb6121..cdb6121 100644 --- a/paste/__init__.py +++ b/src/paste/__init__.py diff --git a/paste/deploy/__init__.py b/src/paste/deploy/__init__.py index 94c63a8..94c63a8 100644 --- a/paste/deploy/__init__.py +++ b/src/paste/deploy/__init__.py diff --git a/paste/deploy/config.py b/src/paste/deploy/config.py index f448350..f448350 100644 --- a/paste/deploy/config.py +++ b/src/paste/deploy/config.py diff --git a/paste/deploy/converters.py b/src/paste/deploy/converters.py index 30a3290..30a3290 100644 --- a/paste/deploy/converters.py +++ b/src/paste/deploy/converters.py diff --git a/paste/deploy/loadwsgi.py b/src/paste/deploy/loadwsgi.py index c5471e5..c5471e5 100644 --- a/paste/deploy/loadwsgi.py +++ b/src/paste/deploy/loadwsgi.py diff --git a/paste/deploy/paster_templates.py b/src/paste/deploy/paster_templates.py index edfa97a..edfa97a 100644 --- a/paste/deploy/paster_templates.py +++ b/src/paste/deploy/paster_templates.py diff --git a/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl b/src/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl index 5514cfc..5514cfc 100644 --- a/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl +++ b/src/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl diff --git a/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl b/src/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl index 5684c31..5684c31 100644 --- a/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl +++ b/src/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl diff --git a/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl b/src/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl index 0c0ae35..0c0ae35 100644 --- a/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl +++ b/src/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl diff --git a/paste/deploy/util.py b/src/paste/deploy/util.py index d30466a..d30466a 100644 --- a/paste/deploy/util.py +++ b/src/paste/deploy/util.py @@ -1,20 +1,63 @@ [tox] envlist = py37,py38,py39,py310,pypy3, + coverage, docs +isolated_build = True [testenv] -deps = - # Paste works on Python 3 since Paste 2.0 - Paste - pytest - pytest-cov commands = - py.test --cov=paste/deploy --cov-report=xml --cov-report=html --cov-report=term-missing {posargs} + python --version + pytest {posargs:} +extras = + testing +setenv = + COVERAGE_FILE=.coverage.{envname} + +[testenv:coverage] +commands = + coverage combine + coverage xml + coverage report --fail-under=100 +deps = + coverage +setenv = + COVERAGE_FILE=.coverage [testenv:docs] whitelist_externals = make commands = - make -C docs html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E" + make -C docs html epub BUILDDIR={envdir} extras = docs + +[testenv:lint] +skip_install = True +commands = + check-manifest + # build sdist/wheel + python -m build . + twine check dist/* +deps = + build + check-manifest + readme_renderer + twine + +[testenv:build] +skip_install = True +commands = + # clean up build/ and dist/ folders + python -c 'import shutil; shutil.rmtree("build", ignore_errors=True)' + # Make sure we aren't forgetting anything + check-manifest + # build sdist/wheel + python -m build . + # Verify all is well + twine check dist/* + +deps = + build + check-manifest + readme_renderer + twine |