View the phonon_lifetime package documentation here.
This project uses a Dev Container (via VS Code) and uv for fast, reliable Python dependency management.
-
Clone the project in VS Code.
-
In VS Code, open the Command Palette (
Ctrl+Shift+P) and run:Dev Containers: Reopen in ContainerThis will build the container if needed and connect you to the development environment.
To setup the template
- Re-name the
my_projectfolder toyour_project_name - Update references in
pyproject.toml, including the project name, description, and python.analysis.include - Update path of imports in
tests/import_test.pyandexamples/example.py - Update details in
docs/source/conf.py - Update details in
docs/source/index.rst - Update the GitHub workflow step to
Build Sphinx documentationin.github/workflows/deploy.yml, and the link to docs inREADME.md - Update python.analysis.include in
.devcontainer/devcontainer.json
This project uses uv for dependency management.
To add a package, use the following commands:
uv add <package-name>
uv add --dev <package-name>This adds the package to pyproject.toml and updates the lockfile,
where --dev adds it to the development dependencies. To install
these dependencies, use:
# All dependencies
uv sync --all-extras
# Exclude dev dependencies
uv syncThis project sets up tools for spell checking, linting, type checking, and testing, which are automatically run in Github Actions on push and pull requests. To run these tools locally, use the following commands:
# Linting and formatting
ruff check .
# Type checking
pyright
# Testing
pytest
# Spell checking
cspell .To add words to the spell checker's dictionary,
add them to the .vscode/cspell.json file under
the words or ignoreWords section.