Skip to content

Commit

Permalink
Handled Packaging of CSS file right
Browse files Browse the repository at this point in the history
  • Loading branch information
jyejare committed Oct 8, 2024
1 parent 8118a3e commit 5661bbf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 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
Expand Up @@ -3,6 +3,7 @@
from datetime import datetime

import dominate
import importlib.resources
import pytz
from dominate.tags import div
from dominate.tags import h1
Expand All @@ -15,7 +16,7 @@
from dominate.util import raw

from cloudwash.logger import logger

from cloudwash.assets import css

_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
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

setup(
use_scm_version=True,
include_package_data=True
)

0 comments on commit 5661bbf

Please sign in to comment.