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

Handled Packaging of CSS file right #145

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include cloudwash/assets/css/*.css
Empty file added cloudwash/assets/__init__.py
Empty file.
Empty file.
File renamed without changes.
7 changes: 4 additions & 3 deletions cloudwash/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common utils for cleanup activities of all CRs"""
import importlib.resources
from collections import namedtuple
from datetime import datetime

Expand All @@ -14,9 +15,9 @@
from dominate.tags import tr
from dominate.util import raw

from cloudwash.assets import css
from cloudwash.logger import logger


_vms_dict = {"VMS": {"delete": [], "stop": [], "skip": []}}
_containers_dict = {"CONTAINERS": {"delete": [], "stop": [], "skip": []}}

Expand Down Expand Up @@ -84,8 +85,8 @@ def create_html(**kwargs):
doc = dominate.document(title="Cloud resources page")

with doc.head:
with open('assets/css/reporting.css', 'r') as css:
style(css.read())
with importlib.resources.open_text(css, 'reporting.css') as css_file:
style(css_file.read())

with doc:
with div(cls='cloud_box'):
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from setuptools import setup

setup(
use_scm_version=True,
)
setup(use_scm_version=True, include_package_data=True)
Loading