Skip to content

Commit

Permalink
Exclude test files from the package (#657)
Browse files Browse the repository at this point in the history
* Define dependencies for development

* Create tests directory

* Replace `[full]` with `[dev]`

* Move dev dependencies from screwdriver.yaml to setup.py

* Update test commands
  • Loading branch information
rejasupotaro committed Jan 16, 2024
1 parent df81a8b commit bb3ed19
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 21 deletions.
32 changes: 13 additions & 19 deletions screwdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,17 @@ jobs:
dnf install -y python38-pip
dnf install -y --enablerepo=powertools pandoc
python3 -m pip install --upgrade pip
python3 -m pip install pytest notebook nbconvert requests_mock
python3 -m pip install -e .[full]
python3 -m pip install -e .[dev]
python3 -m pip install -r docs/sphinx/source/requirements.txt
python3 -m pip install -r docs/sphinx/source/notebook_requirements.txt
- run-doc-linkcheck: |
sphinx-build -E -D exclude_patterns=getting-started-pyvespa-cloud.ipynb -b linkcheck docs/sphinx/source docs/sphinx/build
sphinx-build -E -D exclude_patterns=getting-started-pyvespa-cloud.ipynb docs/sphinx/source docs/sphinx/build
rm -fr docs/sphinx/build
- run-doc-tests: |
pytest vespa --doctest-modules --ignore-glob=vespa/test_*.py
pytest vespa --doctest-modules
- run-unit-tests: |
pytest vespa --ignore-glob=vespa/test_integration*.py
pytest tests/unit
integration-except-cloud:
requires: [~commit,~pr]
Expand All @@ -67,10 +66,9 @@ jobs:
- install-python: |
dnf install -y python38-pip
python3 -m pip install --upgrade pip
python3 -m pip install pytest
python3 -m pip install -e .[full]
python3 -m pip install -e .[dev]
- run-integration-docker: |
pytest vespa/test_integration_docker.py -s -v
pytest tests/integration/test_integration_docker.py -s -v
notebooks-except-cloud:
requires: [~commit,~pr]
Expand All @@ -96,7 +94,7 @@ jobs:
- install-python: |
dnf install -y python38-pip
python3 -m pip install --upgrade pip
python3 -m pip install -e .[full]
python3 -m pip install -e .[dev]
python3 -m pip install -r docs/sphinx/source/requirements.txt
python3 -m pip install -r docs/sphinx/source/notebook_requirements.txt
- install-vespa-cli: |
Expand Down Expand Up @@ -141,10 +139,9 @@ jobs:
- install-python: |
dnf install -y python38-pip
python3 -m pip install --upgrade pip
python3 -m pip install pytest
python3 -m pip install -e .[full]
python3 -m pip install -e .[dev]
- run-integration-cloud: |
pytest vespa/test_integration_vespa_cloud.py -s -v
pytest tests/integration/test_integration_vespa_cloud.py -s -v
integration-cloud-token:
requires: [~commit]
Expand All @@ -165,10 +162,9 @@ jobs:
- install-python: |
dnf install -y python38-pip
python3 -m pip install --upgrade pip
python3 -m pip install pytest
python3 -m pip install -e .[full]
python3 -m pip install -e .[dev]
- run-integration-cloud: |
pytest vespa/test_integration_vespa_cloud_token.py -s -v
pytest tests/integration/test_integration_vespa_cloud_token.py -s -v
integration-cloud-vector-search:
requires: [~commit]
Expand All @@ -189,10 +185,9 @@ jobs:
- install-python: |
dnf install -y python38-pip
python3 -m pip install --upgrade pip
python3 -m pip install pytest datasets
python3 -m pip install -e .[full]
python3 -m pip install -e .[dev]
- run-integration-cloud: |
pytest vespa/test_integration_vespa_cloud_vector_search.py -s -v
pytest tests/integration/test_integration_vespa_cloud_vector_search.py -s -v
notebooks-cloud:
requires: [integration-cloud]
Expand All @@ -212,8 +207,7 @@ jobs:
- install-python: |
dnf install -y python38-pip
python3 -m pip install --upgrade pip
python3 -m pip install pytest notebook nbconvert runnb
python3 -m pip install -e .[full]
python3 -m pip install -e .[dev]
python3 -m pip install -r docs/sphinx/source/requirements.txt
python3 -m pip install -r docs/sphinx/source/notebook_requirements.txt
- install-vespa-cli: |
Expand Down
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ def get_target_version():
"tenacity",
"typing_extensions",
],
extras_require={
"dev": [
"pytest",
"requests-mock",
"datasets",
"notebook",
"nbconvert",
"runnb",
],
},
python_requires=">=3.8",
zip_safe=False,
package_data={"vespa": ["py.typed"]},
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from cryptography.hazmat.primitives import serialization
from vespa.application import Vespa
from vespa.deployment import VespaCloud
from vespa.test_integration_docker import (
from test_integration_docker import (
TestApplicationCommon,
create_msmarco_application_package,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from vespa.application import Vespa
from vespa.package import AuthClient, Parameter
from vespa.deployment import VespaCloud
from vespa.test_integration_docker import (
from test_integration_docker import (
TestApplicationCommon,
create_msmarco_application_package,
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bb3ed19

Please sign in to comment.