Skip to content

Commit

Permalink
Merge pull request #145 from jyejare/css_packaging
Browse files Browse the repository at this point in the history
Handled Packaging of CSS file right
  • Loading branch information
jyejare authored Oct 8, 2024
2 parents 8118a3e + 1311130 commit 6d1c1bb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
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)

0 comments on commit 6d1c1bb

Please sign in to comment.