From c5c191f1d7499fc057cf609c14b99dd5d18efa7c Mon Sep 17 00:00:00 2001 From: Deniz Saner Date: Mon, 29 Jan 2024 12:07:23 +0100 Subject: [PATCH] Rename Appliance to Machine (#37) --- docs/api_clients/production_runs/models.rst | 2 +- docs/api_clients/timeseries/models.rst | 2 +- docs/concepts.rst | 32 ++++---- docs/models.rst | 2 +- src/enlyze/__init__.py | 4 +- .../api_clients/production_runs/models.py | 8 +- src/enlyze/api_clients/timeseries/models.py | 10 +-- src/enlyze/client.py | 74 +++++++++-------- src/enlyze/models.py | 28 +++---- src/enlyze/validators.py | 8 +- tests/enlyze/test_client.py | 79 ++++++++++--------- tests/enlyze/test_validators.py | 8 +- 12 files changed, 127 insertions(+), 130 deletions(-) diff --git a/docs/api_clients/production_runs/models.rst b/docs/api_clients/production_runs/models.rst index 73188d9..03581d4 100644 --- a/docs/api_clients/production_runs/models.rst +++ b/docs/api_clients/production_runs/models.rst @@ -11,7 +11,7 @@ Models :exclude-members: model_config, model_fields :show-inheritance: -.. autoclass:: Appliance() +.. autoclass:: Machine() :members: :undoc-members: :exclude-members: model_config, model_fields diff --git a/docs/api_clients/timeseries/models.rst b/docs/api_clients/timeseries/models.rst index 19d57ee..dd03852 100644 --- a/docs/api_clients/timeseries/models.rst +++ b/docs/api_clients/timeseries/models.rst @@ -11,7 +11,7 @@ Models :exclude-members: model_config, model_fields :show-inheritance: -.. autoclass:: Appliance() +.. autoclass:: Machine() :members: :undoc-members: :exclude-members: model_config, model_fields diff --git a/docs/concepts.rst b/docs/concepts.rst index 9f9b54f..5e2c6c4 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -13,15 +13,15 @@ The concept of a *site* refers to a physical production site. Depending on its s your organization might have one or many of them. In the ENLYZE platform, each site has a name and an address, which makes it easy to identify for humans. -.. _appliance: +.. _machine: -Appliance +Machine --------- -An *appliance* refers to a machine that your organization uses to produce goods. For +A *machine* refers to a machine that your organization uses to produce goods. For example, a CNC-milling center, a blown film extrusion line or an injection molding -machine all represent an appliance in the ENLYZE platform. Just as a physical machine is -located at one production site, an appliance in the ENLYZE platform is associated with +machine all represent a machine in the ENLYZE platform. Just as a physical machine is +located at one production site, a machine in the ENLYZE platform is associated with exactly one :ref:`site `. .. _variable: @@ -29,9 +29,9 @@ exactly one :ref:`site `. Variable -------- -A *variable* represents a process measure of one :ref:`appliance ` of which -timeseries data is captured and stored in the ENLYZE platform. One appliance may have -many variables, whereas one variable is only associated with one appliance. +A *variable* represents a process measure of one :ref:`machine ` of which +timeseries data is captured and stored in the ENLYZE platform. One machine may have +many variables, whereas one variable is only associated with one machine. .. _production_order: @@ -45,7 +45,7 @@ MES and then synchronized into the ENLYZE platform. They are referenced by an id which oftentimes is a short combination of numbers and/or characters, like FA23000123. In the ENLYZE platform, a production order always encompasses the production of one -single :ref:`product ` on one single :ref:`appliance ` within one +single :ref:`product ` on one single :ref:`machine ` within one or more :ref:`production runs `. .. _production_run: @@ -54,15 +54,15 @@ Production Run -------------- A *production run* is a time frame within which a machine was producing a :ref:`product -` on an :ref:`appliance ` in order to complete a :ref:`production +` on a :ref:`machine ` in order to complete a :ref:`production order `. A production run always has a beginning and, if it's not still running, it also has an end. -Usually, the operator of the appliance uses an interface to log the time when a certain -production order has been worked on. For instance, this could be the appliance's HMI or +Usually, the operator of the machine uses an interface to log the time when a certain +production order has been worked on. For instance, this could be the machine's HMI or a tablet computer next to it. In German, this is often referred to as *Betriebsdatenerfassung* (BDE). It is common, that a production order is not completed in one go, but is interrupted -several times for very different reasons, like a breakdown of the appliance or a +several times for very different reasons, like a breakdown of the machine or a public holiday. These interruptions lead to the creation of multiple production runs for a single production order. @@ -71,9 +71,9 @@ for a single production order. Product ------- -A *product* is the output of the production process which is executed by an -:ref:`appliance `, driven by a :ref:`production order `. In -the real world, an appliance might have some additional outputs, but only the main +A *product* is the output of the production process which is executed by a +:ref:`machine `, driven by a :ref:`production order `. In +the real world, a machine might have some additional outputs, but only the main output (the product) is modeled in the ENLYZE platform. Similarly to the production order, a product is referenced by an identifier originating from a customer's system, that gets synchronized into the ENLYZE platform. diff --git a/docs/models.rst b/docs/models.rst index 566c64c..3a2a9cb 100644 --- a/docs/models.rst +++ b/docs/models.rst @@ -8,7 +8,7 @@ Data models .. autoclass:: Site() :members: -.. autoclass:: Appliance() +.. autoclass:: Machine() :members: .. autoclass:: Variable() diff --git a/src/enlyze/__init__.py b/src/enlyze/__init__.py index 547a6ec..dd25043 100644 --- a/src/enlyze/__init__.py +++ b/src/enlyze/__init__.py @@ -1,9 +1,9 @@ from .client import EnlyzeClient from .errors import EnlyzeError, InvalidTokenError -from .models import Appliance, ResamplingMethod, Site, Variable +from .models import Machine, ResamplingMethod, Site, Variable __all__ = [ - "Appliance", + "Machine", "EnlyzeClient", "EnlyzeError", "InvalidTokenError", diff --git a/src/enlyze/api_clients/production_runs/models.py b/src/enlyze/api_clients/production_runs/models.py index 192c2d3..5129764 100644 --- a/src/enlyze/api_clients/production_runs/models.py +++ b/src/enlyze/api_clients/production_runs/models.py @@ -59,14 +59,14 @@ def to_user_model(self) -> user_models.Quantity: ) -class Appliance(ApiBaseModel): +class Machine(ApiBaseModel): name: str uuid: UUID class ProductionRun(ProductionRunsApiModel): uuid: UUID - appliance: Appliance + machine: Machine average_throughput: Optional[float] production_order: str product: Product @@ -81,7 +81,7 @@ class ProductionRun(ProductionRunsApiModel): productivity: Optional[OEEComponent] def to_user_model( - self, appliances_by_uuid: dict[UUID, user_models.Appliance] + self, machines_by_uuid: dict[UUID, user_models.Machine] ) -> user_models.ProductionRun: """Convert into a :ref:`user model `""" @@ -101,7 +101,7 @@ def to_user_model( return user_models.ProductionRun( uuid=self.uuid, - appliance=appliances_by_uuid[self.appliance.uuid], + machine=machines_by_uuid[self.machine.uuid], average_throughput=self.average_throughput, production_order=self.production_order, product=self.product.to_user_model(), diff --git a/src/enlyze/api_clients/timeseries/models.py b/src/enlyze/api_clients/timeseries/models.py index 5f84820..1347bd0 100644 --- a/src/enlyze/api_clients/timeseries/models.py +++ b/src/enlyze/api_clients/timeseries/models.py @@ -32,16 +32,16 @@ def to_user_model(self) -> user_models.Site: ) -class Appliance(TimeseriesApiModel): +class Machine(TimeseriesApiModel): uuid: UUID name: str genesis_date: date site: int - def to_user_model(self, site: user_models.Site) -> user_models.Appliance: + def to_user_model(self, site: user_models.Site) -> user_models.Machine: """Convert into a :ref:`user model `""" - return user_models.Appliance( + return user_models.Machine( uuid=self.uuid, display_name=self.name, genesis_date=self.genesis_date, @@ -55,7 +55,7 @@ class Variable(TimeseriesApiModel): unit: Optional[str] data_type: user_models.VariableDataType - def to_user_model(self, appliance: user_models.Appliance) -> user_models.Variable: + def to_user_model(self, machine: user_models.Machine) -> user_models.Variable: """Convert into a :ref:`user model `.""" return user_models.Variable( @@ -63,7 +63,7 @@ def to_user_model(self, appliance: user_models.Appliance) -> user_models.Variabl display_name=self.display_name, unit=self.unit, data_type=self.data_type, - appliance=appliance, + machine=machine, ) diff --git a/src/enlyze/client.py b/src/enlyze/client.py index 1f07224..ce93707 100644 --- a/src/enlyze/client.py +++ b/src/enlyze/client.py @@ -82,27 +82,27 @@ def get_sites(self) -> list[user_models.Site]: """ return [site.to_user_model() for site in self._get_sites()] - def _get_appliances(self) -> Iterator[timeseries_api_models.Appliance]: - """Get all appliances from the API""" + def _get_machines(self) -> Iterator[timeseries_api_models.Machine]: + """Get all machines from the API""" return self._timeseries_api_client.get_paginated( - "appliances", timeseries_api_models.Appliance + "appliances", timeseries_api_models.Machine ) @cache - def get_appliances( + def get_machines( self, site: Optional[user_models.Site] = None - ) -> list[user_models.Appliance]: - """Retrieve all :ref:`appliances `, optionally filtered by site. + ) -> list[user_models.Machine]: + """Retrieve all :ref:`machines `, optionally filtered by site. - :param site: Only get appliances of this site. Gets all appliances of the + :param site: Only get machines of this site. Gets all machines of the organization if None. :raises: |token-error| :raises: |generic-error| - :returns: Appliances - :rtype: list[:class:`~enlyze.models.Appliance`] + :returns: Machines + :rtype: list[:class:`~enlyze.models.Machine`] """ @@ -111,43 +111,43 @@ def get_appliances( else: sites_by_id = {site._id: site for site in self.get_sites()} - appliances = [] - for appliance_api in self._get_appliances(): - site_ = sites_by_id.get(appliance_api.site) + machines = [] + for machine_api in self._get_machines(): + site_ = sites_by_id.get(machine_api.site) if not site_: continue - appliances.append(appliance_api.to_user_model(site_)) + machines.append(machine_api.to_user_model(site_)) - return appliances + return machines def _get_variables( - self, appliance_uuid: UUID + self, machine_uuid: UUID ) -> Iterator[timeseries_api_models.Variable]: - """Get variables for an appliance from the API.""" + """Get variables for a machine from the API.""" return self._timeseries_api_client.get_paginated( "variables", timeseries_api_models.Variable, - params={"appliance": str(appliance_uuid)}, + params={"appliance": str(machine_uuid)}, ) def get_variables( - self, appliance: user_models.Appliance + self, machine: user_models.Machine ) -> Sequence[user_models.Variable]: - """Retrieve all variables of an :ref:`appliance `. + """Retrieve all variables of a :ref:`machine `. - :param appliance: The appliance for which to get all variables. + :param machine: The machine for which to get all variables. :raises: |token-error| :raises: |generic-error| - :returns: Variables of ``appliance`` + :returns: Variables of ``machine`` """ return [ - variable.to_user_model(appliance) - for variable in self._get_variables(appliance.uuid) + variable.to_user_model(machine) + for variable in self._get_variables(machine.uuid) ] def get_timeseries( @@ -159,7 +159,7 @@ def get_timeseries( """Get timeseries data of :ref:`variables ` for a given time frame. Timeseries data for multiple variables can be requested at once. However, all - variables must belong to the same appliance. + variables must belong to the same machine. You should always pass :ref:`timezone-aware datetime ` objects to this method! If you don't, naive @@ -180,15 +180,13 @@ def get_timeseries( """ - start, end, appliance_uuid = validate_timeseries_arguments( - start, end, variables - ) + start, end, machine_uuid = validate_timeseries_arguments(start, end, variables) pages = self._timeseries_api_client.get_paginated( "timeseries", timeseries_api_models.TimeseriesData, params={ - "appliance": appliance_uuid, + "appliance": machine_uuid, "start_datetime": start.isoformat(), "end_datetime": end.isoformat(), "variables": ",".join(str(v.uuid) for v in variables), @@ -215,7 +213,7 @@ def get_timeseries_with_resampling( """Get resampled timeseries data of :ref:`variables ` for a given time frame. Timeseries data for multiple variables can be requested at once. However, all - variables must belong to the same appliance. + variables must belong to the same machine. You should always pass :ref:`timezone-aware datetime ` objects to this method! If you don't, naive @@ -257,7 +255,7 @@ def get_timeseries_with_resampling( resampling_method, variable.data_type ) - start, end, appliance_uuid = validate_timeseries_arguments( + start, end, machine_uuid = validate_timeseries_arguments( start, end, variables_sequence, @@ -268,7 +266,7 @@ def get_timeseries_with_resampling( "timeseries", timeseries_api_models.TimeseriesData, params={ - "appliance": appliance_uuid, + "appliance": machine_uuid, "start_datetime": start.isoformat(), "end_datetime": end.isoformat(), "variables": ",".join(variables_query_parameter_list), @@ -291,7 +289,7 @@ def _get_production_runs( *, production_order: Optional[str] = None, product: Optional[str] = None, - appliance: Optional[UUID] = None, + machine: Optional[UUID] = None, start: Optional[datetime] = None, end: Optional[datetime] = None, ) -> Iterator[ProductionRun]: @@ -300,7 +298,7 @@ def _get_production_runs( filters = { "production_order": production_order, "product": product, - "appliance": appliance, + "appliance": machine, "start": start.isoformat() if start else None, "end": end.isoformat() if end else None, } @@ -314,13 +312,13 @@ def get_production_runs( *, production_order: Optional[str] = None, product: Optional[user_models.Product | str] = None, - appliance: Optional[user_models.Appliance] = None, + machine: Optional[user_models.Machine] = None, start: Optional[datetime] = None, end: Optional[datetime] = None, ) -> user_models.ProductionRuns: """Retrieve optionally filtered list of :ref:`production runs `. - :param appliance: The appliance for which to get all production runs. + :param machine: The machine for which to get all production runs. :param product: Filter production runs by product. :param production_order: Filter production runs by production order. @@ -342,12 +340,12 @@ def get_production_runs( product_filter = ( product.code if isinstance(product, user_models.Product) else product ) - appliances_by_uuid = {a.uuid: a for a in self.get_appliances()} + machines_by_uuid = {a.uuid: a for a in self.get_machines()} return user_models.ProductionRuns( [ - production_run.to_user_model(appliances_by_uuid) + production_run.to_user_model(machines_by_uuid) for production_run in self._get_production_runs( - appliance=appliance.uuid if appliance else None, + machine=machine.uuid if machine else None, production_order=production_order, product=product_filter, start=start, diff --git a/src/enlyze/models.py b/src/enlyze/models.py index fa0b9d9..baa3b3e 100644 --- a/src/enlyze/models.py +++ b/src/enlyze/models.py @@ -26,23 +26,23 @@ class Site: @dataclass(frozen=True) -class Appliance: - """Representation of an :ref:`appliance ` in the ENLYZE platform. +class Machine: + """Representation of a :ref:`machine ` in the ENLYZE platform. - Contains details about the appliance. + Contains details about the machine. """ - #: Stable identifier of the appliance. + #: Stable identifier of the machine. uuid: UUID - #: Display name of the appliance. + #: Display name of the machine. display_name: str - #: The date when the appliance has been connected to the ENLYZE platform. + #: The date when the machine has been connected to the ENLYZE platform. genesis_date: date - #: The site where the appliance is located. + #: The site where the machine is located. site: Site @@ -99,8 +99,8 @@ class Variable: #: The underlying data type of the variable. data_type: VariableDataType - #: The appliance on which this variable is read out. - appliance: Appliance + #: The machine on which this variable is read out. + machine: Machine @dataclass(frozen=True) @@ -230,7 +230,7 @@ class Quantity: @dataclass(frozen=True) class Product: - """Representation of a product that is produced on an appliance""" + """Representation of a product that is produced on a machine""" #: The identifier of the product code: str @@ -250,8 +250,8 @@ class ProductionRun: #: The UUID of the production run uuid: UUID - #: The appliance the production run was executed on. - appliance: Appliance + #: The machine the production run was executed on. + machine: Machine #: The average throughput of the production run excluding downtimes. average_throughput: Optional[float] @@ -277,10 +277,10 @@ class ProductionRun: #: The amount of product produced that can be sold. quantity_yield: Optional[Quantity] - #: OEE component that reflects when the appliance did not produce. + #: OEE component that reflects when the machine did not produce. availability: Optional[OEEComponent] - #: OEE component that reflects how fast the appliance has run. + #: OEE component that reflects how fast the machine has run. performance: Optional[OEEComponent] #: OEE component that reflects how much defects have been produced. diff --git a/src/enlyze/validators.py b/src/enlyze/validators.py index dd95fde..50bb992 100644 --- a/src/enlyze/validators.py +++ b/src/enlyze/validators.py @@ -56,14 +56,14 @@ def validate_timeseries_arguments( start, end = validate_start_and_end(start, end) - appliance_uuids = frozenset(v.appliance.uuid for v in variables) + machine_uuids = frozenset(v.machine.uuid for v in variables) - if len(appliance_uuids) != 1: + if len(machine_uuids) != 1: raise EnlyzeError( - "Cannot request timeseries data for more than one appliance per request." + "Cannot request timeseries data for more than one machine per request." ) - return start, end, str(next(iter(appliance_uuids))) + return start, end, str(next(iter(machine_uuids))) def validate_resampling_interval( diff --git a/tests/enlyze/test_client.py b/tests/enlyze/test_client.py index 4c3e1aa..09c50eb 100644 --- a/tests/enlyze/test_client.py +++ b/tests/enlyze/test_client.py @@ -61,8 +61,8 @@ uuid=st.uuids(), start=datetime_before_today_strategy, end=datetime_today_until_now_strategy, - appliance=st.builds( - production_runs_api_models.Appliance, uuid=st.just(APPLIANCE_UUID) + machine=st.builds( + production_runs_api_models.Machine, uuid=st.just(APPLIANCE_UUID) ), product=st.builds( production_runs_api_models.Product, @@ -142,58 +142,58 @@ def test_get_sites(site1, site2): @given( site1=st.builds(timeseries_api_models.Site, id=st.just(1)), site2=st.builds(timeseries_api_models.Site, id=st.just(2)), - appliance1=st.builds(timeseries_api_models.Appliance, site=st.just(1)), - appliance2=st.builds(timeseries_api_models.Appliance, site=st.just(2)), + machine1=st.builds(timeseries_api_models.Machine, site=st.just(1)), + machine2=st.builds(timeseries_api_models.Machine, site=st.just(2)), ) -def test_get_appliances(site1, site2, appliance1, appliance2): +def test_get_machines(site1, site2, machine1, machine2): client = make_client() with respx_mock_with_base_url(TIMESERIES_API_SUB_PATH) as mock: mock.get("appliances").mock( - PaginatedTimeseriesApiResponse(data=[appliance1, appliance2]) + PaginatedTimeseriesApiResponse(data=[machine1, machine2]) ) mock.get("sites").mock(PaginatedTimeseriesApiResponse(data=[site1, site2])) - all_appliances = client.get_appliances() - assert all_appliances == [ - appliance1.to_user_model(site1.to_user_model()), - appliance2.to_user_model(site2.to_user_model()), + all_machines = client.get_machines() + assert all_machines == [ + machine1.to_user_model(site1.to_user_model()), + machine2.to_user_model(site2.to_user_model()), ] - appliances_site2 = client.get_appliances(site2.to_user_model()) - assert appliances_site2 == [ - appliance2.to_user_model(site2.to_user_model()), + machines_site2 = client.get_machines(site2.to_user_model()) + assert machines_site2 == [ + machine2.to_user_model(site2.to_user_model()), ] @given( - appliance=st.builds(timeseries_api_models.Appliance), + machine=st.builds(timeseries_api_models.Machine), ) -def test_get_appliances_site_not_found(appliance): +def test_get_machines_site_not_found(machine): client = make_client() with respx_mock_with_base_url(TIMESERIES_API_SUB_PATH) as mock: mock.get("sites").mock(PaginatedTimeseriesApiResponse(data=[])) - mock.get("appliances").mock(PaginatedTimeseriesApiResponse(data=[appliance])) + mock.get("appliances").mock(PaginatedTimeseriesApiResponse(data=[machine])) - assert client.get_appliances() == [] + assert client.get_machines() == [] @given( - appliance=st.builds(user_models.Appliance), + machine=st.builds(user_models.Machine), var1=st.builds(timeseries_api_models.Variable), var2=st.builds(timeseries_api_models.Variable), ) -def test_get_variables(appliance, var1, var2): +def test_get_variables(machine, var1, var2): client = make_client() with respx_mock_with_base_url(TIMESERIES_API_SUB_PATH) as mock: mock.get("variables").mock(PaginatedTimeseriesApiResponse(data=[var1, var2])) - variables = client.get_variables(appliance) + variables = client.get_variables(machine) assert variables == [ - var1.to_user_model(appliance), - var2.to_user_model(appliance), + var1.to_user_model(machine), + var2.to_user_model(machine), ] @@ -354,17 +354,17 @@ def test_get_timeseries_raises_invalid_time_bounds(variable): @given( - # we rely on variable{1,2}.appliance.uuid to be different because they are random + # we rely on variable{1,2}.machine.uuid to be different because they are random variable1=st.builds(user_models.Variable), variable2=st.builds(user_models.Variable), ) @settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) -def test_get_timeseries_raises_variables_of_different_appliances( +def test_get_timeseries_raises_variables_of_different_machines( variable1, variable2, start_datetime, end_datetime ): client = make_client() - with pytest.raises(EnlyzeError, match="for more than one appliance"): + with pytest.raises(EnlyzeError, match="for more than one machine"): client.get_timeseries(start_datetime, end_datetime, [variable1, variable2]) @@ -396,8 +396,8 @@ def test_get_timeseries_raises_api_returned_no_timestamps( st.builds(user_models.Product, code=st.just(PRODUCT_CODE)), st.text(), ), - appliance=st.builds( - timeseries_api_models.Appliance, + machine=st.builds( + timeseries_api_models.Machine, site=st.just(SITE_ID), uuid=st.just(APPLIANCE_UUID), ), @@ -409,7 +409,7 @@ def test_get_timeseries_raises_api_returned_no_timestamps( def test_get_production_runs( production_order, product, - appliance, + machine, site, start, end, @@ -418,16 +418,17 @@ def test_get_production_runs( client = make_client() site_user_model = site.to_user_model() - appliance_user_model = appliance.to_user_model(site_user_model) - appliances_by_uuid = {appliance.uuid: appliance_user_model} - - with respx_mock_with_base_url( - TIMESERIES_API_SUB_PATH - ) as timeseries_api_mock, respx_mock_with_base_url( - PRODUCTION_RUNS_API_SUB_PATH - ) as production_runs_api_mock: + machine_user_model = machine.to_user_model(site_user_model) + machines_by_uuid = {machine.uuid: machine_user_model} + + with ( + respx_mock_with_base_url(TIMESERIES_API_SUB_PATH) as timeseries_api_mock, + respx_mock_with_base_url( + PRODUCTION_RUNS_API_SUB_PATH + ) as production_runs_api_mock, + ): timeseries_api_mock.get("appliances").mock( - PaginatedTimeseriesApiResponse(data=[appliance]) + PaginatedTimeseriesApiResponse(data=[machine]) ) timeseries_api_mock.get("sites").mock( PaginatedTimeseriesApiResponse(data=[site]) @@ -441,14 +442,14 @@ def test_get_production_runs( result = client.get_production_runs( production_order=production_order, product=product, - appliance=appliance_user_model, + machine=machine_user_model, start=start, end=end, ) assert ( user_models.ProductionRuns( - [pr.to_user_model(appliances_by_uuid) for pr in production_runs] + [pr.to_user_model(machines_by_uuid) for pr in production_runs] ) == result ) diff --git a/tests/enlyze/test_validators.py b/tests/enlyze/test_validators.py index 132d9ac..6bc7859 100644 --- a/tests/enlyze/test_validators.py +++ b/tests/enlyze/test_validators.py @@ -69,12 +69,10 @@ class TestValidateTimeseriesArguments: variable=VARIABLE_STRATEGY, ) def test_validate_timeseries_arguments(self, start, end, variable): - start, end, appliance_uuid = validate_timeseries_arguments( - start, end, [variable] - ) + start, end, machine_uuid = validate_timeseries_arguments(start, end, [variable]) assert start assert end - assert UUID(appliance_uuid) + assert UUID(machine_uuid) @given(variable=VARIABLE_STRATEGY) def test_validate_start_must_be_earlier_than_end(self, variable): @@ -97,7 +95,7 @@ def test_empty_variables(self, start, end): variable1=VARIABLE_STRATEGY, variable2=VARIABLE_STRATEGY, ) - def test_variables_with_different_appliance(self, start, end, variable1, variable2): + def test_variables_with_different_machine(self, start, end, variable1, variable2): with pytest.raises(EnlyzeError): validate_timeseries_arguments(start, end, [variable1, variable2])