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

Update makefile, auto-help and better serve #4109

Merged
merged 5 commits into from
Sep 9, 2024
Merged

Update makefile, auto-help and better serve #4109

merged 5 commits into from
Sep 9, 2024

Conversation

theskumar
Copy link
Member

@theskumar theskumar commented Aug 25, 2024

  • The current make -j parallelization doesn't kill the remaining process when one of them errors out, the causes confusion if let's css/js is not building.

  • This PR also refractors the help target to use comment based generator which is more maintainable.

  • Update the node scripts to not require collectstatic during development, the runserver -> static server can find all the all files from packages and serve them on demand.

  • make serve now also installs python & node packages and builds the static_src if they are outdated.

@theskumar theskumar self-assigned this Aug 25, 2024
@theskumar theskumar requested review from frjo and wes-otf August 25, 2024 16:11
@theskumar
Copy link
Member Author

@frjo thanks for the quick review, I've update the PR with a bigger refractor to

  • Not require collect static during development, the runserver -> static server can find all the all files from packages and serve them on demand.
  • make serve now also installs python & node package and builds the static_src if they are outdated.

@theskumar theskumar requested a review from frjo August 25, 2024 19:13
@frjo frjo added Type: Maintenance Type: Patch Mini change, used in release drafter labels Aug 26, 2024
Makefile Outdated Show resolved Hide resolved
Makefile Outdated
$(MAKE) -j3 watch serve-django serve-docs
serve: .cache/tandem .cache/py-packages .cache/dev-build ## Run Django and docs preview server, also watch and compile frontend changes
@.cache/tandem \
'python manage.py runserver 0.0.0.0:$(DJANGO_PORT) --settings=$(DJANGO_SETTINGS_MODULE)' \
Copy link
Member

Choose a reason for hiding this comment

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

Switch to runserver_plus? We already have "Werkzeug" installed. Nice error handling!

Should we also switch to 127.0.0.1 instead of 0.0.0.0? Do devs ever access the server from other devices on the LAN?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can switch to 127.0.0.1, generally it's useful to test on phone, and I had that as default. I rarely use it, so I think it's safe to switch.

Copy link
Member Author

Choose a reason for hiding this comment

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

For runserver_plus I think we can.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated both

theskumar and others added 5 commits September 9, 2024 09:16
The current make -j parallelization doesn't kill the remaining process
when one of them errors out, the causes confusion if let's css/js is not
building.

This PR also refractors the help target to use comment based generator
which is more maintainable.
Also, remove collectstatic during dev
@frjo frjo merged commit c20578f into main Sep 9, 2024
9 checks passed
@frjo
Copy link
Member

frjo commented Sep 9, 2024

@theskumar I merged this is but added a small change as well. Please test to make sure it works.

I added a address to the port for runserver_plus. This makes the test server link in the terminal clickeble, I find this convenient.

http://127.0.0.1:9001/ instead of http://[127.0.0.1]:9001/

@frjo
Copy link
Member

frjo commented Sep 9, 2024

Also added a way to pick up address set as env var, DJANGO_SERVE_ADDRESS.

theskumar added a commit that referenced this pull request Oct 10, 2024
…pdate-test-packages

* origin/main:
  Fix js error when no proposal field on determination form. (#4147)
  Fix 'Reminder Created' duplicate message, restrict duplicate toast messages (#4126)
  Rename past submission to other submissions (#4143)
  Add content from Hypha site to docs front page. (#4139)
  Lock griffe version, breaking change in v1.x. (#4138)
  Update micromatch. (#4137)
  Added command to delete drafts that haven't been modified in specified days (#4133)
  Updated the sandbox db. (#4135)
  Updated the sandbox db. (#4132)
  Update PAF to Project Form in user facing strings (#4104)
  Add invoice date and paid date to invoice and invoices lists and tables (#4019)
  Added links & icons to wagtail form view `Used By` columns (#4106)
  New submission table view (#4080)
  Update makefile, auto-help and better serve (#4109)
@frjo frjo deleted the improve-makefile branch November 26, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Type: Patch Mini change, used in release drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants