Skip to content

Instantly share code, notes, and snippets.

@birkin
Last active September 25, 2025 12:10
Show Gist options
  • Select an option

  • Save birkin/5b39a0169a73d09e757416ec29d5d40a to your computer and use it in GitHub Desktop.

Select an option

Save birkin/5b39a0169a73d09e757416ec29d5d40a to your computer and use it in GitHub Desktop.
pyproject.toml template (#llm_code_directives)
[project]
name = "bdr-student-uploader-hub-project"
version = "0.0.0"
description = "Allows staff to easily and quickly create and configure webapp-uploader for students."
readme = "https://github.com/Brown-University-Library/bdr_student_uploader_hub_project/blob/main/README.md"
requires-python = ">=3.12,<3.13"
dependencies = [
"beautifulsoup4~=4.13.0",
"Django~=5.2.0",
"httpx~=0.28.0",
"lxml~=6.0.0",
"python-dotenv~=1.1.0",
"trio~=0.30.0",
]
[dependency-groups]
local = []
staging = [
"mysqlclient~=2.2.0", # not yet used on dev, but useful to confirm installation
]
prod = [
"mysqlclient~=2.2.0",
]
[tool.birkin_project_guidelines]
llm_code_directives = [
"use python-3.12 type-hints everywhere for functions and variables; avoid unnecessary `typing` imports via using generics",
"structure scripts with `if __name__ == '__main__': main()`",
"keep main() as simple as possible; delegate to helper functions",
"for tests, use standard unittest framework, not pytest",
"to run tests, always use `uv`; example: `uv run -m unittest discover -v`",
"use `uv` to run all code and scripts; do not invoke `python` or `python3` directly; example: `uv run ./the_script.py`",
"use httpx for all HTTP calls",
"don't use functions within functions",
"prefer single-return functions",
"use present-tense triple-quoted function docstrings; opening and closing triple quotes on their own lines; example: \"\"\"\nParses... (not Parse...)\n\"\"\""
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment