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 argus-htmx files to correct place in the argus-server tree #955

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

hmpf
Copy link
Contributor

@hmpf hmpf commented Nov 26, 2024

This depends on #952

If you have the frontend working with the argus_htmx standalone app, change "argus_htmx" to "argus.htmx" in your local settings file. If you have fiddled with the tailwind settings, also make sure to replace "argus_htmx" in file paths with "argus/htmx".

@hmpf hmpf force-pushed the move-argus-htmx-to-correct-place branch from bb1b7ba to af722e9 Compare November 26, 2024 07:11
@hmpf hmpf mentioned this pull request Nov 26, 2024
7 tasks
@hmpf hmpf force-pushed the move-argus-htmx-to-correct-place branch from 740dada to 6cf138d Compare November 26, 2024 12:17
@hmpf hmpf self-assigned this Nov 26, 2024
@hmpf hmpf added refactor documentation Improvements or additions to documentation frontend Has/needs companion issue in frontend enhancement New feature or request priority: high dependencies Run `tox -r` before testing locally, dependencies have changed HTMx Views, urls, templates... labels Nov 26, 2024
Copy link
Collaborator

@elfjes elfjes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 👍

@hmpf hmpf force-pushed the move-argus-htmx-to-correct-place branch from 2975ca5 to fd838a0 Compare November 27, 2024 06:56
src/argus/htmx/static/logo_white.svg Outdated Show resolved Hide resolved
src/argus/htmx/themes/utils.py Show resolved Hide resolved
Comment on lines +47 to +48
# OS specific
src/argus/htmx/tailwindtheme/tailwindcss
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps make it more clear that this is an optional executable that may be put there

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah need to check with @podliashanyk if this needs to be in the package or not. We might have to publish a wheel per platform. Not a problem to be solved this week!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it should be packaged. It's a development tool for creating the styles.css (which is included in the package)

Copy link
Contributor

@stveit stveit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got htmx frontend up and running with this and seems to be working fine

@hmpf hmpf marked this pull request as ready for review November 28, 2024 09:02
Improve some of the docs mentioning urls.py for readability.
.. with some changes because setuptools uses .gitignore to decide what
files to include in the package while flit does not.
(Why weren't there automated complaints about this before?)
Set ROOT_URLCONF to path+"root_urls" instead of path+"urls" so that
urls.py can be dedicated only to the endpoints added by the app
argus_htmx depends on both django_htmx and widget_tweaks so let's load it
at the end to underline that fact.
@hmpf hmpf force-pushed the move-argus-htmx-to-correct-place branch from d09d608 to ff04c77 Compare November 28, 2024 09:04
@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 21.66667% with 47 lines in your changes missing coverage. Please review.

Project coverage is 75.91%. Comparing base (433a93a) to head (7c9cd25).

Files with missing lines Patch % Lines
src/argus/htmx/urls.py 0.00% 12 Missing ⚠️
src/argus/spa/urls.py 0.00% 4 Missing ⚠️
src/argus/htmx/root_urls.py 0.00% 3 Missing ⚠️
src/argus/htmx/themes/views.py 0.00% 3 Missing ⚠️
src/argus/htmx/user/views.py 0.00% 3 Missing ⚠️
src/argus/spa/root_urls.py 0.00% 3 Missing ⚠️
src/argus/spa/spa_urls.py 0.00% 3 Missing ⚠️
src/argus/htmx/destinations/urls.py 0.00% 2 Missing ⚠️
src/argus/htmx/incidents/views.py 0.00% 2 Missing ⚠️
src/argus/htmx/notificationprofiles/urls.py 0.00% 2 Missing ⚠️
... and 8 more

❗ There is a different number of reports uploaded between BASE (433a93a) and HEAD (7c9cd25). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (433a93a) HEAD (7c9cd25)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #955      +/-   ##
==========================================
- Coverage   82.97%   75.91%   -7.07%     
==========================================
  Files          99      132      +33     
  Lines        4330     4874     +544     
==========================================
+ Hits         3593     3700     +107     
- Misses        737     1174     +437     

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

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still trying to get this to run from scratch on my machine. Until I do, here's the first tiny thing I noticed ;)

docs/development/howtos/federated-logins.rst Outdated Show resolved Hide resolved
Comment on lines +115 to +121
Example, top of settings-file for development::

from argus.site.settings.dev import *
from argus.site.utils import update_settings
from argus.htmx.appconfig import APP_SETTINGS

update_settings(globals(), APP_SETTINGS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I tried this, but it doesn't seem to actually update my urlconfig, so the htmx frontend is still "missing" from the server. What am I misunderstanding about these instructions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AH, missing a line.

Copy link

sonarcloud bot commented Nov 28, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Run `tox -r` before testing locally, dependencies have changed documentation Improvements or additions to documentation enhancement New feature or request frontend Has/needs companion issue in frontend HTMx Views, urls, templates... priority: high refactor
Projects
Status: Changes requested
Development

Successfully merging this pull request may close these issues.

5 participants