content: [project]
      name = "pattern_lens"
      version = "0.5.1"
      description = ""
      readme = "README.md"
      requires-python = ">=3.11"
      dependencies = [
          # standard
          "numpy>=1.26.1,<2.0.0",
          "torch>=2.5.1",
          "jaxtyping>=0.2.33",
          "tqdm>=4.66.5",
          "pandas>=2.2.2",
          "scipy>=1.14.1",
          # "scikit-learn>=1.3",
          "matplotlib>=3.8.0",
          "pillow>=11.0.0",
          # jupyter
          "ipykernel>=6.29.5",
          "ipywidgets>=8.1.5",
          # typing
          "beartype>=0.14.1",
          # custom utils
          "muutils>=0.8.10",
          "zanj>=0.3.1",
          # TL
          "transformer-lens>=2.10.0",
          # this TL dep not listed? is this in an extra?
          "typeguard>=4.4.1",
      ]
  
  [dependency-groups]
      dev = [
          # lmcat
          "lmcat>=0.2.0; python_version >= '3.11'",
          # test
          "pytest>=8.2.2",
          # coverage
          "pytest-cov>=4.1.0",
          "coverage-badge>=1.1.0",
          # type checking
          "mypy>=1.0.1",
          "types-tqdm",
          "ty",
          # docs
          'pdoc>=14.6.0',
          "nbconvert>=7.16.4",
          # tomli since no tomlib in python < 3.11
          "tomli>=2.1.0; python_version < '3.11'",
          # lint
          "ruff>=0.4.8",
          # twine
          "twine",
      ]
  
  [tool.uv]
      package = true
  
  [project.urls]
      Homepage = "https://miv.name/pattern-lens"
      Documentation = "https://miv.name/pattern-lens"
      Repository = "https://github.com/mivanit/pattern-lens"
      Issues = "https://github.com/mivanit/pattern-lens/issues"
  
  [build-system]
      requires = ["hatchling"]
      build-backend = "hatchling.build"
  
  # tools
  [tool]
      [tool.hatch.build.targets.wheel]
          packages = ["pattern_lens"]
  
      # ruff config
      [tool.ruff]
          exclude = ["__pycache__"]
  
          [tool.ruff.lint]
              ignore = [
                  "F722", # doesn't like jaxtyping
                  "W191", # we like tabs
                  "D400", # missing-trailing-period
                  "D415", # missing-terminal-punctuation
                  "E501", # line-too-long
                  "S101", # assert is fine
                  "D403", # first-word-uncapitalized
                  "D206", # docstring-tab-indentation
                  "ERA001", # commented-out-code
                  "T201", # print is fine
                  "C408", # calling dict() is fine
                  "UP015", # we like specifying the mode even if it's the default
                  "D300", # we like docstrings
                  # boolean positional arguments are fine
                  "FBT001", 
                  "FBT002",
                  "PTH123", # opening files is fine
                  "RET505", # else return is fine
                  "FIX002", # `make todo` will give us the TODO comments
                  "PIE790", # be explicit about when we pass
                  "EM101", # fine to have string literal exceptions
                  "FURB129", # .readlines() is fine
                  "SIM108", # ternary operators can be hard to read, choose on a case-by-case basis
                  "PLR5501", # nested if else is fine, for readability
                  "D203", # docstring right after the class
                  "D213", # docstring on first line
                  "NPY002", # legacy numpy generator is fine
                  "D401", # don't care about imperative mood
                  # todos:
                  "TD002", # don't care about author
                  "TD003", # `make todo` will give us a table where we can create issues
                  "PLR0913", # sometimes you have to have a lot of args
              ]
              select = ["ALL"]
              # select = ["ICN001"]
  
              [tool.ruff.lint.per-file-ignores]
                  "tests/*" = [
                      # don't need docstrings in test functions or modules
                      "D100",
                      "D102",
                      "D103", 
                      "D107",
                      # don't need __init__ either
                      "INP001",
                      "ANN204",
                      # don't need type annotations in test functions
                      "ANN001",
                      "ANN201", 
                      "ANN202",
                      "TRY003", # long exception messages in tests are fine
                      "PLR2004", # magic values fine in tests
                  ]
                  "docs/*" = ["ALL"] # not our problem
                  "**/*.ipynb" = [
                      "D103", # don't need docstrings
                      "PLR2004", # magic variables are fine
                      "N806", # uppercase vars are fine
                  ]
  
          [tool.ruff.format]
              indent-style = "tab"
              skip-magic-trailing-comma = false
  
      [tool.pytest.ini_options]
          adopts = "--jaxtyping-packages=pattern_lens,beartype.beartype"
          filterwarnings = [
              "ignore: PEP 484 type hint*:beartype.roar._roarwarn.BeartypeDecorHintPep585DeprecationWarning",
          ]
  
      [tool.mypy]
          check_untyped_defs = true
  
      # `make lmcat` depends on the lmcat and can be configured here
      [tool.lmcat]
          output = "docs/other/lmcat.txt" # changing this might mean it wont be accessible from the docs
          ignore_patterns = [
              "!docs/resources/make_docs.py",
              "docs/**",
              ".venv/**",
              ".git/**",
              ".meta/**",
              "data/pile_demo.jsonl",
              "tests/**",
              "uv.lock",
              "LICENSE",
          ]
          [tool.lmcat.glob_process]
              "[mM]akefile" = "makefile_recipes"
              "*.ipynb" = "ipynb_to_md"
  
  # for configuring this tool (makefile, make_docs.py)
  # ============================================================
  [tool.makefile]
  
  # documentation configuration, for `make docs` and `make docs-clean`
  [tool.makefile.docs]
      output_dir = "docs"
      no_clean = [
          ".nojekyll",
          "demo",
          "assets",
      ]
      markdown_headings_increment = 2
      warnings_ignore = [
          ".*No docstring.*",
          ".*Private member.*",
      ]
      [tool.makefile.docs.notebooks]
          enabled = false
          source_path = "notebooks"
          output_path_relative = "notebooks"
          # [tool.makefile.docs.notebooks.descriptions]
          #     "example" = "Example notebook showing basic usage"
          #     "advanced" = "Advanced usage patterns and techniques"
          
          
  
  # Custom export configurations
  # affects `make dep` and related commands
  [tool.makefile.uv-exports]
  	args = [
  		"--no-hashes"
  	]
  	exports = [
  		# # all groups and extras
  		{ name = "all", filename="requirements.txt", groups = true, extras=true },
  		# # all groups and extras, a different way
  		{ name = "all", groups = true, options = ["--all-extras"] },
  	]
  
  # configures `make todo`
  [tool.makefile.inline-todo]
  	search_dir = "."
  	out_file_base = "docs/other/todo-inline.md"
  	context_lines = 2
  	extensions = ["py", "md"]
  	tags = ["CRIT", "TODO", "FIXME", "HACK", "BUG", "DOC", "TYPING"]
  	exclude = [
  		"docs/**",
  		".venv/**",
  		"scripts/get_todos.py",
  	]
  	branch = "main"
      [tool.makefile.inline-todo.tag_label_map]
          "BUG" = "bug"
          "TODO" = "enhancement"
  		"DOC" = "documentation"
  
  # ============================================================