nassauwinter / zephyr-python-api

Python wrappers for Zephyr Scale API
Apache License 2.0
1 stars 4 forks source link

Added Zephyr Squad Server support #10

Open crapitea opened 1 year ago

crapitea commented 1 year ago

This commit introduces initial support for the Zephyr Squad (server) variant. Only a number of the available Zephyr API calls are introduced by this commit.

All testing for this commit was done on a self-hosted Zephyr Squad instance.

nassauwinter commented 1 year ago

Hi @crapitea!

This is a massive update for the package. Thank you. I need some time to test code, complete the review and provide you with a feedback.

crapitea commented 1 year ago

A number of modifications needed to be made based on the differences between Squad and Scale.

  1. Squad has quite a different ways to bring paged results, so I split the existing Zephyr Session class into a common one with 2 children that implements only the differences needed for Scale and Squad.
  2. The function parameters I've left them as camelCase to ease the way a developer would use the wrapper. In this case, a developer can just copy/paste the parameters from the documentation and it will just work when passing them to a function.
super-vanilla-bear commented 1 year ago

Hello, guys. I was wondering how things are going with this PR and if there is anything I can do to help? The thing is, I also need a binding to work with the Zephyr Squad API, and the solution from this PR is exactly what I need.

So, can this PR be reviewed one more time, or do you need help with something to get things moving? Thanks in advance for your work.

crapitea commented 1 year ago

Hello, guys. I was wondering how things are going with this PR and if there is anything I can do to help? The thing is, I also need a binding to work with the Zephyr Squad API, and the solution from this PR is exactly what I need.

So, can this PR be reviewed one more time, or do you need help with something to get things moving? Thanks in advance for your work.

At the present time the tox verifications should be resolved.

The problem with that is that a decision should be made regarding how the function parameters should look. The Zephyr API uses camelCase instead of snake_case and considering the fact that not all parameters are documented, I decided that required parameters to use the same names like the ones in the documentation. This is a lot easier from a user's perspective since all parameters are the same as the ones in the documentation, but it's not pythonic.

Solutions that I will implement in this PR to fix this:

  1. For the camelCase, I will make the required parameters follow snake_case convention while the remaining keywords will remain in camelCase. This is the same approach taken by Zephyr Scale Cloud implementation.
  2. Add the following exception to tox: too-many-public-methods. Unfortunately, some endpoints have more than 20 methods so I will either raise this limit to 30, or ignore it.
crapitea commented 1 year ago

Hello, guys. I was wondering how things are going with this PR and if there is anything I can do to help? The thing is, I also need a binding to work with the Zephyr Squad API, and the solution from this PR is exactly what I need.

So, can this PR be reviewed one more time, or do you need help with something to get things moving? Thanks in advance for your work.

Can you also test this PR to make sure that everything is working as expected? For the moment, all needed modifications / blockers are fixed.

super-vanilla-bear commented 1 year ago

@crapitea glad to hear it! Actually, I've already played around with your solution some time ago and didn't find any problems, but I'll try it again and report back if I have anything to say.

crapitea commented 10 months ago

At the present time, everything needed was implemented to have support for the most commonly used functions of Zephyr Squad Server. Can you please review this and see if there is anything else that can be improved/reworked?