HHS / simpler-grants-gov

https://simpler.grants.gov
Other
44 stars 13 forks source link

[Task]: Backend Repo Setup #109

Closed widal001 closed 1 year ago

widal001 commented 1 year ago

Summary

Set up the backend portion of the repository with the language decided in #38 and the set of code quality tools selected in #101

User Stories

Acceptance Criteria

Proposed Testing Strategy

  1. Unit tests: Create a test_sample test that simply asserts True or asserts the version number
  2. Manual Tests: Someone who did not contribute to the PR checks out the PR locally, follows the instructions in the README to install the code, run the tests and the code quality checks locally, and all checks/tests pass.
acouch commented 1 year ago

We have the opportunity to utilize a Flask template focused on federal level clients. Some of the features and benefits of this template is:

Steps

Some steps to implement this, given the user stories and acceptance criteria above, include:

daphnegold commented 1 year ago

Breaking off pre-commit hooks into a separate issue. There's a lot going on in here and the current tool configured in the repo won't suit our needs. Might break off other things. @widal001 are you okay with whoever picks up the pre-commit hook issue making an executive decision around what tool to use, or do we want an ADR?

Ideas: Github Actions locally, Make something or other, Husky, can pre-commit be configured with custom commands?

EDIT: I was totally off, on further inspection of the documentation of pre-commit, it allows for creation of custom hooks in multiple languages. Modified the issue to configure the pre-commit hook because it's still just a nice to have.

223

daphnegold commented 1 year ago

Regarding security decisions made in the back-end tooling ADR, we decided to use a package called Safety for vulnerability checks. After doing the front-end tooling ADR, a tool called Renovate was suggested there. Renovate also supports Python. I'm going to hold off on installing Safety for now, because I think for consistency it might be preferable to use Renovate bot in the back-end as well? Thoughts? Can always go in and edit the ADR.

If we only want to run Renovate for vulnerability/security updates: https://github.com/renovatebot/renovate/discussions/15490

EDIT: Offline discussed with @widal001 to also include Safety and then we can figure out if we need it later because it's not adding any value.

Will be configured as quick follow: #239

daphnegold commented 1 year ago

A PR is blocked from merging if any of the checks above fail

I will need adult supervision (Github admin) for this and it will have to be a post-merge follow up. As far as I'm aware this is a setting in Github. :D

daphnegold commented 1 year ago

Commit formatting (preferably conventional commit)

The dev team is meeting to discuss how we would like to handle commits, so this can be a fast follow.

daphnegold commented 1 year ago

Configure license checks pulled into a separate task. Need to make sure that the chosen package pip-licenses will allow us to fail automated checks or if we need another package.

238

daphnegold commented 1 year ago

Remove v1/users endpoints, as we don't have that endpoint identified

Decided to leave these as reference and a starting point to modify to build our new endpoints since team is learning Python and Flask.