MAINT: Use `spin lint` in CI by ganesh-k13 · Pull Request #25103 · numpy/numpy · GitHub
Skip to content

MAINT: Use spin lint in CI#25103

Merged
mattip merged 2 commits into
numpy:mainfrom
ganesh-k13:ci_24080_1
Feb 3, 2026
Merged

MAINT: Use spin lint in CI#25103
mattip merged 2 commits into
numpy:mainfrom
ganesh-k13:ci_24080_1

Conversation

@ganesh-k13

@ganesh-k13 ganesh-k13 commented Nov 10, 2023

Copy link
Copy Markdown
Member

Changes

  • use spin lint for CI
  • use spin notes for CI

Testing

Notes

@ganesh-k13 ganesh-k13 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Need to add spin as a lint requirement now. Would it make sense to merge linter_requirements.txt with build_requirements.txt now? Since lint checks should technically be part of the development workflow?

@mattip

mattip commented Nov 11, 2023

Copy link
Copy Markdown
Member

@rgommers

Copy link
Copy Markdown
Member

+1 for keeping separate, build_requirements is for building and is used a fair amount. linting is only done in 1-2 jobs. no need to install unnecessary linting tools in regular CI jobs.

@ganesh-k13

ganesh-k13 commented Nov 14, 2023

Copy link
Copy Markdown
Member Author

Thanks for the inputs folks, I have modified the requirements to include spin.

Testing:

Comment thread linter_requirements.txt Outdated
@ganesh-k13 ganesh-k13 force-pushed the ci_24080_1 branch 2 times, most recently from f172c7f to 79e72dd Compare December 7, 2023 12:42
@ganesh-k13 ganesh-k13 requested a review from seberg December 8, 2023 11:16
@mattip

mattip commented Jan 26, 2026

Copy link
Copy Markdown
Member

@ganesh-k13 will you be continuing with this? There are merge conflicts

@ganesh-k13

Copy link
Copy Markdown
Member Author

Yeah, I'll look into it to see if it's still a valid enhancement this week.

@ganesh-k13 ganesh-k13 marked this pull request as draft January 30, 2026 06:43
@ganesh-k13 ganesh-k13 force-pushed the ci_24080_1 branch 2 times, most recently from e6c5b07 to 07ea700 Compare January 30, 2026 08:34
- use `spin lint` for CI
- use `spin notes` for CI
Comment thread numpy/conftest.py Outdated
@ganesh-k13

Copy link
Copy Markdown
Member Author

Circle CI is passing as well

@ganesh-k13 ganesh-k13 marked this pull request as ready for review January 30, 2026 09:04
@ganesh-k13 ganesh-k13 requested a review from mattip February 2, 2026 11:32
Comment thread .circleci/config.yml Outdated
. venv/bin/activate
VERSION=$(pip show numpy | grep Version: | cut -d ' ' -f 2 | cut -c 1-5)
spin notes --version-override $VERSION

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think spin docs creates the release notes, no?

@ganesh-k13 ganesh-k13 Feb 3, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I did a simple check:

$ spin docs -j8
Invoking `build` prior to building docs:
$ /<>/Documents/os/np-test/bin/python3 vendored-meson/meson/meson.py compile -C build
INFO: autodetecting backend as ninja
...

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
$ spin notes
Generating release notes for NumPy 2.5.0.dev0
Reading upcoming changes from doc/release/upcoming_changes/
$ towncrier build --version 2.5.0.dev0 --yes
Loading template...
Finding news fragments...
Rendering news fragments...
...

$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	deleted:    doc/release/upcoming_changes/29536.deprecation.rst
	deleted:    doc/release/upcoming_changes/30181.deprecation.rst
	deleted:    doc/release/upcoming_changes/30340.expired.rst
	deleted:    doc/release/upcoming_changes/30381.new_feature.rst
	deleted:    doc/release/upcoming_changes/30460.expired.rst
	deleted:    doc/release/upcoming_changes/30461.expired.rst
	deleted:    doc/release/upcoming_changes/30462.expired.rst
	deleted:    doc/release/upcoming_changes/30463.expired.rst
	deleted:    doc/release/upcoming_changes/30467.expired.rst
	deleted:    doc/release/upcoming_changes/30480.typing.rst
	deleted:    doc/release/upcoming_changes/30489.compatibility.rst
	deleted:    doc/release/upcoming_changes/30517.performance.rst
	deleted:    doc/release/upcoming_changes/30538.change.rst
	deleted:    doc/release/upcoming_changes/30566.typing.rst
	deleted:    doc/release/upcoming_changes/30604.expired.rst
	deleted:    doc/release/upcoming_changes/30605.deprecation.rst
	deleted:    doc/release/upcoming_changes/30610.expired.rst
	deleted:    doc/release/upcoming_changes/30612.expired.rst
	deleted:    doc/release/upcoming_changes/30613.expired.rst
	deleted:    doc/release/upcoming_changes/30614.expired.rst
	deleted:    doc/release/upcoming_changes/30644.deprecation.rst
	deleted:    doc/release/upcoming_changes/30653.new_feature.rst
	deleted:    doc/release/upcoming_changes/30707.change.rst

The release notes are not getting generated in spin docs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But this is interesting

numpy/.spin/cmds.py

Lines 115 to 117 in dd6a3ad

# Run towncrier without staging anything for commit. This is the way to get
# release notes snippets included in a local doc build.
cmd = ['towncrier', 'build', '--version', '2.x.y', '--keep', '--draft']
. let me dig a bit more

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok so --keep and --draft (ref) does not write to the output files. But it gets the checks done and will fail if there are errors. So we can remove this.

@mattip mattip changed the title ENH: Use new spin commands for CI MAINT: Use new spin commands for CI Feb 3, 2026
@mattip mattip changed the title MAINT: Use new spin commands for CI MAINT: Use spin lint in CI Feb 3, 2026
@mattip mattip merged commit 64789dd into numpy:main Feb 3, 2026
73 of 75 checks passed
@mattip

mattip commented Feb 3, 2026

Copy link
Copy Markdown
Member

sabasiddique1 pushed a commit to sabasiddique1/numpy that referenced this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants