diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4a6ad5..b7d4097 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,3 +14,5 @@ repos: exclude: "{{ cookiecutter.package_name }}" - id: debug-statements exclude: "{{ cookiecutter.package_name }}" +ci: + autofix_prs: false diff --git a/{{ cookiecutter.package_name }}/.codespellrc b/{{ cookiecutter.package_name }}/.codespellrc new file mode 100644 index 0000000..042a14e --- /dev/null +++ b/{{ cookiecutter.package_name }}/.codespellrc @@ -0,0 +1,13 @@ +[codespell] +skip = *.asdf,*.fits,*.fts,*.header,*.json,*.xsh,*cache*,*egg*,*extern*,.git,.idea,.tox,_build,*truncated,*.svg,.asv_env,.history +ignore-words-list = + alog, + nd, + nin, + observ, + ot, + te, + upto, + afile, + precessed, + precess diff --git a/{{ cookiecutter.package_name }}/.isort.cfg b/{{ cookiecutter.package_name }}/.isort.cfg new file mode 100644 index 0000000..e3ad818 --- /dev/null +++ b/{{ cookiecutter.package_name }}/.isort.cfg @@ -0,0 +1,16 @@ +[settings] +balanced_wrapping = true +skip = + docs/conf.py, + {{ cookiecutter.module_name }}/__init__.py, +default_section = THIRDPARTY +include_trailing_comma = true +known_astropy = astropy, asdf +known_sunpy = sunpy +known_first_party = {{ cookiecutter.module_name }} +length_sort = false +length_sort_sections = stdlib +line_length = 110 +multi_line_output = 3 +no_lines_before = LOCALFOLDER +sections = STDLIB, THIRDPARTY, ASTROPY, SUNPY, FIRSTPARTY, LOCALFOLDER diff --git a/{{ cookiecutter.package_name }}/.pre-commit-config.yaml b/{{ cookiecutter.package_name }}/.pre-commit-config.yaml index a3fed62..1f19f5c 100644 --- a/{{ cookiecutter.package_name }}/.pre-commit-config.yaml +++ b/{{ cookiecutter.package_name }}/.pre-commit-config.yaml @@ -5,6 +5,11 @@ repos: hooks: - id: ruff args: ["--fix"] + - repo: https://github.com/PyCQA/isort + rev: 5.13.2 + hooks: + - id: isort + exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|{{ cookiecutter.module_name }}/extern)$" - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -20,6 +25,11 @@ repos: exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|.json)$|^CITATION.rst$" - id: mixed-line-ending exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*)$" + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + args: [ "--write-changes" ] ci: autofix_prs: false autoupdate_schedule: "quarterly"