Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/lean_action_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
run: |
set -e
lake shake --add-public --keep-implied --keep-prefix Cslib
- name: "checkInitImports"
run: |
set -e
lake exe checkInitImports
- uses: leanprover-community/lint-style-action@main
with:
mode: check
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ parenthetical containing what area of the library the PR is working on.

## Testing

There is a [series of tests](/scripts/RunTests.lean) that runs for each PR. The components of this
are
There is a series of tests that runs for each PR. The components of this are

- running the tests found in [CslibTests](/CslibTests)
- checking that all files import [Cslib.Init](/Cslib/Init.lean), which sets up some default linting
and tactics

You can run these locally with `lake test`.
You can run these locally with `lake test` and `lake exe checkInitImports` respectively.

## Linting

Expand All @@ -125,6 +124,9 @@ CSLib uses a number of linters, mostly inherited from Batteries and Mathlib. The
There is a also a test that [Cslib.lean](/Cslib.lean) imports all files. You can ensure this by
running `lake exe mk_all --module` locally, which will make the required changes.

CSLib tests for minimized imports using `lake shake --add-public --keep-implied --keep-prefix`, which also comes with a `--fix` option.
See `lake shake --help` for the special comment syntax used to preserve imports required for tactics or typeclasses.

# Getting started

CSLib is a community effort. To understand its scope and vision, please read the [CSLib whitepaper](https://arxiv.org/abs/2602.04846).
Expand Down Expand Up @@ -328,4 +330,4 @@ There are two primary areas where generative AI can help:
- generating/refining specifications (at the front-end or Boole level)
- helping to prove Lean conjectures

Other creative uses of AI are welcome, but contributions should remain reviewable and maintainable.
Other creative uses of AI are welcome, but contributions should remain reviewable and maintainable.
7 changes: 1 addition & 6 deletions lakefile.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "cslib"
version = "0.1.0"
defaultTargets = ["Cslib"]
testDriver = "runTests"
testDriver = "CslibTests"
lintDriver = "batteries/runLinter"

[leanOptions]
Expand Down Expand Up @@ -29,8 +29,3 @@ globs = ["CslibTests.+"]
name = "checkInitImports"
srcDir = "scripts"
root = "CheckInitImports"

[[lean_exe]]
name = "runTests"
srcDir = "scripts"
root = "RunTests"
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ to learn about it as well!
- Optional: `zulip-send` CLI for automatic Zulip notifications

**Init Imports**
- `CheckInitImports.lean` (usually run from `lake test`) checks that all files transitively import `Cslib.Init`.
- `CheckInitImports.lean` (run by `lake exe checkInitImports`) checks that all files transitively import `Cslib.Init`.

**Linting**
- `weekly_lint_report.sh`
Expand Down
41 changes: 0 additions & 41 deletions scripts/RunTests.lean

This file was deleted.