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 dev and test configs to streamline developer experience #76

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

AdamHawtin
Copy link
Contributor

@AdamHawtin AdamHawtin commented Jan 14, 2025

What is the context of this PR?

Update the development and test defaults, so that running the app and tests locally works out of the box, without setting additional environment variables. Developing and testing in the docker container should also still work with no addtional steps, as the compose file already overrides the environment variables to its needs.

How to review

  • Check out this branch locally
  • Remove or rename any previous .env files or environment configuration you previously had for native local development
  • Follow the README steps for "Running locally with supporting services in Docker"
  • Try to start the app locally, either from your shell or IDE of choice
  • Check the app runs successfully without you having to configure additional environment variables (other than setting the DJANGO_SETTINGS_MODULE, if you are running by a method other than the make runserver command, as the README says).
  • Run the unit/component tests locally. Note there may be an unrelated issue with running the tests in the parallel locally with the make test command, if this fails with an error try running poetry run coverage run ./manage.py test --shuffle --settings=cms.settings.test instead to run them in series.
  • Stop the locally running app
  • Try running the app and tests in the docker container, following the README instructions, to check the config changes haven't broken that method.

Follow-up Actions

None

@AdamHawtin AdamHawtin added the DX Developer eXperience label Jan 14, 2025
@AdamHawtin AdamHawtin requested a review from a team as a code owner January 14, 2025 13:12
Copy link
Contributor

@nehakerung nehakerung left a comment

Choose a reason for hiding this comment

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

LGTM - followed instructions which worked 🫡

Copy link
Contributor

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

A couple of very minor suggestions, otherwise it works well.

Locally have to use poetry run ./manage.py test ... as make test does fail with AttributeError: 'DatabaseWrapper' object has no attribute '_test_serialized_contents' and while tempting, we have many other tasks to get on with

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@AdamHawtin AdamHawtin requested a review from zerolab January 15, 2025 09:48
Copy link
Contributor

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

This is marked improvement. 👍🏼 from me

@zerolab zerolab requested a review from MebinAbraham January 15, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Developer eXperience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants