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

Chore/68 Initialize Backend #116

Merged
merged 20 commits into from
Feb 2, 2024
Merged

Chore/68 Initialize Backend #116

merged 20 commits into from
Feb 2, 2024

Conversation

joshgamache
Copy link
Contributor

Addresses #68 - Project link
Adds Terraform scripts and Helm charts to run them. Resource states migrated from Terraform Cloud to a Google Cloud Storage bucket.

Changes 🚧

  • Added Python, Black (linting), Pytest, Poetry, and configured Poetry
  • Added Django and Django-Ninja
    • Initialized Django app for Reporting
    • Set up test endpoint
    • Set up basic test for Pytest
  • Added example .env file
  • Added Makefile and developer environment setup instructions

To test 🔬

  • Go to docs/developer-environment-setup.md and follow the directions to set up your developer environment to set up the backend.
  • Start up the local Postgres server and start Django (following directions from the documents).
  • Navigate to localhost:8000/api/docs. It should show the Ninja API documentation for add.
  • Navigate to the localhost:8000/api/add?a=4&b=2 endpoint in your browser. It should display the result of the addition.

Notes📝

  • All of the setups has been done to be consistent with cas-registration. Changes that might have been made later in the backend should be reflected here where it makes sense to get them in at the start.
  • We've been discussing having a single Django project instance across all of BCIERS, but still split into different apps. Will we want to package parts of this backend once we start developing it and add it as a submodule/package in cas-registration?

@joshgamache joshgamache added Task For work that doesn't meet the requirements of a user story Giraffe 🦒 Work related to Team Giraffe labels Jan 30, 2024
@joshgamache joshgamache self-assigned this Jan 30, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

We haven't committed vscode settings in the past...is it a team requirement to use it / to abide by those settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was something that was added through on the cas-registration side. True, I usually have to merge my local settings with the ones coming out of the repo 😆. Might be better added as in the document for a developer to add themselves if needed.


## Pre-Commit

TODO: Add pre-commit
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@pbastia pbastia left a comment

Choose a reason for hiding this comment

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

Looks fantastic! Just a couple of comments for file names

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have the root folder for the server/api side be server or api ? bc_obps might be confusing and have devs mix things up with the registration app
edit: comment below, maybe bc_obps_reporting_api?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this over in 72b568b.

This leads to the question of if/how we'll integrate Django work on Reporting with the deployed Registration server. It's not something I'm familiar with, so I don't even know where to start with it. Probably worth flagging for discussion!

Copy link
Contributor

Choose a reason for hiding this comment

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

For the first setup, let's not get complicated, but agreed, we need to have that discussion sooner than later

bc_obps/bc_obps/settings.py Outdated Show resolved Hide resolved
bc_obps/bc_obps/settings.py Outdated Show resolved Hide resolved
bc_obps/pyproject.toml Outdated Show resolved Hide resolved
@joshgamache joshgamache force-pushed the chore/68-initialize-backend branch from 8177751 to fe98626 Compare February 1, 2024 17:18
@joshgamache joshgamache requested a review from pbastia February 1, 2024 17:29
Copy link
Contributor

@pbastia pbastia left a comment

Choose a reason for hiding this comment

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

One last minor change! fantastic work 👌

Copy link
Contributor

@pbastia pbastia Feb 1, 2024

Choose a reason for hiding this comment

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

the django app is still named bc_obps - which is the same as the registration app, so we'll have a conflict if we ever run them off the same server. We should probably rename that to bc_obps_reporting_api too

docs/developer-environment-setup.md Outdated Show resolved Hide resolved
docs/developer-environment-setup.md Outdated Show resolved Hide resolved
@joshgamache joshgamache force-pushed the chore/68-initialize-backend branch from 72b568b to 50a71a7 Compare February 2, 2024 18:48
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@joshgamache joshgamache requested a review from pbastia February 2, 2024 19:16
@joshgamache joshgamache force-pushed the chore/68-initialize-backend branch from 50a71a7 to 1458e3f Compare February 2, 2024 20:55
Copy link
Contributor

@pbastia pbastia left a comment

Choose a reason for hiding this comment

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

:shipit: nice!

@pbastia pbastia merged commit 5e21267 into develop Feb 2, 2024
5 checks passed
@pbastia pbastia deleted the chore/68-initialize-backend branch February 2, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Giraffe 🦒 Work related to Team Giraffe Task For work that doesn't meet the requirements of a user story
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants