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

Move LXD and LXDVM to checkbox-support (New) #1645

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

pedro-avalos
Copy link
Collaborator

Description

Moved LXD and LXDVM (introduced by #1577) to checkbox-support.

Resolved issues

Resolves CHECKBOX-1696

Documentation

Tests

  • Moved unit tests to checkbox-support.

@pedro-avalos pedro-avalos added the enhancement New feature or request label Dec 9, 2024
@pedro-avalos pedro-avalos self-assigned this Dec 9, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 48.88%. Comparing base (e2b812d) to head (2825ed7).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
checkbox-support/checkbox_support/lxd_support.py 94.96% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1645      +/-   ##
==========================================
+ Coverage   48.85%   48.88%   +0.02%     
==========================================
  Files         370      372       +2     
  Lines       40234    40245      +11     
  Branches     6794     6793       -1     
==========================================
+ Hits        19657    19674      +17     
+ Misses      19857    19850       -7     
- Partials      720      721       +1     
Flag Coverage Δ
checkbox-support 61.93% <94.96%> (+0.92%) ⬆️
provider-gpgpu 90.86% <100.00%> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pedro-avalos pedro-avalos requested a review from Hook25 December 9, 2024 22:12
@pedro-avalos
Copy link
Collaborator Author

pedro-avalos commented Dec 9, 2024

Mr. @Hook25 It seems the cached_property comes from the plainbox module. It seems checkbox-support currently does not have plainbox as a dependency... I'm not completely sure how to proceed with this.

@Hook25
Copy link
Collaborator

Hook25 commented Dec 10, 2024

feel free to duplicate the implementation, we don't want checkbox-support to depend on plainbox. Also consider using the builtin one

try: 
    from functools import cached_property
except ImportError:
    class cached_property:
        """
        Decorator that converts a method with a single self argument into a
        property cached on the instance.
        See https://goo.gl/QgJYks (django cached_property)
        """

        def __init__(self, func):
            self.func = func

        def __get__(self, instance, type=None):
            if instance is None:
                return self
            res = instance.__dict__[self.func.__name__] = self.func(instance)
            return res

@pedro-avalos pedro-avalos marked this pull request as ready for review December 10, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants