From 3a561e383bc93349003d943f6250e241ad68ef61 Mon Sep 17 00:00:00 2001 From: Huan Min Gan <17909473+ministrudels@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:52:24 +0100 Subject: [PATCH] Remove vessel_product_types paramater from vessl reference (#513) * chore: rm vessel product types param * chore: format * chore: version bump --- vortexasdk/endpoints/vessel_positions.py | 12 ------------ vortexasdk/endpoints/vessel_summary.py | 12 ------------ vortexasdk/endpoints/vessels.py | 14 -------------- vortexasdk/version.py | 2 +- 4 files changed, 1 insertion(+), 39 deletions(-) diff --git a/vortexasdk/endpoints/vessel_positions.py b/vortexasdk/endpoints/vessel_positions.py index 1ab77bcc..5e350b3a 100644 --- a/vortexasdk/endpoints/vessel_positions.py +++ b/vortexasdk/endpoints/vessel_positions.py @@ -56,18 +56,6 @@ def search( | ...to >800 results Note that we will show you all fields by default if you don't set the columns argument. - ``` - - - Now let's find positions for vessels carrying crude, using the Vessels and Product Reference endpoints - - ```python - >>> from vortexasdk import Vessels, Products - >>> crude = [p.id for p in Products().search(term="crude").to_list() if 'group' in p.layer] - >>> vessels_list = Vessels().search(vessel_product_types=crude).to_list() - >>> vessel_ids = [v.id for v in vessels_list] - >>> crude_positions = VesselPositions().search(vessel_id=vessel_ids).to_df() - - ``` # Further Documentation diff --git a/vortexasdk/endpoints/vessel_summary.py b/vortexasdk/endpoints/vessel_summary.py index 300b63fc..7472a012 100644 --- a/vortexasdk/endpoints/vessel_summary.py +++ b/vortexasdk/endpoints/vessel_summary.py @@ -53,18 +53,6 @@ def search( | ...to >800 results Note that we will show you all fields by default if you don't set the columns argument. - ``` - - - Now let's find summaries for vessels carrying crude, using the Vessels and Product Reference endpoints - - ```python - >>> from vortexasdk import Vessels, Products - >>> crude = [p.id for p in Products().search(term="crude").to_list() if 'group' in p.layer] - >>> vessels_list = Vessels().search(vessel_product_types=crude).to_list() - >>> vessel_ids = [v.id for v in vessels_list] - >>> crude_summaries = VesselSummary().search(vessel_id=vessel_ids).to_df() - - ``` # Further Documentation diff --git a/vortexasdk/endpoints/vessels.py b/vortexasdk/endpoints/vessels.py index 2cda9683..14d1af59 100644 --- a/vortexasdk/endpoints/vessels.py +++ b/vortexasdk/endpoints/vessels.py @@ -29,7 +29,6 @@ def search( term: Union[str, List[str]] = None, ids: Union[str, List[str]] = None, vessel_classes: Union[str, List[str]] = None, - vessel_product_types: Union[ID, List[ID]] = None, vessel_scrubbers: str = "disabled", exact_term_match: bool = False, ) -> VesselsResult: @@ -43,8 +42,6 @@ def search( vessel_classes: vessel_class (or list of vessel classes) we'd like to search. Each vessel class must be one of `"oil_coastal", "oil_intermediate", "oil_flexi", "oil_handysize", "oil_mr1","oil_handymax", "oil_mr2", "oil_panamax", "oil_lr1", "oil_aframax", "oil_lr2", "oil_suezmax","oil_lr3", "oil_vlcc","lpg_coasters", "lpg_handysize", "lpg_mgc", "lpg_lgc", "lpg_vlgc", "lpg_vlec", "lng_small_scale_lng", "lng_mid_scale_lng", "lng_two_stroke", "lng_tfde_dfde", "lng_steam", "lng_ssd", "lng_q_flex", "lng_q_max", "oil_coastal", "oil_specialised", "oil_handysize_mr1", "oil_handymax_mr2", "oil_panamax_lr1", "oil_aframax_lr2", "oil_suezmax_lr3", "oil_vlcc","lpg_sgc", "lpg_mgc", "lpg_lgc", "lpg_vlgc_vlec","lng_small_scale_lng", "lng_mid_scale_lng","lng_conventional_lng", "lng_q_fleet", "oil", "lpg", "lng",`. Refer to [VortexaAPI Vessel Entities](https://docs.vortexa.com/reference/intro-vessel-entities) for the most up-to-date list of vessel classes. - vessel_product_types: A product ID, or list of product IDs to filter on, searching vessels _currently_ carrying these products. - vessel_scrubbers: An optional filter to filter on vessels with or without scrubbers. To disable the filter (the default behaviour), enter 'disabled'. To only include vessels with scrubbers, enter 'inc'. @@ -82,16 +79,6 @@ def search( Note the `term` search also looks for vessels with matching `related_names` - - - Let's find all the vessels currently carrying Crude. - - ```python - >>> from vortexasdk import Vessels, Products - >>> crude = [p.id for p in Products().search(term="crude").to_list() if 'group' in p.layer] - >>> vessels_df = Vessels().search(vessel_product_types=crude).to_df() - - ``` - # Further Documentation [VortexaAPI Vessel Reference](https://docs.vortexa.com/reference/POST/reference/vessels) @@ -100,7 +87,6 @@ def search( api_params: Dict[str, Any] = { "term": [str(e) for e in convert_to_list(term)], "ids": convert_to_list(ids), - "vessel_product_types": convert_to_list(vessel_product_types), "vessel_classes": [ v.lower() for v in convert_to_list(vessel_classes) ], diff --git a/vortexasdk/version.py b/vortexasdk/version.py index ca0f7cce..a25b7a69 100644 --- a/vortexasdk/version.py +++ b/vortexasdk/version.py @@ -1 +1 @@ -__version__ = "0.74.4" +__version__ = "0.75.0"