Skip to content

Conversation

@kyungeonchoi
Copy link
Contributor

  • General.ServiceX as an optional field to further minimize boilerplate
  • Now General block can be omitted from ServiceXSpec and only Sample block is required
  • Default General.ServiceX value is taken from the default_endpoint if present in the servicex.yaml. Otherwise the first endpoint is taken. (Assuming normal users have one endpoint)

@kyungeonchoi kyungeonchoi requested a review from ponyisi June 26, 2024 04:00
@codecov
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.12%. Comparing base (ec93d6a) to head (b66cc2d).
Report is 1 commits behind head on 3.0_develop.

Additional details and impacted files
@@               Coverage Diff               @@
##           3.0_develop     #402      +/-   ##
===============================================
+ Coverage        75.01%   75.12%   +0.10%     
===============================================
  Files               30       30              
  Lines             1421     1423       +2     
===============================================
+ Hits              1066     1069       +3     
+ Misses             355      354       -1     
Flag Coverage Δ
unittests 75.12% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ponyisi
Copy link
Collaborator

ponyisi commented Jun 26, 2024

Coming back to an earlier discussion - should this just be an argument to deliver?

@kyungeonchoi
Copy link
Contributor Author

Coming back to an earlier discussion - should this just be an argument to deliver?

I thought that's for experts - who have multiple endpoints. I expect normal users download servicex.yaml file from the web and just use that without knowing the name of ServiceX endpoint.

I am happy to add an optional argument in the deliver function. From

def deliver(config: Union[ServiceXSpec, Mapping[str, Any]], config_path: Optional[str] = None):

to

def deliver(config: Union[ServiceXSpec, Mapping[str, Any]], config_path: Optional[str] = None, servicex_name: Optional[str]):

to pick up the endpoint from servicex_name

@ponyisi
Copy link
Collaborator

ponyisi commented Jun 26, 2024

Right, the idea was that if the endpoint is an argument to deliver then you get rid of General.ServiceX completely.

@kyungeonchoi kyungeonchoi marked this pull request as ready for review June 27, 2024 02:13
backend = self.config.default_endpoint
else:
# Take the first endpoint from servicex.yaml if default_endpoint is not set
backend = self.config.api_endpoints[0].name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the config file guaranteed, via the parsing code, to have an endpoint?

@ponyisi ponyisi merged commit f5d7377 into 3.0_develop Jun 27, 2024
@ponyisi ponyisi deleted the default_endpoint branch June 27, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants