hacs / integration

HACS gives you a powerful UI to handle downloads of all your custom needs.
https://hacs.xyz
MIT License
4.88k stars 1.23k forks source link

Remove code paths only used in non-experimental mode #3728

Closed emontnemery closed 1 month ago

emontnemery commented 1 month ago

Remove code paths only used in non-experimental mode

emontnemery commented 1 month ago

@coderabbitai review

coderabbitai[bot] commented 1 month ago
Walkthrough ## Walkthrough The changes involve the removal of the `experimental` flag and related conditional logic throughout the `hacs` custom component. This includes updates to configuration handling, diagnostics, frontend setup, repository management, and tests. The goal is to simplify the codebase by treating previously experimental features as standard, thus removing the need for experimental checks. ## Changes | Files/Modules | Change Summary | |---------------|----------------| | **`.gitignore`, `custom_components/hacs/__init__.py`** | Removed `hacs_frontend_experimental` references, renamed to `hacs_frontend`. Updated platform handling logic to be unconditional. | | **`custom_components/hacs/base.py`** | Removed `experimental` flag and related logic from `HacsConfiguration` class and its methods. | | **`custom_components/hacs/diagnostics.py`** | Removed `experimental` option from diagnostics. | | **`custom_components/hacs/frontend.py`** | Streamlined frontend registration, removed themes endpoint setup. | | **`custom_components/hacs/repositories/base.py`** | Simplified content download and repository handling logic by removing `experimental` checks. | | **`custom_components/hacs/repositories/integration.py`** | Removed `experimental` check before creating restart_required issue. | | **`custom_components/hacs/repositories/theme.py`** | Removed `async_setup_frontend_endpoint_themes` call. | | **`custom_components/hacs/system_health.py`** | Removed `experimental` check, unconditionally fetched "HACS Data". | | **`custom_components/hacs/utils/configuration_schema.py`** | Removed `EXPERIMENTAL` constant. | | **`custom_components/hacs/utils/data.py`** | Simplified data loading and error handling by removing `experimental` checks. | | **`custom_components/hacs/websocket/__init__.py`** | Set `experimental` key in `hacs_info` function to always `True`. | | **`custom_components/hacs/websocket/repositories.py`** | Refined condition for including repositories by checking `repo.data.last_fetched` directly. | | **`.github/pre-commit-config.yaml`** | Removed `--skip=custom_components/hacs/utils/default.repositories` argument. | | **`scripts/data/generate_category_data.py`** | Added new imports, removed `experimental` attribute initialization, added GitHub API interaction method. | | **`tests/conftest.py`** | Removed `experimental` field from configuration and options dictionaries. | | **`tests/hacsbase/test_configuration.py`** | Replaced assertions for `experimental` with `hasattr` to confirm its absence. | | **`tests/integration/test_integration_setup.py`** | Removed `experimental` argument from `create_config_entry` function calls. | | **`tests/snapshots/...`** | Removed `experimental` configuration option from various JSON snapshot files. | ## Sequence Diagram(s) (Beta) The changes are too varied and wide-ranging to be effectively represented in sequence diagrams. The modifications mainly involve removing conditional checks and simplifying existing logic, rather than introducing new features or control flows.

Recent Review Details **Configuration used: CodeRabbit UI** **Review profile: ASSERTIVE**
Commits Files that changed from the base of the PR and between 031fed22acb56f2e54f14eb2c462b907681e96f8 and 64334e8ab43a866f5b27a1da630f72c90e7a44b1.
Files selected for processing (57) * .github/pre-commit-config.yaml (1 hunks) * .gitignore (1 hunks) * custom_components/hacs/__init__.py (3 hunks) * custom_components/hacs/base.py (16 hunks) * custom_components/hacs/diagnostics.py (1 hunks) * custom_components/hacs/frontend.py (1 hunks) * custom_components/hacs/repositories/base.py (3 hunks) * custom_components/hacs/repositories/integration.py (1 hunks) * custom_components/hacs/repositories/theme.py (1 hunks) * custom_components/hacs/system_health.py (2 hunks) * custom_components/hacs/utils/configuration_schema.py (1 hunks) * custom_components/hacs/utils/data.py (4 hunks) * custom_components/hacs/websocket/__init__.py (1 hunks) * custom_components/hacs/websocket/repositories.py (1 hunks) * scripts/data/generate_category_data.py (3 hunks) * tests/conftest.py (2 hunks) * tests/hacsbase/test_configuration.py (1 hunks) * tests/integration/test_integration_setup.py (2 hunks) * tests/snapshots/diagnostics/base.json (2 hunks) * tests/snapshots/diagnostics/exception.json (2 hunks) * tests/snapshots/hacs-test-org/appdaemon-basic/test_discard_invalid_repo_data.json (1 hunks) * tests/snapshots/hacs-test-org/appdaemon-basic/test_download_repository.json (1 hunks) * tests/snapshots/hacs-test-org/appdaemon-basic/test_remove_repository_post.json (1 hunks) * tests/snapshots/hacs-test-org/appdaemon-basic/test_remove_repository_pre.json (1 hunks) * tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_entity.json (1 hunks) * tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_websocket.json (1 hunks) * tests/snapshots/hacs-test-org/integration-basic/test_discard_invalid_repo_data.json (1 hunks) * tests/snapshots/hacs-test-org/integration-basic/test_download_repository.json (1 hunks) * tests/snapshots/hacs-test-org/integration-basic/test_remove_repository_post.json (1 hunks) * tests/snapshots/hacs-test-org/integration-basic/test_remove_repository_pre.json (1 hunks) * tests/snapshots/hacs-test-org/integration-basic/test_update_repository_entity.json (1 hunks) * tests/snapshots/hacs-test-org/integration-basic/test_update_repository_websocket.json (1 hunks) * tests/snapshots/hacs-test-org/plugin-basic/test_discard_invalid_repo_data.json (1 hunks) * tests/snapshots/hacs-test-org/plugin-basic/test_download_repository.json (1 hunks) * tests/snapshots/hacs-test-org/plugin-basic/test_remove_repository_post.json (1 hunks) * tests/snapshots/hacs-test-org/plugin-basic/test_remove_repository_pre.json (1 hunks) * tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_entity.json (1 hunks) * tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_websocket.json (1 hunks) * tests/snapshots/hacs-test-org/python_script-basic/test_discard_invalid_repo_data.json (1 hunks) * tests/snapshots/hacs-test-org/python_script-basic/test_download_repository.json (1 hunks) * tests/snapshots/hacs-test-org/python_script-basic/test_remove_repository_post.json (1 hunks) * tests/snapshots/hacs-test-org/python_script-basic/test_remove_repository_pre.json (1 hunks) * tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_entity.json (1 hunks) * tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_websocket.json (1 hunks) * tests/snapshots/hacs-test-org/template-basic/test_discard_invalid_repo_data.json (1 hunks) * tests/snapshots/hacs-test-org/template-basic/test_download_repository.json (1 hunks) * tests/snapshots/hacs-test-org/template-basic/test_remove_repository_post.json (1 hunks) * tests/snapshots/hacs-test-org/template-basic/test_remove_repository_pre.json (1 hunks) * tests/snapshots/hacs-test-org/template-basic/test_update_repository_entity.json (1 hunks) * tests/snapshots/hacs-test-org/template-basic/test_update_repository_websocket.json (1 hunks) * tests/snapshots/hacs-test-org/theme-basic/test_discard_invalid_repo_data.json (1 hunks) * tests/snapshots/hacs-test-org/theme-basic/test_download_repository.json (1 hunks) * tests/snapshots/hacs-test-org/theme-basic/test_remove_repository_post.json (1 hunks) * tests/snapshots/hacs-test-org/theme-basic/test_remove_repository_pre.json (1 hunks) * tests/snapshots/hacs-test-org/theme-basic/test_update_repository_entity.json (1 hunks) * tests/snapshots/hacs-test-org/theme-basic/test_update_repository_websocket.json (1 hunks) * tests/snapshots/test_integration_setup.json (1 hunks)
Files not processed due to max files limit (3) * tests/snapshots/test_integration_setup_with_custom_updater.json * tests/test_config_flow.py * tests/test_data_client.py
Additional Context Used
Learnings (1)
tests/snapshots/hacs-test-org/appdaemon-basic/test_download_repository.json (1)
``` User: emontnemery PR: hacs/integration#3728 File: custom_components/hacs/repositories/base.py:615-625 Timestamp: 2024-05-27T13:32:27.995Z Learning: The PR aims to remove non-experimental mode, meaning that experimental download logic should be retained. ```
Additional comments not posted (56)
custom_components/hacs/utils/configuration_schema.py (1)
Line range hint `1-12`: The removal of the `EXPERIMENTAL` constant is consistent with the PR's objective to streamline the code by removing non-experimental mode paths.
.gitignore (1)
Line range hint `1-31`: The inclusion of `custom_components/hacs/hacs_frontend` in `.gitignore` is consistent with the renaming and changes in handling of the frontend directory, aligning with the PR's objectives.
tests/hacsbase/test_configuration.py (1)
Line range hint `1-49`: The updates to the tests ensure that the `experimental` attribute is correctly ignored, aligning with the removal of this attribute from the `HacsConfiguration` class.
custom_components/hacs/system_health.py (1)
`39-41`: Updating the `HACS Data` URL to `https://data-v2.hacs.xyz/data.json` is consistent with the PR's objectives to streamline and update various components.
tests/integration/test_integration_setup.py (1)
`18-18`: The removal of the `experimental` argument from `create_config_entry` calls is consistent with the PR's objectives to remove non-experimental mode paths. Also applies to: 44-44
tests/snapshots/hacs-test-org/python_script-basic/test_discard_invalid_repo_data.json (1)
`56-56`: Setting the `dev` attribute to `true` in the snapshot data is consistent with the PR's objectives to streamline and update various components.
tests/snapshots/hacs-test-org/template-basic/test_discard_invalid_repo_data.json (1)
`56-56`: The addition of the "dev" configuration setting is consistent with the PR's objectives to streamline configurations.
tests/snapshots/hacs-test-org/plugin-basic/test_discard_invalid_repo_data.json (1)
`56-56`: The addition of the "dev" configuration setting is consistent with the PR's objectives to streamline configurations.
tests/snapshots/hacs-test-org/theme-basic/test_discard_invalid_repo_data.json (1)
`56-56`: The addition of the "dev" configuration setting is consistent with the PR's objectives to streamline configurations.
tests/snapshots/hacs-test-org/integration-basic/test_discard_invalid_repo_data.json (1)
`58-58`: The addition of the "dev" configuration setting is consistent with the PR's objectives to streamline configurations.
tests/snapshots/hacs-test-org/appdaemon-basic/test_discard_invalid_repo_data.json (1)
`62-62`: The addition of the "dev" configuration setting is consistent with the PR's objectives to streamline configurations.
tests/snapshots/hacs-test-org/appdaemon-basic/test_remove_repository_post.json (1)
`68-68`: The addition of the "dev" configuration setting aligns with the PR's objectives to streamline configurations by removing experimental modes.
tests/snapshots/hacs-test-org/integration-basic/test_remove_repository_post.json (1)
`68-68`: Consistent update across snapshot files, correctly reflecting the new "dev" configuration setting.
tests/snapshots/hacs-test-org/plugin-basic/test_remove_repository_post.json (1)
`68-68`: Consistent update across snapshot files, correctly reflecting the new "dev" configuration setting.
tests/snapshots/hacs-test-org/python_script-basic/test_remove_repository_post.json (1)
`68-68`: Consistent update across snapshot files, correctly reflecting the new "dev" configuration setting.
tests/snapshots/hacs-test-org/template-basic/test_remove_repository_post.json (1)
`68-68`: Consistent update across snapshot files, correctly reflecting the new "dev" configuration setting.
tests/snapshots/hacs-test-org/theme-basic/test_remove_repository_post.json (1)
`68-68`: Consistent update across snapshot files, correctly reflecting the new "dev" configuration setting.
custom_components/hacs/frontend.py (2)
Line range hint `36-36`: Check if the `async_setup_frontend_endpoint_plugin` method is implemented and used correctly.
Verification successful --- The `async_setup_frontend_endpoint_plugin` method is implemented in `custom_components/hacs/base.py` and used in `custom_components/hacs/repositories/plugin.py` and `custom_components/hacs/frontend.py`. This confirms that the method is both implemented and utilized correctly within the codebase. - `custom_components/hacs/base.py`: Implementation of `async_setup_frontend_endpoint_plugin`. - `custom_components/hacs/repositories/plugin.py`: Usage of `async_setup_frontend_endpoint_plugin`. - `custom_components/hacs/frontend.py`: Usage of `async_setup_frontend_endpoint_plugin`.
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify the implementation and usage of `async_setup_frontend_endpoint_plugin`. # Test: Search for the method implementation and usage. Expect: Implementation and at least one usage in the codebase. rg --type python $'async_setup_frontend_endpoint_plugin' ``` Length of output: 86 --- --- Script: ```shell #!/bin/bash # Description: Verify the implementation and usage of `async_setup_frontend_endpoint_plugin`. # Test: Search for the method implementation and usage. Expect: Implementation and at least one usage in the codebase. rg --type py $'async_setup_frontend_endpoint_plugin' ``` Length of output: 346
--- Line range hint `28-28`: Confirm that the environment variable `HACS_FRONTEND_DIR` is set in production environments if needed.
custom_components/hacs/diagnostics.py (1)
Line range hint `14-14`: Ensure that all diagnostic data fields are necessary and do not expose sensitive information.
tests/snapshots/hacs-test-org/theme-basic/test_remove_repository_pre.json (1)
`78-78`: Confirm that the `dev` configuration is intended to be `true` in this snapshot.
tests/snapshots/hacs-test-org/python_script-basic/test_remove_repository_pre.json (1)
`78-78`: Verify that the `dev` configuration is correctly set for this snapshot.
Verification successful --- The `dev` configuration is correctly set to `true` in the snapshot file. -
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify the `dev` configuration in the snapshot. # Test: Confirm that the `dev` setting is correct. Expect: Confirmation that this is the intended setting. echo "Manual verification needed for 'dev' configuration in snapshot." ``` Length of output: 142 --- --- Script: ```shell #!/bin/bash # Description: Extract and display the relevant portion of the snapshot file for manual inspection. # Extract lines around the `dev` setting in the snapshot file. grep -C 5 '"dev": true' tests/snapshots/hacs-test-org/python_script-basic/test_remove_repository_pre.json ``` Length of output: 395
tests/snapshots/hacs-test-org/template-basic/test_remove_repository_pre.json (1)
`78-78`: Ensure the `dev` configuration is appropriate for this snapshot.
tests/snapshots/hacs-test-org/plugin-basic/test_remove_repository_pre.json (1)
`79-79`: Check that the `dev` configuration is set correctly in this snapshot.
tests/snapshots/test_integration_setup.json (1)
`62-62`: The change to set "dev" to true aligns with the PR's focus on non-experimental code paths, suggesting a shift towards development stability.
tests/snapshots/hacs-test-org/appdaemon-basic/test_remove_repository_pre.json (1)
`79-79`: Consistent with the broader PR goals, setting "dev" to true here supports a focus on development stability.
tests/snapshots/hacs-test-org/integration-basic/test_remove_repository_pre.json (1)
`82-82`: Setting "dev" to true is consistent across various test configurations, supporting the PR's focus on non-experimental, development-centric settings.
tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_websocket.json (1)
`95-95`: The consistent update to set "dev" to true across various components supports the PR's focus on stable, development-oriented configurations.
tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_websocket.json (1)
`95-95`: This change to set "dev" to true is consistent across all test configurations, supporting the PR's focus on stable, development-oriented settings.
tests/snapshots/hacs-test-org/theme-basic/test_update_repository_websocket.json (1)
`96-96`: Setting "dev" to true in the snapshot seems unrelated to the removal of non-experimental code paths. Please verify its relevance.
tests/snapshots/hacs-test-org/template-basic/test_update_repository_websocket.json (1)
`96-96`: Setting "dev" to true in the snapshot seems unrelated to the removal of non-experimental code paths. Please verify its relevance.
tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_websocket.json (1)
`96-96`: Setting "dev" to true in the snapshot seems unrelated to the removal of non-experimental code paths. Please verify its relevance.
custom_components/hacs/repositories/theme.py (1)
Line range hint `1-57`: The changes in `HacsThemeRepository` align with the PR's objective to remove non-experimental code paths. Good job on cleaning up the code.
tests/snapshots/hacs-test-org/integration-basic/test_update_repository_websocket.json (1)
`99-99`: Setting "dev" to true in the snapshot seems unrelated to the removal of non-experimental code paths. Please verify its relevance.
custom_components/hacs/websocket/__init__.py (1)
Line range hint `1-114`: The changes in the WebSocket commands align with the PR's objective to remove non-experimental code paths. The implementation is clean and well-structured.
tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_entity.json (1)
Line range hint `1-1`: Ensure removal of experimental features is reflected in repository entity updates.
Verification successful --- The verification confirms that the JSON snapshot file does not contain any experimental features or related configurations. - No occurrences of 'experimental', 'beta', 'test', or 'flag' were found in `tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_entity.json`.
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify that no experimental flags or configurations exist in repository entity updates. # Test: Search for 'experimental' in repository entity updates. Expect: No occurrences. rg --type json 'experimental' tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_entity.json ``` Length of output: 114 --- --- Script: ```shell #!/bin/bash # Description: Verify that no experimental or related configurations exist in repository entity updates. # Test: Search for 'beta', 'test', 'flag' in repository entity updates. Expect: No occurrences. rg --type json 'beta' tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_entity.json rg --type json 'test' tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_entity.json rg --type json 'flag' tests/snapshots/hacs-test-org/python_script-basic/test_update_repository_entity.json ``` Length of output: 873
tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_entity.json (1)
Line range hint `1-1`: Ensure removal of experimental features is reflected in AppDaemon script repository entity updates.
Verification successful --- The verification confirms that the JSON file does not contain any experimental features or related configurations. -
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify that no experimental flags or configurations exist in AppDaemon script repository entity updates. # Test: Search for 'experimental' in AppDaemon script repository entity updates. Expect: No occurrences. rg --type json 'experimental' tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_entity.json ``` Length of output: 110 --- --- Script: ```shell #!/bin/bash # Description: Verify that no experimental or related configurations exist in AppDaemon script repository entity updates. # Test: Search for 'beta', 'test', 'flag' in AppDaemon script repository entity updates. Expect: No occurrences. rg --type json 'beta' tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_entity.json rg --type json 'test' tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_entity.json rg --type json 'flag' tests/snapshots/hacs-test-org/appdaemon-basic/test_update_repository_entity.json ``` Length of output: 857
tests/snapshots/hacs-test-org/theme-basic/test_update_repository_entity.json (1)
Line range hint `1-1`: Ensure removal of experimental features is reflected in theme repository entity updates.
Verification successful --- The searches for 'experimental', 'beta', 'feature_flag', and 'flag' in the JSON snapshot file did not produce any output, indicating that these terms are not present in the file. This suggests that there are no remnants of experimental features or related configurations in the theme repository entity updates. - : The JSON snapshot file `tests/snapshots/hacs-test-org/theme-basic/test_update_repository_entity.json` does not contain any experimental features or related configurations.
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify that no experimental flags or configurations exist in theme repository entity updates. # Test: Search for 'experimental' in theme repository entity updates. Expect: No occurrences. rg --type json 'experimental' tests/snapshots/hacs-test-org/theme-basic/test_update_repository_entity.json ``` Length of output: 106 --- --- Script: ```shell #!/bin/bash # Description: Verify that no experimental or related configurations exist in theme repository entity updates. # Test: Search for 'beta' in theme repository entity updates. Expect: No occurrences. rg --type json 'beta' tests/snapshots/hacs-test-org/theme-basic/test_update_repository_entity.json # Test: Search for 'feature_flag' in theme repository entity updates. Expect: No occurrences. rg --type json 'feature_flag' tests/snapshots/hacs-test-org/theme-basic/test_update_repository_entity.json # Test: Search for 'flag' in theme repository entity updates. Expect: No occurrences. rg --type json 'flag' tests/snapshots/hacs-test-org/theme-basic/test_update_repository_entity.json ``` Length of output: 304
tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_entity.json (1)
Line range hint `1-1`: Ensure removal of experimental features is reflected in plugin repository entity updates.
Verification successful --- The verification process did not find any occurrences of terms related to experimental features in the JSON snapshot file. This suggests that the removal of experimental features has been correctly reflected. -
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify that no experimental flags or configurations exist in plugin repository entity updates. # Test: Search for 'experimental' in plugin repository entity updates. Expect: No occurrences. rg --type json 'experimental' tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_entity.json ``` Length of output: 107 --- --- Script: ```shell #!/bin/bash # Description: Verify that no experimental flags or configurations exist in plugin repository entity updates. # Test: Search for other potential terms related to experimental features in the JSON file. rg --type json 'beta' tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_entity.json rg --type json 'feature_flag' tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_entity.json rg --type json 'test_feature' tests/snapshots/hacs-test-org/plugin-basic/test_update_repository_entity.json ``` Length of output: 315
tests/snapshots/hacs-test-org/python_script-basic/test_download_repository.json (1)
Line range hint `1-1`: Ensure removal of experimental features is reflected in Python script repository download data.
Verification successful --- The search for terms related to experimental features in the JSON snapshot file did not produce any results. This indicates that there are no remnants of experimental flags or configurations in the file. - : The JSON snapshot file does not contain any experimental flags or related configurations.
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify that no experimental flags or configurations exist in Python script repository download data. # Test: Search for 'experimental' in Python script repository download data. Expect: No occurrences. rg --type json 'experimental' tests/snapshots/hacs-test-org/python_script-basic/test_download_repository.json ``` Length of output: 109 --- --- Script: ```shell #!/bin/bash # Description: Verify that no experimental flags or configurations exist in Python script repository download data. # Test: Search for 'experimental' and other related terms in Python script repository download data. Expect: No occurrences. rg --type json 'experimental|beta|test_feature|flag' tests/snapshots/hacs-test-org/python_script-basic/test_download_repository.json ``` Length of output: 134
tests/snapshots/hacs-test-org/appdaemon-basic/test_download_repository.json (1)
`152-152`: The addition of the "dev" configuration setting is appropriate and aligns with the broader changes in the system configuration.
tests/snapshots/hacs-test-org/template-basic/test_update_repository_entity.json (1)
`152-152`: Consistent with other configuration updates, the addition of the "dev" setting is appropriate.
tests/snapshots/hacs-test-org/theme-basic/test_download_repository.json (1)
`153-153`: The addition of the "dev" configuration setting is consistent and appropriate across the system configuration.
tests/snapshots/hacs-test-org/plugin-basic/test_download_repository.json (1)
`153-153`: The addition of the "dev" configuration setting is consistent and appropriate across the system configuration.
tests/snapshots/hacs-test-org/template-basic/test_download_repository.json (1)
`154-154`: The addition of the "dev" configuration setting is consistent and appropriate across the system configuration.
tests/snapshots/hacs-test-org/integration-basic/test_update_repository_entity.json (1)
`156-156`: The addition of the "dev" configuration setting is consistent and appropriate across the system configuration.
tests/snapshots/hacs-test-org/integration-basic/test_download_repository.json (1)
`157-157`: The addition of the `"dev": true` setting in the configuration should be verified to ensure it aligns with the intended changes in this PR, especially since the PR focuses on removing experimental paths.
Verification successful --- The addition of the `"dev": true` setting in the configuration is consistent with the PR objectives and is used across multiple test snapshot files. - The `"dev": true` setting appears in various JSON snapshot files within the `tests/snapshots` directory, indicating it is a standard configuration for testing purposes.
Scripts Executed The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify the usage of the "dev" configuration setting across the codebase. # Test: Search for the "dev" configuration setting. Expect: Usage consistent with PR objectives. rg --type json '"dev": true' ``` Length of output: 4049
custom_components/hacs/websocket/repositories.py (1)
`73-73`: The removal of the experimental check in the repository listing function aligns with the PR's objectives to simplify the code by removing non-experimental paths. Good simplification.
custom_components/hacs/__init__.py (1)
`33-34`: Defining a `PLATFORMS` constant is a good practice as it centralizes the platform definitions, making the code more maintainable and less error-prone.
custom_components/hacs/repositories/integration.py (1)
`49-49`: The addition of logic to create a restart-required issue if a restart is pending enhances user experience by ensuring users are informed about the need to restart to apply changes.
custom_components/hacs/utils/data.py (1)
`88-88`: The removal of the `_async_store_experimental_content_and_repos` method aligns with the PR's objectives to remove experimental paths and simplifies the data handling logic.
scripts/data/generate_category_data.py (1)
`344-355`: The implementation of `async_github_get_hacs_default_file` correctly handles cases where the GitHub API returns `None`. The use of `json_loads` and `decode_content` for processing the response data is appropriate.
custom_components/hacs/base.py (2)
`755-755`: The changes in `set_active_categories` method are appropriate. The warning about NetDaemon being deprecated is clear and provides useful guidance. --- Line range hint `932-960`: The implementation of `async_handle_removed_repositories` method is robust. It correctly identifies and handles removed repositories, and the use of `async_create_issue` to notify users is appropriate.
custom_components/hacs/repositories/base.py (2)
`615-625`: The retention of this experimental download logic aligns with the PR's objective to remove non-experimental code paths. This ensures that the experimental features remain functional while the non-experimental paths are cleaned up. --- `722-722`: The handling of both uppercase and lowercase variants of 'readme' enhances compatibility and robustness in file handling across different systems. Good job maintaining comprehensive coverage for potential filename cases.
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.