Skip to content

Commit

Permalink
Update {{ cookiecutter.package_name }}/.github/workflows/sub_package_…
Browse files Browse the repository at this point in the history
…update.yml

Co-authored-by: Stuart Mumford <[email protected]>
  • Loading branch information
CyclingNinja and Cadair committed Jan 19, 2024
1 parent 84614fa commit 949e71d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"short_description": "",
"author_name": "",
"author_email": "",
"project_url": "",
"license": [
"BSD 3-Clause",
"GNU GPL v3+",
"Apache Software License 2.0",
"BSD 2-Clause",
"Other"
],
"project_url": "",
"minimum_python_version": [
"3.9",
"3.10",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update SunPy Sub Packages
name: Automatic Update from package template
permissions:
contents: write
pull-requests: write
Expand All @@ -17,13 +17,13 @@ jobs:
- add-paths: .
body: Use this to merge the changes to the repo
branch: cruft/update
commit-message: "SunPy package template update"
title: New Updates to SunPy Template
commit-message: "Automate package template update"
title: Incoming updates from package template
- add-paths: .cruft.json
body: Use this to reject changes in the repo
branch: cruft/reject
commit-message: "Chore: reject this cruft update"
title: Reject new SunPy template updates
title: Reject new updates from package template

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -52,10 +52,9 @@ jobs:
- name: Run update if available
if: steps.check.outputs.has_changes == '1'
# this needs to be sunpy details I think?
run: |
git config --global user.email ""
git config --global user.name "SunPy Org"
git config --global user.email "[email protected]"
git config --global user.name "Gromit"
cruft update --skip-apply-ask --refresh-private-variables
git restore --staged
Expand All @@ -73,5 +72,5 @@ jobs:
title: ${{ matrix.title }}
body: |
This is an autogenerated PR. ${{ matrix.body }}
[Cruft](https://cruft.github.io/cruft/) has detected updates from the SunPy Package Template
[Cruft](https://cruft.github.io/cruft/) has detected updates from the Package Template
8 changes: 4 additions & 4 deletions {{ cookiecutter.package_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ requires = [
"setuptools>=62.1",
"setuptools_scm[toml]>=6.2",
"wheel",
{% if cookiecutter.use_compiled_extensions == 'y' %}
{%- if cookiecutter.use_compiled_extensions == 'y' %}
"extension-helpers",
"oldest-supported-numpy",
"cython"
{% endif %}
{% endif -%}
]
build-backend = "setuptools.build_meta"

Expand All @@ -17,11 +17,11 @@ description = "{{ cookiecutter.short_description }}"
readme = "README.rst"
requires-python = ">={{ cookiecutter.minimum_python_version }}"
license = { file = "licenses/LICENSE.rst", content-type = "text/plain" }
{% if cookiecutter.author_name and cookiecutter.author_email %}
{%- if cookiecutter.author_name and cookiecutter.author_email %}
authors = [
{ name = "{{ cookiecutter.author_name }}", email = "{{ cookiecutter.author_email }}" },
]
{% endif %}
{% endif -%}
dependencies = [
{{ cookiecutter._install_requires }}
]
Expand Down
7 changes: 3 additions & 4 deletions {{ cookiecutter.package_name }}/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from extension_helpers import get_extensions
{% endif -%}

{%- if cookiecutter.use_compiled_extensions == 'y' %}
setup(

setup( {%- if cookiecutter.use_compiled_extensions == 'y' %}
ext_modules=get_extensions()
)
{% endif -%}
{% endif -%} )

0 comments on commit 949e71d

Please sign in to comment.