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

🔧 Created Makefile and updated README #535

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

Conversation

jeofo
Copy link
Member

@jeofo jeofo commented Oct 27, 2023

No description provided.

@jeofo jeofo requested a review from AaDalal October 27, 2023 21:38

[//]: # ( )

[//]: # (- Finally, run `psql -h localhost -d postgres -U penn-courses -f pcx_test.sql` (replacing `pcx_test.sql` with the full path to that file on your computer) to load)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it formatted like this ?

# Commands
runserver:
PIPENV_VERBOSITY=-1
pipenv run python manage.py runserver 0.0.0.0:8000
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, but why not just use 127.0.0.1?

@@ -9,6 +9,10 @@ Welcome to the Penn Courses Backend (PCX)!

### Running the Backend with Docker-Compose
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move the local dev environment thing to the top, and move down Running the backend with Docker-Compose.

3. `python manage.py migrate`

5. Loading test data (if you are a member of Penn Labs). If you are not a member of Penn Labs, you can skip this section and load in course data from the registrar, as explained below.
4. Migrate Django models
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I think using make for simple things like migrate/makemigrations could end up being a leaky abstraction as we will not provide make commands for all the commands they might run (e.g., management commands or manage.py shell).

IMO, I think we should add make commands for the installation, but otherwise ask people to use python manage.py xxx.

python manage.py migrate

# Lint
lint:
Copy link
Contributor

Choose a reason for hiding this comment

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

make lint is useful

backend/Makefile Outdated
python manage.py makemigrations

# Migrate (when migrations are created)
migrate:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should abstract away the python manage.py xxx commands (see my comment on the readme)

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

Successfully merging this pull request may close these issues.

2 participants