Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework dependencies specification by using setup.py extras #119

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ on:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.10']
python-version: ['3.10', '3.12']

steps:
- uses: actions/checkout@v2
Expand All @@ -24,12 +23,13 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel flake8 twine
python setup.py develop
pip install -e .[test,lint]
- name: lint
run: |
python -m flake8
- name: tests
run: |
python setup.py test
pytest -v tests
# Test the build and run twine to check we are pypi compatible
- name: check build
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx
sphinx==7.2.6
sphinx-rtd-theme
sphinx-autobuild
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()

lint_deps = ["flake8"]
test_deps = ["pytest==7.1", "responses==0.22", "httpretty"]

setup(
name="picterra",
version="1.2.2",
Expand All @@ -15,14 +18,13 @@
long_description_content_type="text/markdown",
package_dir={"": "src"},
packages=find_packages("src"),
setup_requires=[
"pytest-runner",
"flake8",
],
install_requires=[
"requests",
# We use the new `allowed_methods` option
"urllib3>=1.26.0",
],
tests_require=["pytest==7.1", "flake8", "responses==0.22", "httpretty"],
extras_require={
'test': test_deps,
'lint': lint_deps,
}
)
Loading