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 a few CI/CD suggestions #120

Closed
wants to merge 1 commit into from

Conversation

erwindouna
Copy link
Collaborator

@erwindouna erwindouna commented Dec 24, 2024

Description

A few CI/CD suggestions to adopt.


Related Issues

Link any related issues that this pull request resolves or is associated with:

Example:


Type of Changes

Mark the type of changes included in this pull request:

  • Bugfix
  • New Feature
  • Documentation Update
  • Refactor
  • Other (please specify):

Checklist

  • I have tested the changes locally and they work as expected.
  • I have added/updated necessary documentation (if applicable).
  • I have followed the code style and guidelines of the project.
  • I have searched for and linked any related issues.

Additional Notes

Add any additional comments, screenshots, or context for the reviewer(s).


Thank you for your contribution to PyTado! 🎉

@erwindouna erwindouna marked this pull request as ready for review December 24, 2024 19:12
Comment on lines +70 to +75
hooks:
- id: pytest
name: pytest
entry: pytest --cov=. --cov-report term-missing
language: system
types: [python]
Copy link
Owner

Choose a reason for hiding this comment

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

this hook fails currently. I added some config to pyproject.toml, but still no "passed" hook. here is the output of pytest when run from the hook:

============================ no tests ran in 0.34s =============================
============================= test session starts ==============================
platform darwin -- Python 3.12.4, pytest-8.3.4, pluggy-1.5.0
rootdir: /Volumes/Daten/Projects/PyTado
configfile: pyproject.toml
plugins: cov-6.0.0
collected 6 items                                                              

tests/test_tado_interface.py ...                                         [ 50%]
tests/test_hops_zone.py ...                                              [100%]

---------- coverage: platform darwin, python 3.12.4-final-0 ----------
Name                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------
PyTado/__init__.py                      0      0   100%
PyTado/__main__.py                     44     34    23%   13-14, 18-20, 24-26, 30-32, 36-38, 43-92
PyTado/const.py                        53      0   100%
PyTado/exceptions.py                    5      0   100%
PyTado/http.py                        174     27    84%   96-106, 111-113, 118, 188-203, 206, 216, 218, 222-224, 236-241
PyTado/interface/__init__.py            2      0   100%
PyTado/interface/api/__init__.py        3      0   100%
PyTado/interface/api/hops_tado.py     107     72    33%   35, 38, 53-70, 77-80, 94-97, 104-108, 115, 122-123, 136, 144-147, 191-197, 204-208, 229-249, 256, 265-270, 278, 285, 293-303, 310-315
PyTado/interface/api/my_tado.py       258    192    26%   50, 76-78, 85-88, 95, 102-105, 112-119, 142-159, 166-169, 176-179, 186-187, 197-205, 212-219, 229-235, 242-249, 256-262, 269-272, 279-282, 289-292, 299-302, 309-314, 335-365, 372-375, 382, 389, 396-401, 409-416, 423, 430-435, 443-448, 455-460, 468-474, 481-488, 495-500, 507-512, 519-525, 541-563, 570-573, 580-583, 590-595, 602-608
PyTado/interface/interface.py         129     38    71%   17-23, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 131, 137, 142, 147, 152, 157, 162, 167, 186, 204, 209, 214, 219, 224, 229, 234, 239, 244, 251, 256, 261, 266, 274, 290
PyTado/logger.py                       22      2    91%   30-31
PyTado/zone/__init__.py                 3      0   100%
PyTado/zone/hops_zone.py               62      8    87%   49, 58-59, 63, 96, 119, 125-128
PyTado/zone/my_zone.py                119     74    38%   78-215
-----------------------------------------------------------------
TOTAL                                 981    447    54%


============================== 6 passed in 1.67s ===============================
============================= test session starts ==============================
platform darwin -- Python 3.12.4, pytest-8.3.4, pluggy-1.5.0
rootdir: /Volumes/Daten/Projects/PyTado
configfile: pyproject.toml
plugins: cov-6.0.0
collected 20 items                                                             

tests/test_my_zone.py ....................                               [100%]

---------- coverage: platform darwin, python 3.12.4-final-0 ----------
Name                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------
PyTado/__init__.py                      0      0   100%
PyTado/__main__.py                     44     34    23%   13-14, 18-20, 24-26, 30-32, 36-38, 43-92
PyTado/const.py                        53      0   100%
PyTado/exceptions.py                    5      0   100%
PyTado/http.py                        174     27    84%   96-106, 111-113, 118, 188-203, 206, 216, 218, 222-224, 236-241
PyTado/interface/__init__.py            2      0   100%
PyTado/interface/api/__init__.py        3      0   100%
PyTado/interface/api/hops_tado.py     107     72    33%   35, 38, 53-70, 77-80, 94-97, 104-108, 115, 122-123, 136, 144-147, 191-197, 204-208, 229-249, 256, 265-270, 278, 285, 293-303, 310-315
PyTado/interface/api/my_tado.py       258    169    34%   50, 76-78, 85-88, 102-105, 112-119, 157, 166-169, 176-179, 186-187, 197-205, 212-219, 229-235, 242-249, 256-262, 269-272, 279-282, 289-292, 299-302, 309-314, 335-365, 372-375, 382, 389, 396-401, 423, 430-435, 443-448, 455-460, 468-474, 481-488, 495-500, 507-512, 519-525, 541-563, 570-573, 580-583, 590-595
PyTado/interface/interface.py         129     38    71%   17-23, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 131, 137, 142, 147, 152, 157, 162, 167, 186, 204, 209, 214, 219, 224, 229, 234, 239, 244, 251, 256, 261, 266, 274, 290
PyTado/logger.py                       22      2    91%   30-31
PyTado/zone/__init__.py                 3      0   100%
PyTado/zone/hops_zone.py               62      8    87%   49, 58-59, 63, 96, 119, 125-128
PyTado/zone/my_zone.py                119      4    97%   102, 131, 134, 159
-----------------------------------------------------------------
TOTAL                                 981    354    64%


