-
Notifications
You must be signed in to change notification settings - Fork 608
feat: make math Lake template follow Mathlib standards #8866
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
Conversation
This PR adds a new `mathlib-dep` template to `lake init` and `lake new` which configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the permissive `lake new ... math` template, this automatically provides: * Strict linting options matching Mathlib. * GitHub workflow for automatic upgrades to newer Lean and Mathlib releases. * Automatic release tagging for toolchain upgrades. * API documentation generated by leanprover/doc-gen4 and hosted on `github.io`. Potential areas for discussion: * Template name. Maybe `mathlib-standard` instead, although this is less succinct? * Should some of these features be added to the `math` template too? (Perhaps every one of these, in disabled form?)
Looks pretty good to me! I think this operating as a separate template is a great place to start. If everyone ends up using the new template or if there are some particular features that people really love and would like to see in the The code seems generally reasonable. I will take a closer look once the CI passes. One thing I did notice was missing was a mention of the new template in the help text for new/init in |
Thanks for the review and helpful pointers! For now, let's use I've added a test checking the linting options are set correctly. I also have a test repository on GitHub here: https://github.com/Vierkantor/lake-template-tester (it turns out that one of the workflows does not like force-pushes to the main branch)! |
Previously, on dev builds Lake would complain that there was no known toolchain. But outside of dev builds we set this toolchain unconditionally to Mathlib's, so why not do it for dev builds too?
I pushed a change to the toolchain logic that should (hopefully) fix the tests. My reasoning is: outside of dev builds, we always select Mathlib's toolchain. So even if the current build is a dev build, we can still use that toolchain. Did I get this right? |
with the right version.
Mathlib CI status (docs):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: Mac Malone <tydeu@hatpress.net>
I vote we be opinionated about this, and have this replace the |
Sounds good to me. I like |
Change option naming so `lake new ... math` will add all the Mathlib-standard linting and CI workflows. The original `math` template is now called `math-lax`.
Kim approved the PR in our meeting today, so I'm going to go ahead and hit merge. Thanks for the reviews! |
This PR upgrades the `math` template for `lake init` and `lake new` to configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the previous version (now available as `lake new ... math-lax`), this automatically provides: * Strict linting options matching Mathlib. * GitHub workflow for automatic upgrades to newer Lean and Mathlib releases. * Automatic release tagging for toolchain upgrades. * API documentation generated by [doc-gen4](https://github.com/leanprover/doc-gen4) and hosted on `github.io`. * README with some GitHub-specific instructions. The previous edition of the template is still available, renamed to `math-lax`. --------- Co-authored-by: Mac Malone <tydeu@hatpress.net>
This PR upgrades the `math` template for `lake init` and `lake new` to configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the previous version (now available as `lake new ... math-lax`), this automatically provides: * Strict linting options matching Mathlib. * GitHub workflow for automatic upgrades to newer Lean and Mathlib releases. * Automatic release tagging for toolchain upgrades. * API documentation generated by [doc-gen4](https://github.com/leanprover/doc-gen4) and hosted on `github.io`. * README with some GitHub-specific instructions. The previous edition of the template is still available, renamed to `math-lax`. --------- Co-authored-by: Mac Malone <tydeu@hatpress.net>
This PR upgrades the `math` template for `lake init` and `lake new` to configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the previous version (now available as `lake new ... math-lax`), this automatically provides: * Strict linting options matching Mathlib. * GitHub workflow for automatic upgrades to newer Lean and Mathlib releases. * Automatic release tagging for toolchain upgrades. * API documentation generated by [doc-gen4](https://github.com/leanprover/doc-gen4) and hosted on `github.io`. * README with some GitHub-specific instructions. The previous edition of the template is still available, renamed to `math-lax`. --------- Co-authored-by: Mac Malone <tydeu@hatpress.net>
This PR upgrades the `math` template for `lake init` and `lake new` to configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the previous version (now available as `lake new ... math-lax`), this automatically provides: * Strict linting options matching Mathlib. * GitHub workflow for automatic upgrades to newer Lean and Mathlib releases. * Automatic release tagging for toolchain upgrades. * API documentation generated by [doc-gen4](https://github.com/leanprover/doc-gen4) and hosted on `github.io`. * README with some GitHub-specific instructions. The previous edition of the template is still available, renamed to `math-lax`. --------- Co-authored-by: Mac Malone <tydeu@hatpress.net>
This PR upgrades the `math` template for `lake init` and `lake new` to configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the previous version (now available as `lake new ... math-lax`), this automatically provides: * Strict linting options matching Mathlib. * GitHub workflow for automatic upgrades to newer Lean and Mathlib releases. * Automatic release tagging for toolchain upgrades. * API documentation generated by [doc-gen4](https://github.com/leanprover/doc-gen4) and hosted on `github.io`. * README with some GitHub-specific instructions. The previous edition of the template is still available, renamed to `math-lax`. --------- Co-authored-by: Mac Malone <tydeu@hatpress.net>
This PR upgrades the `math` template for `lake init` and `lake new` to configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the previous version (now available as `lake new ... math-lax`), this automatically provides: * Strict linting options matching Mathlib. * GitHub workflow for automatic upgrades to newer Lean and Mathlib releases. * Automatic release tagging for toolchain upgrades. * API documentation generated by [doc-gen4](https://github.com/leanprover/doc-gen4) and hosted on `github.io`. * README with some GitHub-specific instructions. The previous edition of the template is still available, renamed to `math-lax`. --------- Co-authored-by: Mac Malone <tydeu@hatpress.net>
This PR upgrades the
math
template forlake init
andlake new
to configures the new project to meet rigorous Mathlib maintenance standards. In comparison with the previous version (now available aslake new ... math-lax
), this automatically provides:github.io
.The previous edition of the template is still available, renamed to
math-lax
.