Closed widal001 closed 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:
/health
endpointslocal.env
fileSome steps to implement this, given the user stories and acceptance criteria above, include:
api
directory and follow the install stepsci-app.yml
to ci-api.yml
api
folder that includes (Title, local development, testing and other relevant info), linking to docs
api/openapi.generated.yml
to include proper Grants Equity infoapi/pyproject.toml
to include proper Grants Equity infoapi/src/app.py
to include proper Grants Equity infoapi
folder or move to the root documentationv1/users
endpoints, as we don't have that endpoint identifiedBreaking 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.
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
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
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.
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.
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.
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
api/
sub-directory has been created with aREADME
that includes instructions for how to install and run the code in this sub-directoryassert True
) that users can execute to verify they've installed the project correctlyare run before every commitare possible:Commit formatting (preferably conventional commit)Dependency vulnerability checksOpen source license checksProposed Testing Strategy
test_sample
test that simply assertsTrue
or asserts the version number