============================== 20 passed in 4.78s ==============================
============================= test session starts ==============================
platform darwin -- Python 3.12.4, pytest-8.3.4, pluggy-1.5.0
rootdir: /Volumes/Daten/Projects/PyTado
configfile: pyproject.toml
plugins: cov-6.0.0
collected 5 items                                                              

tests/test_http.py .....                                                 [100%]

---------- coverage: platform darwin, python 3.12.4-final-0 ----------
Name                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------
PyTado/__init__.py                      0      0   100%
PyTado/__main__.py                     44     34    23%   13-14, 18-20, 24-26, 30-32, 36-38, 43-92
PyTado/const.py                        53      0   100%
PyTado/exceptions.py                    5      0   100%
PyTado/http.py                        174     27    84%   96-106, 111-113, 118, 188-203, 206, 216, 218, 222-224, 236-241
PyTado/interface/__init__.py            2      0   100%
PyTado/interface/api/__init__.py        3      0   100%
PyTado/interface/api/hops_tado.py     107     72    33%   35, 38, 53-70, 77-80, 94-97, 104-108, 115, 122-123, 136, 144-147, 191-197, 204-208, 229-249, 256, 265-270, 278, 285, 293-303, 310-315
PyTado/interface/api/my_tado.py       258    192    26%   50, 76-78, 85-88, 95, 102-105, 112-119, 142-159, 166-169, 176-179, 186-187, 197-205, 212-219, 229-235, 242-249, 256-262, 269-272, 279-282, 289-292, 299-302, 309-314, 335-365, 372-375, 382, 389, 396-401, 409-416, 423, 430-435, 443-448, 455-460, 468-474, 481-488, 495-500, 507-512, 519-525, 541-563, 570-573, 580-583, 590-595, 602-608
PyTado/interface/interface.py         129     38    71%   17-23, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 131, 137, 142, 147, 152, 157, 162, 167, 186, 204, 209, 214, 219, 224, 229, 234, 239, 244, 251, 256, 261, 266, 274, 290
PyTado/logger.py                       22      2    91%   30-31
PyTado/zone/__init__.py                 3      0   100%
PyTado/zone/hops_zone.py               62      8    87%   49, 58-59, 63, 96, 119, 125-128
PyTado/zone/my_zone.py                119     74    38%   78-215
-----------------------------------------------------------------
TOTAL                                 981    447    54%


============================== 5 passed in 1.68s ===============================
============================= test session starts ==============================
platform darwin -- Python 3.12.4, pytest-8.3.4, pluggy-1.5.0
rootdir: /Volumes/Daten/Projects/PyTado
configfile: pyproject.toml
plugins: cov-6.0.0
collected 4 items                                                              

tests/test_my_tado.py ....                                               [100%]

---------- coverage: platform darwin, python 3.12.4-final-0 ----------
Name                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------
PyTado/__init__.py                      0      0   100%
PyTado/__main__.py                     44     34    23%   13-14, 18-20, 24-26, 30-32, 36-38, 43-92
PyTado/const.py                        53      0   100%
PyTado/exceptions.py                    5      0   100%
PyTado/http.py                        174     27    84%   96-106, 111-113, 118, 188-203, 206, 216, 218, 222-224, 236-241
PyTado/interface/__init__.py            2      0   100%
PyTado/interface/api/__init__.py        3      0   100%
PyTado/interface/api/hops_tado.py     107     72    33%   35, 38, 53-70, 77-80, 94-97, 104-108, 115, 122-123, 136, 144-147, 191-197, 204-208, 229-249, 256, 265-270, 278, 285, 293-303, 310-315
PyTado/interface/api/my_tado.py       258    170    34%   50, 76-78, 85-88, 95, 102-105, 112-119, 157, 166-169, 176-179, 186-187, 197-205, 212-219, 229-235, 242-249, 256-262, 269-272, 279-282, 289-292, 299-302, 309-314, 335-365, 372-375, 382, 389, 396-401, 423, 430-435, 443-448, 455-460, 468-474, 481-488, 495-500, 507-512, 519-525, 541-563, 570-573, 580-583, 590-595
PyTado/interface/interface.py         129     38    71%   17-23, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 131, 137, 142, 147, 152, 157, 162, 167, 186, 204, 209, 214, 219, 224, 229, 234, 239, 244, 251, 256, 261, 266, 274, 290
PyTado/logger.py                       22      2    91%   30-31
PyTado/zone/__init__.py                 3      0   100%
PyTado/zone/hops_zone.py               62      8    87%   49, 58-59, 63, 96, 119, 125-128
PyTado/zone/my_zone.py                119     74    38%   78-215
-----------------------------------------------------------------
TOTAL                                 981    425    57%


============================== 4 passed in 2.14s ===============================

@wmalgadey wmalgadey mentioned this pull request Dec 25, 2024
9 tasks
@erwindouna erwindouna closed this Dec 25, 2024
@erwindouna
Copy link
Collaborator Author

Closed, since it's picked up in #121.

@erwindouna erwindouna deleted the cicd-suggestions branch December 26, 2024 20:26
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.

2 participants