{"id":21375352,"url":"https://github.com/lsst/templates","last_synced_at":"2026-01-02T08:40:58.788Z","repository":{"id":1164054,"uuid":"23013308","full_name":"lsst/templates","owner":"lsst","description":"Rubin Observatory file and project templates","archived":false,"fork":false,"pushed_at":"2025-03-11T16:00:06.000Z","size":1821,"stargazers_count":12,"open_issues_count":6,"forks_count":10,"subscribers_count":55,"default_branch":"main","last_synced_at":"2025-03-11T16:36:27.961Z","etag":null,"topics":["lsst-doc-engineering"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lsst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-16T07:43:32.000Z","updated_at":"2025-03-11T15:40:30.000Z","dependencies_parsed_at":"2023-10-14T22:16:04.244Z","dependency_job_id":"4a88ffe7-afb2-488b-92bf-f33e7ba56584","html_url":"https://github.com/lsst/templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Ftemplates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Ftemplates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Ftemplates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Ftemplates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsst","download_url":"https://codeload.github.com/lsst/templates/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243850959,"owners_count":20358108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lsst-doc-engineering"],"created_at":"2024-11-22T09:09:53.257Z","updated_at":"2026-01-02T08:40:58.754Z","avatar_url":"https://github.com/lsst.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vera C. Rubin Observatory code templates\n\nThis repository provides standardized templates for Rubin software projects.\nThe best way to create new projects and files is through the `@sqrbot-jr` bot in the LSSTC Slack workspace ([see how](#creating-projects-and-files-through-slack)).\nAlternatively, you can create projects locally using the `templatekit` command line app.\n\nRefer to these templates when creating new projects (such as stack packages) and when adding new files to existing repositories.\nWe're continuously updating these templates with our adopted standards and best practices.\n\nTo contribute new templates, or to update existing ones, see the [contributing guide](CONTRIBUTING.md).\n\n## Contents\n\n- [Project templates](#project-templates)\n- [File templates](#file-templates)\n- [Creating projects and files through Slack](#creating-projects-and-files-through-slack)\n- [Creating projects and files without Slack](#creating-projects-and-files-without-slack)\n- [Contributions](#contributions)\n- [Troubleshooting](#troubleshooting)\n\n## Project templates\n\n**Project templates** have multiple files and are intended to bootstrap new Git repositories.\nFind these templates in the `project_templates/` directory:\n\n- [fastapi_safir_app](project_templates/fastapi_safir_app/)\n- [latex_lsstdoc](project_templates/latex_lsstdoc/)\n- [nbreport](project_templates/nbreport/)\n- [roundtable_aiohttp_bot](project_templates/roundtable_aiohttp_bot/)\n- [sitcom_personal_notebooks](project_templates/sitcom_personal_notebooks/)\n- [stack_package](project_templates/stack_package/)\n- [square_pypi_package](project_templates/square_pypi_package/)\n- [technote_aastex](project_templates/technote_aastex/)\n- [technote_latex](project_templates/technote_latex/)\n- [technote_rst](project_templates/technote_rst/)\n- [technote_md](project_templates/technote_md/)\n- [test_report](project_templates/test_report/)\n\n## File templates\n\n**File templates** are either entire files or snippets you can add to files.\nFind these templates in the `file_templates` directory:\n\n- [argparse_script_topic](file_templates/argparse_script_topic)\n- [config_topic](file_templates/config_topic)\n- [copyright](file_templates/copyright)\n- [license_gplv3](file_templates/license_gplv3)\n- [script_topic](file_templates/script_topic)\n- [stack_license_preamble_cpp](file_templates/stack_license_preamble_cpp)\n- [stack_license_preamble_py](file_templates/stack_license_preamble_py)\n- [stack_license_preamble_txt](file_templates/stack_license_preamble_txt)\n- [task_topic](file_templates/task_topic)\n\n## Creating projects and files through Slack\n\nRubin staff are members of the LSSTC Slack workspace.\nTo create a file or project:\n\n1. [Open a DM with sqrbot-jr](https://slack.com/app_redirect?app=AF2U6ADV3\u0026team=T06D204F2)\n2. Enter a command through the chat:\n\n   - For file templates, enter:\n\n     ```\n     create file\n     ```\n\n     Fill out the fields in the window, and then copy the resulting text file that sqrbot-jr returns.\n\n   - For project templates, enter:\n\n     ```\n     create project\n     ```\n\n     Fill out the fields in the window.\n     For projects with complex set up, watch for a message thread with information about the Git repository that is created for you.\n\n## Creating projects and files without Slack\n\nYou can create files and projects from these templates on you local machine, without using the `@sqrbot-jr` Slack app, by running [templatekit](https://templatekit.lsst.io).\n**Note the caveat that the `@sqrbot-jr` app performs many administrative set-up tasks that are critically important when creating new documents. In almost all cases, using the `@sqrbot-jr` is recommended or required.**\n\nFirst, clone this repository and install the `templatekit` app:\n\n```bash\ngit clone https://github.com/lsst/templates\ncd templates\npip install -r requirements.txt\n```\n\nList the templates in this repository:\n\n```bash\ntemplatekit list\n```\n\nTry filling in a file/snippet template:\n\n```bash\ntemplatekit make stack_license_preamble_py -c\n```\n\nThen answer the prompts to fill in the license preamble.\nBehind the scenes, `templatekit` uses [Cookiecutter](https://cookiecutter.readthedocs.io).\nIf you have any questions about what the variables are, check out the [template's README](file_templates/stack_license_preamble_py).\n\nWith the `-c` (`--copy`) option, `templatekit` copies the rendered text to the clipboard.\nYou can write the text to a file with the `-o` (`--output`) option.\n\nYou can create project templates the same way.\nFor example, create a new stack package:\n\n```bash\ntemplatekit make stack_package -o ../\n```\n\nThe `-o` option makes sure the stack package is created next to the `templates/` repo, not inside it.\n\nYou can get more information about `templatekit` and its commands by running:\n\n```bash\ntemplatekit -h\n```\n\nSee [Troubleshooting](#troubleshooting) for solutions to common issues.\n\n## Contributions\n\nSee the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidance on adding and maintaining templates in this repository.\n\n## Troubleshooting\n\n### ASCII shell encoding\n\nDepending on how your shell is set up, you may get this error when running `templatekit`:\n\n\u003e RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.  Either run this under Python 2 or consult http://click.pocoo.org/python3/ for mitigation steps.\n\nTo solve this, you need to set your shell's *locale* to use UTF-8.\nFor example, type these lines into your shell and add them to a start-up file such as ``.bashrc``:\n\n```bash\nexport LC_ALL=en_US.utf-8\nexport LANG=en_US.utf-8\n```\n\nAfter the locale is set, re-try the `templatekit` command.\n\nKeep in mind that different platforms have different locales.\nTo find available UTF-8 locales on your platform, run:\n\n```bash\nlocale -a\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsst%2Ftemplates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsst%2Ftemplates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsst%2Ftemplates/lists"}