Skip to content

Refresh css on building package#1714

Open
hmpf wants to merge 3 commits intomainfrom
add-packaging-step-for-css
Open

Refresh css on building package#1714
hmpf wants to merge 3 commits intomainfrom
add-packaging-step-for-css

Conversation

@hmpf
Copy link
Contributor

@hmpf hmpf commented Jan 13, 2026

Scope and purpose

Fixes #1712

For this to work, "tailwindcss" must be in PATH. How to set PATH is OS and distro dependent.

This pull request

  • adds/changes/removes a dependency

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.

  • Added a changelog fragment for towncrier
  • [ ] Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • [ ] Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • [ ] If this results in changes in the UI: Added screenshots of the before and after
  • [ ] If this results in changes to the database model: Updated the ER diagram

@hmpf hmpf requested review from a team and Simrayz January 13, 2026 12:24
@hmpf hmpf self-assigned this Jan 13, 2026
@hmpf hmpf added packaging Affecting how to build packages for PyPI needs NOTES NOTES.md must be updated for release labels Jan 13, 2026
@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Test results

    6 files    810 suites   1m 36s ⏱️
  638 tests   637 ✅ 1 💤 0 ❌
3 828 runs  3 822 ✅ 6 💤 0 ❌

Results for commit 6062b9e.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.22%. Comparing base (91decd0) to head (6062b9e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1714   +/-   ##
=======================================
  Coverage   80.22%   80.22%           
=======================================
  Files         133      133           
  Lines        6271     6271           
=======================================
  Hits         5031     5031           
  Misses       1240     1240           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Simrayz
Copy link
Contributor

Simrayz commented Jan 13, 2026

Is this change for the build pipeline only, or will you run git rm --cached so we have to run make tailwind (or tailwind-watch) at least once?

@hmpf hmpf moved this from 📋 Backlog to ❓ Ready for review in Argus development, public Jan 13, 2026
@hmpf
Copy link
Contributor Author

hmpf commented Jan 13, 2026

This is for the build pipeline only. Note that the "tailwind" rule in the Makefile has changed to once again have tailwindcss in path, not in a subdirectory of src/argus/. So we would need to document the need for putting it in $PATH.

@hmpf
Copy link
Contributor Author

hmpf commented Jan 13, 2026

I was thinking I'd only build on change with proper Makefile magic but for a build artifact it is always OK to build it fresh for every version.

When running pyproject-build, it will update the file, leave the update in the tree, and include the file in the package.

When I build packages I do it in a clean repo where no watchers are running, for various paranoid reasons.

@hmpf hmpf added the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Jan 14, 2026
@hmpf hmpf force-pushed the add-packaging-step-for-css branch from acceefe to 046e44f Compare January 14, 2026 09:42
@hmpf hmpf force-pushed the add-packaging-step-for-css branch from 046e44f to b82c23b Compare January 15, 2026 08:52
Copy link
Contributor

@Simrayz Simrayz left a comment

Choose a reason for hiding this comment

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

The modified/new rules don't really work for me (on macOS) due to naming/version conflicts. Is the build environment different in this regard?

tailwindcli:
@which tailwind || echo "tailwindcss not in path"

tailwind: tailwindcli
Copy link
Contributor

Choose a reason for hiding this comment

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

After removing the $(TAILWINDDIR)/ prefix, it no longer uses the specific version for this project. My global tailwindcss is version 4, while the repo uses tailwind 3, so I get an error when trying to run make build. I think the build pipeline should also use make upgrade-tailwind or at least make sure to install the current defined version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, but this doesn't do anything to the one in $PATH

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How does macOS handle $PATH?

@github-project-automation github-project-automation bot moved this from ❓ Ready for review to ♻ Changes requested in Argus development, public Jan 15, 2026
@hmpf hmpf moved this from ♻ Changes requested to 👀 Review in progress in Argus development, public Jan 15, 2026
@hmpf hmpf moved this from 👀 Review in progress to ❓ Ready for review in Argus development, public Jan 15, 2026
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI CSS DevEx needs NOTES NOTES.md must be updated for release nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) packaging Affecting how to build packages for PyPI

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

Ignore styles.css and move to build step

2 participants