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

Files removed by spin docs --clean isn't configurable for meson #156

Closed
ngoldbaum opened this issue Jan 24, 2024 · 7 comments · Fixed by #199
Closed

Files removed by spin docs --clean isn't configurable for meson #156

ngoldbaum opened this issue Jan 24, 2024 · 7 comments · Fixed by #199

Comments

@ngoldbaum
Copy link
Contributor

It would be nice to specify more folders to remove here:

spin/spin/cmds/meson.py

Lines 625 to 631 in c32217e

if clean:
doc_dirs = [
"./doc/build/",
"./doc/source/api/",
"./doc/source/auto_examples/",
"./doc/source/jupyterlite_contents/",
]

ideally without copy/pasting the command into numpy's spin config.

@ngoldbaum ngoldbaum changed the title Files removed by docs build --clean isn't configurable for meson Files removed by spin docs --clean isn't configurable for meson Jan 24, 2024
@stefanv
Copy link
Member

stefanv commented Jan 25, 2024

So, a configuration variable?

spin.build.dirty = [...]

@ngoldbaum
Copy link
Contributor Author

For the docs build, yes. This is to handle generated docs from autosummary, which in my experience tends to end up in a generated folder in the docs source, and that path is going to be different from project to project.

@rgommers
Copy link
Contributor

Seems reasonable to me. The expanding config in pyproject.toml is not ideal, so if this keeps happening it'd be nice to have this:

[tool.spin]
package = 'numpy'
config = '.spin/config.toml'

@stefanv
Copy link
Member

stefanv commented Jan 25, 2024

We can add the ability to choose config names. Note that a spin-specific config is already supported.

@stefanv
Copy link
Member

stefanv commented Jan 25, 2024

Another option is a more generic mechanism which allows you to override the default keyword arguments. That way you can send in options that are not supported by flags, but can be specified as function arguments (since spin is just a glorified function caller).

@rgommers
Copy link
Contributor

Note that a spin-specific config is already supported.

Ah, I missed that, thanks for pointing it out. It's this one line in the README: Settings are stored in .spin.toml, spin.toml, or your project's pyproject.toml.

I kinda still like my suggestion: have an "entry point" in pyproject.toml, which then points at the actual place where the config is stored. The problem with fully separate files is discoverability; the problem with everything in pyproject.toml is that it quickly turns messy (e.g., in NumPy's pyproject.toml, the sections for towncrier, cibuildwheel and spin are all quite verbose).

Of course, the separate file could also simply be pointed to with a code comment in pyproject.toml, so probably we're fine as is.

@stefanv
Copy link
Member

stefanv commented Jan 30, 2024

I'd be happy with having it as a configuration option too; whatever is useful :)

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 a pull request may close this issue.

3 participants