rocketchat_API icon indicating copy to clipboard operation
rocketchat_API copied to clipboard

Add more "teams" endpoints.

Open fangebee opened this issue 2 years ago • 10 comments

Hi, I've implemented the following missing function for managing Rocketchat Teams, I thought I would share this work, even if some endpoints are still missing.

fangebee avatar Nov 28 '22 10:11 fangebee

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Nov 28 '22 10:11 sonarqubecloud[bot]

Codecov Report

Merging #192 (57242f2) into master (1d021ac) will decrease coverage by 1.15%. The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
- Coverage   97.70%   96.56%   -1.15%     
==========================================
  Files          39       39              
  Lines        1614     1776     +162     
  Branches      110      135      +25     
==========================================
+ Hits         1577     1715     +138     
- Misses         30       46      +16     
- Partials        7       15       +8     
Impacted Files Coverage Δ
rocketchat_API/APISections/teams.py 66.15% <63.93%> (-33.85%) :arrow_down:
tests/test_teams.py 98.16% <98.13%> (-1.84%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Nov 28 '22 14:11 codecov[bot]

Hi @fangebee :wave: Thank you very much for your contribution. Would you mind adding tests for these methods and fixing the issues detected by Codacy and Deepsource?

jadolg avatar Nov 28 '22 15:11 jadolg

Any chance to have this merged in soon? Would be very helpful for a project im working on, thanks!

s0nders avatar Jan 11 '23 16:01 s0nders

Any chance to have this merged in soon? Would be very helpful for a project im working on, thanks!

This PR is not ready for merging yet. I don't know if @fangebee plans to continue working on it.

jadolg avatar Jan 13 '23 08:01 jadolg

I just found how to have docker + pytest working. I'll try to finish this before sunday.

fangebee avatar Jan 13 '23 09:01 fangebee

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
7.4% 7.4% Duplication

sonarqubecloud[bot] avatar Jan 18 '23 12:01 sonarqubecloud[bot]

Hi, I finally wrote the missing tests and fixed some issues detected by deepsource. Can you run CodeCov again? I don't know how to do this by myself.

SonarCloud complains about code duplication, but I think it's ok to duplicate code in automated tests. Correct me if I'm wrong.

fangebee avatar Jan 18 '23 12:01 fangebee

The duplication Sonar is complaining about is not on the tests but on the code. The "team_id or team_name required" message repeats for 8 exceptions. This could be extracted into a constant.

It looks like codecov is still failing. Do you have access to the test report?

From what I can see, it's mostly about not-covered paths. For instance. In this example, there are several untested paths. image

jadolg avatar Jan 18 '23 13:01 jadolg

OK, I found the place to view CodeCov reports: https://app.codecov.io/gh/jadolg/rocketchat_API/pull/192 I'll do the necessary to fix those when I have time this week.

fangebee avatar Jan 23 '23 08:01 fangebee