-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Collect edx-platform assets without Paver #31658
Comments
8 tasks
kdmccormick
changed the title
Reimplement asset collection in sh
Reimplement asset collection in bash
Feb 14, 2023
kdmccormick
changed the title
Reimplement asset collection in bash
Collect edx-platform assets without Paver
Feb 21, 2023
github-project-automation
bot
moved this to 📥 New
in Developer Experience Working Group
Feb 21, 2023
kdmccormick
moved this from 📥 New
to 🛠️ In Progress
in Developer Experience Working Group
Feb 21, 2023
kdmccormick
moved this from 🛠️ In Progress
to 📥 New
in Developer Experience Working Group
Feb 24, 2023
Implemented by: #31934 |
kdmccormick
moved this from 📥 New
to 🛠️ In Progress
in Developer Experience Working Group
Mar 15, 2023
kdmccormick
moved this from 🛠️ In Progress
to 👀 In Review
in Developer Experience Working Group
Apr 19, 2023
kdmccormick
added a commit
to kdmccormick/edx-platform
that referenced
this issue
Apr 20, 2023
Django provides the `collectstatic` management command, which collects static assets into the STATIC_ROOT so that they can be served by some system external to Django (like nginx or caddy), as is usually desired in production environments. edx-platform contains several types of files that we don't want to be collected into the STATIC_ROOT. Previously, these files had to be supplied to the manageme nt command using the `--ignore` option: ./manage.py lms collectstatic --ignore geoip --ignore sass ...etc ./manage.py cms collectstatic --ignore geoip --ignore sass ...etc This yields a long, hard-to-remember command. Paver wrapped the command in its big `paver update_assets` task, but that task also builds assets, which is totally overkill when you're just trying to collect them. Fortunately, `collectstatic`'s default ignore patterns can be configured by defining a custom AppConfig class. We define such an config (`EdxPlatformStaticFilesConfig`) for LMS and CMS. Now, devs can collect LMS and CMS assets with just: ./manage.py lms collectstatic ./manage.py cms collectstatic Further reading on collecstatic and --ignore: https://docs.djangoproject.com/en/3.2/ref/contrib/staticfiles/#customizing-the-i gnored-pattern-list Further reading on eschewing Paver: https://github.com/openedx/edx-platform/blob/master/docs/decisions/0017-reimplem ent-asset-processing.rst Closes: openedx#31658
kdmccormick
added a commit
that referenced
this issue
Apr 21, 2023
Adds a tiny `openedx.core.djangoapps.staticfiles` app so that static asset ignore patterns can be coded into configuration rather than supplied on the command line or coded into pavelib. Makes it easier to run static asset collection without Paver. See ADR for details: openedx/core/djangoapps/staticfiles/docs/decisions/0001-purpose-of-app.rst Closes: #31658
github-project-automation
bot
moved this from 👀 In Review
to 🚀 Closed
in Developer Experience Working Group
Apr 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
Part of:
See the "Collect" row in the Commands and Stages table in the ADR.
Subtasks
Notes
None
The text was updated successfully, but these errors were encountered: