1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-01 08:26:03 +00:00

chore: remove files nothing uses

- noVNC's own web client (app/ except the bell sounds, vnc.html,
  vnc_lite.html, defaults.json, mandatory.json): the console imports
  only noVNC's core, and novncd serves no web pages. AUTHORS, LICENSE.txt
  and package.json (the version) stay.
- 24 cached icons no {% bs_icon %} asks for; the icon cache test now
  also fails on an icon nothing uses.
- Ace's ext-textarea.js, which nothing loads.
- instances/fixtures/initial_data.json, for an app ("create") that no
  longer exists; migration 0006 seeds the flavors.
- webvirtcloud/asgi.py: gunicorn runs the WSGI application only.
- instances/templatetags/tags_active.py: a copy of common_tags'
  class_active that no template loads.
- .github/linters/.hadolint.yaml, from super-linter, which no workflow
  runs anymore.
This commit is contained in:
catborise 2026-11-06 10:53:37 +03:00
parent 764cbb3c43
commit 3ceca5f9f3
98 changed files with 6 additions and 8712 deletions

View file

@ -1,16 +0,0 @@
"""
ASGI config for webvirtcloud project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webvirtcloud.settings')
application = get_asgi_application()

View file

@ -1,5 +1,6 @@
"""Every {% bs_icon %} of the templates is in the committed icon cache
(webvirtcloud/bootstrap_icons.py): a missing one is an error page."""
(webvirtcloud/bootstrap_icons.py), and the cache holds nothing else: a
missing one is an error page."""
import re
import unittest
@ -17,9 +18,9 @@ KWARG = re.compile(r"""(\w+)=['"]([^'"]*)['"]""")
class IconCacheTestCase(unittest.TestCase):
def test_every_template_icon_is_cached(self):
def test_the_cache_holds_every_template_icon_and_no_other(self):
cache = ICONS
missing = []
missing, used = [], set()
templates = [*BASE.glob("templates/**/*.html"), *BASE.glob("*/templates/**/*.html")]
self.assertGreater(len(templates), 50) # the globs still find the templates
for template in templates:
@ -29,9 +30,11 @@ class IconCacheTestCase(unittest.TestCase):
kw = dict(KWARG.findall(args))
# the file name bs_icon reads
cached = f"{name.group(1)}_{kw.get('size')}_{kw.get('color')}_{kw.get('extra_classes')}.svg".replace(" ", "_")
used.add(cached)
if not (cache / cached).exists():
missing.append(f"{template.relative_to(BASE)}: {cached}")
self.assertEqual(missing, [])
self.assertEqual(sorted({path.name for path in cache.glob("*.svg")} - used), [])
def test_an_icon_is_its_svg_inline(self):
html = Template("{% load bootstrap_icons %}{% bs_icon 'pencil' %}").render(Context())