Skip to content

Commit

Permalink
Move to src directory (#6506)
Browse files Browse the repository at this point in the history
  • Loading branch information
nateprewitt committed Aug 13, 2023
1 parent e9fa2e2 commit d63e94f
Show file tree
Hide file tree
Showing 22 changed files with 11 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
.PHONY: docs
init:
pip install -r requirements-dev.txt
python -m pip install -r requirements-dev.txt
test:
# This runs all of the tests on all supported Python versions.
tox -p
ci:
pytest tests --junitxml=report.xml
python -m pytest tests --junitxml=report.xml

test-readme:
python setup.py check --restructuredtext --strict && ([ $$? -eq 0 ] && echo "README.rst and HISTORY.rst ok") || echo "Invalid markup in README.rst or HISTORY.rst!"

flake8:
flake8 --ignore=E501,F401,E128,E402,E731,F821 requests
python -m flake8 src/requests

coverage:
pytest --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests
python -m pytest --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=src/requests tests

publish:
pip install 'twine>=1.5.0'
python -m pip install 'twine>=1.5.0'
python setup.py sdist bdist_wheel
twine upload dist/*
rm -fr build dist .egg requests.egg-info
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
[tool.isort]
profile = "black"
src_paths = ["requests", "test"]
src_paths = ["src/requests", "test"]
honor_noqa = true

[tool.pytest.ini_options]
addopts = "--doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
minversion = "6.2"
testpaths = [
"requests",
"tests",
]
testpaths = ["tests"]
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ requires-dist =
[flake8]
ignore = E203, E501, W503
per-file-ignores =
requests/__init__.py:E402, F401
requests/compat.py:E402, F401
src/requests/__init__.py:E402, F401
src/requests/compat.py:E402, F401
tests/compat.py:F401
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def run_tests(self):

about = {}
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "requests", "__version__.py"), "r", "utf-8") as f:
with open(os.path.join(here, "src", "requests", "__version__.py"), "r", "utf-8") as f:
exec(f.read(), about)

with open("README.md", "r", "utf-8") as f:
Expand All @@ -92,7 +92,7 @@ def run_tests(self):
url=about["__url__"],
packages=["requests"],
package_data={"": ["LICENSE", "NOTICE"]},
package_dir={"requests": "requests"},
package_dir={"": "src"},
include_package_data=True,
python_requires=">=3.7",
install_requires=requires,
Expand Down
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.

0 comments on commit d63e94f

Please sign in to comment.