Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix(pre-com): Comment out safety-dep-chk #50 The pre-commit.ci action is still failing. I have commented the check below out to see if the new failure stops. - repo: https://github.com/Lucas-C/pre-commit-hooks-safety rev: v1.2.1 hooks: - id: python-safety-dependencies-check WIP #50 * chore(pre-commit): Auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(pre-com): Fix unknown escape character #50 Add an escape character to fix yaml check failure. WIP #50 * fix(pre-com): Fix pre-commit errors #50 Some code that did not pass pre-commit checks existed. All pre-commit tests passed locally. closes #50 * fix(pre-com): Comment out safety-dep-chk #50 The pre-commit.ci action is still failing. I have commented the check below out to see if the new failure stops. - repo: https://github.com/Lucas-C/pre-commit-hooks-safety rev: v1.2.1 hooks: - id: python-safety-dependencies-check WIP #50 * fix(codacy): Docstrings comply with PEP257 #50 Several docstrings failed Codacy production tests as not complying with PEP257. WIP #50 * fix(codacy): More docstrings comply PEP257 #50 Several additional docstrings failed Codacy production tests as not complying with PEP257. WIP #50 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
41d893e
commit 9360c7f
Showing
8 changed files
with
157 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
#!/usr/bin/env python | ||
"""cookiecutter-p3-package post package generation jobs.""" | ||
import os | ||
|
||
PROJECT_DIRECTORY = os.path.realpath(os.path.curdir) | ||
|
||
|
||
def remove_file(filepath): | ||
"""Remove files not required for this generated python package.""" | ||
os.remove(os.path.join(PROJECT_DIRECTORY, filepath)) | ||
|
||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
|
||
if '{{ cookiecutter.create_author_file }}' != 'y': | ||
remove_file('AUTHORS.rst') | ||
remove_file('docs/authors.rst') | ||
if "{{ cookiecutter.create_author_file }}" != "y": | ||
remove_file("AUTHORS.rst") | ||
remove_file("docs/authors.rst") | ||
|
||
if 'no' in '{{ cookiecutter.command_line_interface|lower }}': | ||
cli_file = os.path.join('{{ cookiecutter.project_slug }}', 'cli.py') | ||
if "no" in "{{ cookiecutter.command_line_interface|lower }}": | ||
cli_file = os.path.join("{{ cookiecutter.project_slug }}", "cli.py") | ||
remove_file(cli_file) | ||
|
||
if 'Not open source' == '{{ cookiecutter.open_source_license }}': | ||
remove_file('LICENSE') | ||
if "Not open source" == "{{ cookiecutter.open_source_license }}": | ||
remove_file("LICENSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
"""cookiecutter-p3-package pre package generation jobs.""" | ||
|
||
import re | ||
import sys | ||
|
||
MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$" | ||
|
||
MODULE_REGEX = r'^[_a-zA-Z][_a-zA-Z0-9]+$' | ||
|
||
module_name = '{{ cookiecutter.project_slug}}' | ||
MODULE_NAME = "{{ cookiecutter.project_slug}}" | ||
|
||
if not re.match(MODULE_REGEX, module_name): | ||
print('ERROR: The project slug (%s) is not a valid Python module name. Please do not use a - and use _ instead' % module_name) | ||
if not re.match(MODULE_REGEX, MODULE_NAME): | ||
print( | ||
"ERROR: The project slug (%s) is not a valid Python module name.\ | ||
Please do not use a - and use _ instead" | ||
% MODULE_NAME | ||
) | ||
|
||
#Exit to cancel project | ||
sys.exit(1) | ||
# Exit to cancel project | ||
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
alabaster==0.7.12 | ||
cookiecutter>=1.4.0 | ||
cookiecutter==1.4.0 | ||
furo==2021.8.11b42 | ||
myst-parser==0.15.2 | ||
Sphinx==4.1.2 | ||
|
Oops, something went wrong.