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 transmission download path to events + add_torrent service #121371

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

DrBlokmeister
Copy link

Proposed change

  1. Add download path to transmission add_torrent service.
  2. Add download path to transmission torrent events.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
ha-venvvscode ➜ /workspaces/HA_core (transmission-download-path) $ pre-commit run --files /workspaces/HA_core/homeassistant/components/transmission/*       
ruff.....................................................................Passed
ruff-format..............................................................Passed
codespell................................................................Passed
check json...............................................................Passed
don't commit to branch...................................................Passed
yamllint.................................................................Passed
prettier.................................................................Passed
mypy.....................................................................Passed
pylint...................................................................Passed
gen_requirements_all.....................................................Passed
hassfest.................................................................Passed
hassfest-metadata....................................(no files to check)Skipped
hassfest-mypy-config.................................(no files to check)Skipped

ha-venvvscode ➜ /workspaces/HA_core (transmission-download-path) $ pytest ./tests/components/transmission --cov=homeassistant.components.transmission --cov-report term-missing -vv
Test session starts (platform: linux, Python 3.12.3, pytest 8.2.0, pytest-sugar 1.0.0)
cachedir: .pytest_cache
rootdir: /workspaces/HA_core
configfile: pyproject.toml
plugins: mock-3.14.0, typeguard-4.0.1, rerunfailures-14.0, socket-0.7.0, sugar-1.0.0, pytest_freezer-0.4.8, requests-mock-1.12.1, timeout-2.3.1, cov-5.0.0, aiohttp-1.0.5, syrupy-4.6.1, xdist-3.6.1, picked-0.5.0, unordered-0.6.0, respx-0.21.1, asyncio-0.23.6, github-actions-annotate-failures-0.2.0, anyio-4.4.0
asyncio: mode=Mode.AUTO
collected 27 items                                                                                                                                                                                                                                                                                                                        

 tests/components/transmission/test_config_flow.py::test_form ✓                                                                                                                                                                                                                                                               4% ▍         
 tests/components/transmission/test_config_flow.py::test_device_already_configured ✓                                                                                                                                                                                                                                          7% ▊         
 tests/components/transmission/test_config_flow.py::test_options ✓                                                                                                                                                                                                                                                           11% █▎        
 tests/components/transmission/test_config_flow.py::test_error_on_wrong_credentials ✓                                                                                                                                                                                                                                        15% █▌        
 tests/components/transmission/test_config_flow.py::test_unexpected_error ✓                                                                                                                                                                                                                                                  19% █▉        
 tests/components/transmission/test_config_flow.py::test_error_on_connection_failure ✓                                                                                                                                                                                                                                       22% ██▎       
 tests/components/transmission/test_config_flow.py::test_reauth_success ✓                                                                                                                                                                                                                                                    26% ██▋       
 tests/components/transmission/test_config_flow.py::test_reauth_failed ✓                                                                                                                                                                                                                                                     30% ██▉       
 tests/components/transmission/test_config_flow.py::test_reauth_failed_connection_error ✓                                                                                                                                                                                                                                    33% ███▍      
 tests/components/transmission/test_init.py::test_successful_config_entry ✓                                                                                                                                                                                                                                                  37% ███▊      
 tests/components/transmission/test_init.py::test_config_flow_entry_migrate_1_1_to_1_2 ✓                                                                                                                                                                                                                                     41% ████▏     
 tests/components/transmission/test_init.py::test_setup_failed_connection_error ✓                                                                                                                                                                                                                                            44% ████▌     
 tests/components/transmission/test_init.py::test_setup_failed_auth_error ✓                                                                                                                                                                                                                                                  48% ████▊     
 tests/components/transmission/test_init.py::test_setup_failed_unexpected_error ✓                                                                                                                                                                                                                                            52% █████▎    
 tests/components/transmission/test_init.py::test_unload_entry ✓                                                                                                                                                                                                                                                             56% █████▋    
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Down Speed-1234-download] ✓                                                                                                                                                                                                  59% █████▉    
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Up Speed-1234-upload] ✓                                                                                                                                                                                                      63% ██████▍   
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Status-1234-status] ✓                                                                                                                                                                                                        67% ██████▋   
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Active Torrents-1234-active_torrents] ✓                                                                                                                                                                                      70% ███████▏  
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Paused Torrents-1234-paused_torrents] ✓                                                                                                                                                                                      74% ███████▌  
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Total Torrents-1234-total_torrents] ✓                                                                                                                                                                                        78% ███████▊  
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Completed Torrents-1234-completed_torrents] ✓                                                                                                                                                                                81% ████████▎ 
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-0.0.0.0-Transmission Started Torrents-1234-started_torrents] ✓                                                                                                                                                                                    85% ████████▌ 
 tests/components/transmission/test_init.py::test_migrate_unique_id[sensor-1234-started_torrents-1234-started_torrents] ✓                                                                                                                                                                                                    89% ████████▉ 
 tests/components/transmission/test_init.py::test_migrate_unique_id[switch-0.0.0.0-Transmission Switch-1234-on_off] ✓                                                                                                                                                                                                        93% █████████▍
 tests/components/transmission/test_init.py::test_migrate_unique_id[switch-0.0.0.0-Transmission Turtle Mode-1234-turtle_mode] ✓                                                                                                                                                                                              96% █████████▋
 tests/components/transmission/test_init.py::test_migrate_unique_id[switch-1234-turtle_mode-1234-turtle_mode] ✓                                                                                                                                                                                                             100% ██████████

---------- coverage: platform linux, python 3.12.3-final-0 -----------
Name                                                   Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------------
homeassistant/components/transmission/config_flow.py      59      0   100%
homeassistant/components/transmission/const.py            34      0   100%
homeassistant/components/transmission/errors.py            4      0   100%
------------------------------------------------------------------------------------
TOTAL                                                     97      0   100%


Results (2.51s):
      27 passed

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

  • I have reviewed two other open pull requests in this repository.
    • Skipped as this is my first PR and don't know enough to be an adequate reviewer.

@home-assistant
Copy link

home-assistant bot commented Jul 6, 2024

Hey there @engrbm87, @JPHutchins, mind taking a look at this pull request as it has been labeled with an integration (transmission) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of transmission can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign transmission Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@MartinHjelmare MartinHjelmare changed the title Add download path to events + add_torrent service Add transmission download path to events + add_torrent service Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant