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

Add more Crowd functions #1277

Merged
merged 12 commits into from
Dec 19, 2023
Merged

Add more Crowd functions #1277

merged 12 commits into from
Dec 19, 2023

Conversation

ChowRex
Copy link
Contributor

@ChowRex ChowRex commented Dec 7, 2023

  • Add a new function user_groups used to get specify user's all group info
  • Introduce new dependencies jmespath which is used for search string in json, for more info, read: JMESPath Tutorial — JMESPath
  • Using universal request to get user's group, controled by kind param
  • Using universal request to get group's member, controled by kind param
  • Add a new function to determine whether the user is a member of a group
  • Add a parameter max_results has prevented insufficient results from being returned, the server default is 1000

- Add a new function `user_groups` used to get specify user's all group info
- Introduce new dependencies `jmespath` which is used for search string in json, for more info, read: [JMESPath Tutorial — JMESPath](https://jmespath.org/tutorial.html)
- Using universal request to get user's group, controled by `kind` param
- Using universal request to get group's member, controled by `kind` param
- Add a new function to determine whether the user is a member of a group
@ChowRex ChowRex changed the title Update crowd.py Add more Crowd functions Dec 8, 2023
- Add a parameter `max_results` has prevented insufficient results from being returned, the server default is `1000`
- Sync latest requirements
- Add a config parameter: `build.os` try to fix RTD docs build error
- Add build config to fix RTD doc build error
@ChowRex
Copy link
Contributor Author

ChowRex commented Dec 8, 2023

Add 2 more commits to fix RTD doc build error.
Ref link:
Configuration file v2 (.readthedocs.yaml) — Read the Docs user documentation

Like official sample:

build:
  os: ubuntu-22.04
  tools:
    python: "3"

- Add `jmespath` into it.
@ChowRex
Copy link
Contributor Author

ChowRex commented Dec 9, 2023

I carefully checked Dockerfile.qa and found that you are using requirements-dev.txt instead of requirements.txt to install the required package, and then check the QA results, so I have added it now.

- Add new functions' doc
@ChowRex
Copy link
Contributor Author

ChowRex commented Dec 9, 2023

Add doc

@gonchik
Copy link
Member

gonchik commented Dec 9, 2023

@ChowRex thank you for your PR and fix docs
As I see jmasepath is quite sweet syntax for json :)

Let's start from that usage.
It will be nice if you made more PRs :)

@ChowRex
Copy link
Contributor Author

ChowRex commented Dec 10, 2023

@gonchik Thanks for reply, I'm trying to fix the QA testing errors. If time permits, I'd be happy to submit more PRs.

@ChowRex
Copy link
Contributor Author

ChowRex commented Dec 10, 2023

Close the PR for the time being, and I will resubmit it after repair.

@ChowRex ChowRex closed this Dec 10, 2023
ChowRex and others added 3 commits December 10, 2023 13:35
- Introduce a new dependency package: `jmespath`
- Using black to format code, replace pylint.
@ChowRex
Copy link
Contributor Author

ChowRex commented Dec 10, 2023

Reopen this PR.

@ChowRex ChowRex reopened this Dec 10, 2023
@codecov-commenter
Copy link

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (3e1ef05) 34.51% compared to head (d67c889) 34.50%.

Files Patch % Lines
atlassian/crowd.py 26.66% 11 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1277      +/-   ##
==========================================
- Coverage   34.51%   34.50%   -0.02%     
==========================================
  Files          45       45              
  Lines        8184     8196      +12     
  Branches     1134     1134              
==========================================
+ Hits         2825     2828       +3     
- Misses       5245     5254       +9     
  Partials      114      114              

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

@gonchik gonchik merged commit 1ccaa1b into atlassian-api:master Dec 19, 2023
10 checks passed
@ChowRex ChowRex deleted the patch-1 branch December 19, 2023 06:32
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.

None yet

3 participants