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

Refactor cookiecutter hooks and tests #18

Merged
merged 8 commits into from
May 25, 2021
Merged

Refactor cookiecutter hooks and tests #18

merged 8 commits into from
May 25, 2021

Conversation

ESKYoung
Copy link
Collaborator

@ESKYoung ESKYoung commented Feb 11, 2021

Summary

  • Refactor all the cookiecutter hooks and tests for clarity, and testability.
  • Move departmental frameworks into a separate .govcookiecutter folder for clarity; this folder is deleted post-generation
  • Add documentation around contributing department frameworks
  • Add pre-generation hook to test for a valid email (based on HTML5 form specification)
  • Add default AQA documents in case a departmental framework is not selected

Checklists

This pull/merge request meets the following requirements:

  • Code runs
  • Developments are secure and ethical
  • You have made proportionate checks that the code works correctly
  • Test suite passes
  • Minimum usable documentation written in the docs folder

Comments have been added below around the incomplete checks.

@avisionh avisionh mentioned this pull request Feb 25, 2021
1 task
Base automatically changed from master to main February 26, 2021 15:22
@ESKYoung ESKYoung mentioned this pull request Apr 19, 2021
Eric Young added 7 commits April 27, 2021 13:32
coverage ignores `if __name__ == .__main__.:` statements. flake8
ignores unused imports in `__init__.py` files only. pytest now does not
collect anything in the `example` folder. Sphinx can now import
`hooks`, and `src` packages directly as they have been added to the
system path.
Also ignore the `api` folder in each `docs/reference` folder, as the
Sphinx `autosummary` extension will create docstring ReStructuredText
files here.
Moved to a new folder called `.govcookiecutter` within the template
folder. Also add default AQA documents to the template.
Refactor functions for testability, and use pathlib. Write unit and
integration tests to ensure functions operate as expected.

As the frameworks now include request templates as well as AQA,
re-label the corresponding `cookiecutter.json` variable.
@ESKYoung
Copy link
Collaborator Author

Rebased onto the latest main to ensure changes are up-to-date.

Instead declare the `__all__` variable as stated by flake8's maintainer:
https://stackoverflow.com/a/59438802
Copy link

@maxf maxf left a comment

Choose a reason for hiding this comment

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

Looks good to me. No need to act upon comments.

@ESKYoung ESKYoung merged commit 03b3aae into main May 25, 2021
@ESKYoung ESKYoung deleted the refactor_hooks branch May 25, 2021 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants