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

chore: do not include tests and examples in the package #529

Merged
merged 4 commits into from
Jan 10, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/usage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
python ./repo/src/volue/mesh/examples/get_version.py
if ($LASTEXITCODE) { exit $LASTEXITCODE }
python -m pip install pytest pytest-asyncio==0.21.2 pandas
python -m pytest --pyargs volue.mesh.tests -m "not authentication and not long"
python -m pytest ./repo/src/volue/mesh/tests -m "not authentication and not long"

- name: Install Ubuntu 22.04 (wsl1)
uses: Vampire/setup-wsl@v1
Expand All @@ -75,4 +75,4 @@ jobs:
python${{ matrix.python-version }} -m pip install git+https://github.com/Volue-Public/energy-mesh-python@${{ github.ref }}
python${{ matrix.python-version }} ./repo/src/volue/mesh/examples/get_version.py
python${{ matrix.python-version }} -m pip install pytest pytest-asyncio==0.21.2 pandas
python${{ matrix.python-version }} -m pytest --pyargs volue.mesh.tests -m "not authentication and not long"
python${{ matrix.python-version }} -m pytest ./repo/src/volue/mesh/tests -m "not authentication and not long"
2 changes: 1 addition & 1 deletion docs/source/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ New features
Changes
~~~~~~~~~~~~~~~~~~

- TBA
- Do not include tests and examples in the `volue.mesh` package. :pull:`529`

Install instructions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ include = [
{ path = "src/volue/mesh/proto/type/resources_pb2.py", format = ["sdist", "wheel"] },
{ path = "src/volue/mesh/proto/type/resources_pb2_grpc.py", format = ["sdist", "wheel"] }
]
exclude = [
"src/volue/mesh/examples/**",
"src/volue/mesh/tests/**",
]

[tool.poetry.dependencies]
python = ">=3.9, <3.13"
Expand All @@ -50,7 +54,7 @@ python-dateutil = "^2.8.2"
# https://bugzilla.mozilla.org/show_bug.cgi?id=1857492
six = "^1.16.0"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
grpcio-tools = ">=1.37.0, <=1.66.1"
Sphinx = ">=5.0.2"
sphinx-rtd-theme = "^0.5.2"
Expand Down
3 changes: 2 additions & 1 deletion src/volue/mesh/tests/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from dateutil import tz

from volue.mesh import AttributeBase, Timeseries, TimeseriesAttribute
from volue.mesh.tests.test_utilities.utilities import CHIMNEY_1_ID, CHIMNEY_2_ID

from .test_utilities.utilities import CHIMNEY_1_ID, CHIMNEY_2_ID

ATTRIBUTE_PATH_PREFIX = "Model/SimpleThermalTestModel/ThermalComponent.ThermalPowerToPlantRef/SomePowerPlant1."

Expand Down
6 changes: 2 additions & 4 deletions src/volue/mesh/tests/test_mesh_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
import pytest

from volue.mesh import Timeseries, _common, _mesh_id
from volue.mesh.tests.test_utilities.utilities import (
AttributeForTesting,
ObjectForTesting,
)

from .test_utilities.utilities import AttributeForTesting, ObjectForTesting


@pytest.mark.unittest
Expand Down
6 changes: 2 additions & 4 deletions src/volue/mesh/tests/test_mesh_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
Object,
OwnershipRelationAttribute,
)
from volue.mesh.tests.test_utilities.utilities import (
AttributeForTesting,
ObjectForTesting,
)

from .test_utilities.utilities import AttributeForTesting, ObjectForTesting

OBJECT_PATH = "Model/SimpleThermalTestModel/ThermalComponent.ThermalPowerToPlantRef/SomePowerPlant1"
OBJECT_ID = uuid.UUID("0000000A-0001-0000-0000-000000000000")
Expand Down
3 changes: 2 additions & 1 deletion src/volue/mesh/tests/test_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from dateutil import tz

from volue.mesh import LinkRelationVersion
from volue.mesh.tests.test_utilities.utilities import CHIMNEY_1_ID, CHIMNEY_2_ID

from .test_utilities.utilities import CHIMNEY_1_ID, CHIMNEY_2_ID

ONE_TO_ONE_LINK_RELATION_ATTRIBUTE_NAME = "SimpleReference"
ONE_TO_MANY_LINK_RELATION_ATTRIBUTE_NAME = "PlantToChimneyRefCollection"
Expand Down
Loading