at-gmbh / personio-py

a lightweight Personio API client
https://at-gmbh.github.io/personio-py
Apache License 2.0
26 stars 17 forks source link

Feature/absences #12

Closed philipflohr closed 3 years ago

philipflohr commented 3 years ago

This adds absence handling and raw api tests for absences and mock api tests for absence creation, deletion and absence retrieval

codecov-io commented 3 years ago

Codecov Report

Merging #12 (df95c36) into master (2d61dd3) will decrease coverage by 0.20%. The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
- Coverage   84.34%   84.13%   -0.21%     
==========================================
  Files           6        6              
  Lines         728      769      +41     
==========================================
+ Hits          614      647      +33     
- Misses        114      122       +8     
Impacted Files Coverage Δ
src/personio_py/client.py 70.94% <58.13%> (-7.38%) :arrow_down:
src/personio_py/models.py 88.17% <76.92%> (+3.25%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2d61dd3...df95c36. Read the comment docs.

philipflohr commented 3 years ago

Test are added. @klamann can you have a look at the changes?

klamann commented 3 years ago

there's a lot of changes in here, I'll need some time to look into it

klamann commented 3 years ago

Hey @philipflohr, I've set up a matrix chat for this project at #personio-py:matrix.org. Would you like to meet up there and have a chat? Because you're doing quite a bit of work on these PRs and I don't have that much time to work on this project right now, I think it would be helpful if we had a more efficient way of communicating.

philipflohr commented 3 years ago

Hi @klamann it has been quite a while since our talk... So far done:

  1. remote id queries are disabled for delete operations and enabled for get operations.
  2. 6fb32a4 fixes an issue (caused by changed api behavior?) where some objects where retrieved twice if paginated requests are used
  3. Updates for mock data to represent the changes in 6fb32a4
  4. Mock tests restructured to be more readable

Currently still missing: mocking functions and mocking data restructuring. Just to make sure I remember stuff correctly: You want all mocking data to be in a single file and all the mocking functions in one separate file?

philipflohr commented 3 years ago

@klamann

Currently still missing: mocking functions and mocking data restructuring. Just to make sure I remember stuff correctly: You want all mocking data to be in a single file and all the mocking functions in one separate file?

was this correct?

klamann commented 3 years ago

Hey, sorry for the delay. Yes, the mock data should go in one file, but you can split the tests that use the mock data in separate files if you prefer.

philipflohr commented 3 years ago

@klamann done. From my point of view this PR is now ready to be merged

klamann commented 3 years ago

ok thanks! I might be able to review this later today

klamann commented 3 years ago

oh, one more thing: please update the README (section API Functions) and add a CHANGELOG entry for this PR

philipflohr commented 3 years ago

@klamann if I'm not missing something all your remarks were addressed.

klamann commented 3 years ago

hey @philipflohr, sorry for letting you wait so long, I didn't notice that you were done with the changes. This looks fine for me, I'll merge it.

Should we create a new release, now that absences are implemented, or would you like to wait for #13?

philipflohr commented 3 years ago

Thanks for merging. I'd suggest to create a new release as I don't know when I can finish #13 .

klamann commented 3 years ago

ok, done :)