PhysLean/scripts
2024-11-11 11:23:27 +00:00
..
MetaPrograms feat: Stats page 2024-11-11 11:23:27 +00:00
check_file_imports.lean Update check_file_imports.lean 2024-10-03 13:58:48 +00:00
find_TODOs.lean fix: TODO list 2024-11-04 06:56:21 +00:00
hepLean_style_lint.lean refactor: Lint 2024-10-28 08:01:26 +00:00
lint-all.sh refactor: Lorentz Group etc. 2024-07-02 10:13:52 -04:00
lint-style.py refactor: Lint 2024-08-15 10:16:42 -04:00
lint-style.sh Changing file permissions 2024-04-16 15:34:27 -04:00
mathlib_textLint_on_hepLean.lean Update mathlib_textLint_on_hepLean.lean 2024-08-15 11:01:32 -04:00
nolints-style.txt chore: Add Mathlib text-based linters 2024-07-12 16:31:33 -04:00
nolints.json refactor: Move constructors 2024-07-16 11:40:00 -04:00
openAI_doc_check.lean refactor: Change git-hub repo for llm 2024-07-15 15:10:10 -04:00
README.md feat: stats and AI doc strings 2024-07-15 14:52:50 -04:00
stats.lean feat: Stats page 2024-11-11 11:23:27 +00:00
style-exceptions.txt feat: Add relation to mathlib4 defns 2024-04-17 10:25:05 -04:00
Template.lean docs: Modify doc template 2024-11-07 17:01:41 +00:00
type_former_lint.lean refactor: Change case of type and props 2024-06-26 11:54:02 -04:00

Scripts associated with HepLean

lint-style.py and lint-style.sh

Taken from Mathlib's linters. These perform text-based linting of the code.

These are to be slowly replaced with code written in Lean.

hepLean_style_lint

Checks the following in HepLean

  • There are no double empty lines.
  • There are no non-initial double spaces.
    Passing this linter is currently not required to pass CI on github.

Run using

lake exe hepLean_style_lint

check_file_imports.lean

Checks all files are correctly imported into HepLean.lean.

Run using

lake exe check_file_imports

type_former_lint.lean

Checks whether the name of definitions which form a type or prop starts with a capital letter.

Run using

lake exe type_former_lint

stats.sh

Outputs statistics for HepLean.

Run using

lake exe stats

openAI_doc_check.lean

Uses openAI's API to check for spelling mistakes etc. in doc strings.

This code needs https://github.com/jstoobysmith/Lean_llm_fork to be installed.

It also needs the enviroment variable OPENAI_API_KEY defined using e.g.

export OPENAI_API_KEY=<Your-openAI-key>

Run on a specific file using

lake exe openAI_doc_check <module_name>

where <module_name> is e.g. HepLean.SpaceTime.Basic.

Run on a random file using

lake exe openAI_doc_check random

lint-all.sh

Performs all linting checks on HepLean.

Run using

./scripts/lint-all.sh

Other useful commands

  • To build HepLean use
lake exe cache get 
lake build
  • To update HepLean's dependencies use
lake update