# Copyright (c) 2026 Guy's and St Thomas' NHS Foundation Trust & King's College London
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#     http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov*/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage*.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# UV
#   Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#uv.lock

# poetry
#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
#   in version control.
#   https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can
#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#  and can be added to the global gitignore or merged into this file.  For a more nuclear
#  option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env.development
.env.development.local
.env.e2e
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

flip-api/uv-installer.sh
flip-api/translate/
translate/

# MacOS
.DS_Store

flip-api/tests/debug_prelaunch_task_projects.json
flip-api/tests/seed_demo_projects.json

flip-fl-api/transfer/*/*

*.tfplan
*.terraform.lock.hcl

# Environment files with sensitive credentials
.env.development
.env.stag
.env.production
# Per-trust operator kits — one file per trust, named by trust CODE and
# environment (e.g. trust/.env.KCH.development, trust/.env.<CODE>.production).
# Minted by the hub via register-trust / POST /admin/trusts; contain plaintext
# TRUST_API_KEY + TRUST_INTERNAL_SERVICE_KEY (and, in prod kits, the hub-shared
# block). Never commit. The `.example` schema templates ARE tracked.
trust/.env.*
!trust/.env.*.example
!trust/.env.example

# NVFLARE participant-kit trees synced from the hub's S3 bucket
# (s3://<aicentre-bucket>/fl-flare-participant-kits/<date>/net-1/services/<slot>/).
# Contains client.key / client.crt — never commit.
trust/fl_participant_kits/

# Per-trust NVFLARE startup kits unpacked on a trust host (e.g. trust/fl-kit-gstt/net-1/
# services/Trust_1/). Same client.key / client.crt content — never commit.
trust/fl-kit-*/

# NVFLARE provisioning workspace left on a host by legacy in-deploy provisioning
# (deploy/workspace/net-*/ with state/cert.json + startup kits). Provisioning now
# lives under fl-services/<backend>/provision/ (ignored further down this file) — never commit.
deploy/workspace/

# Local Python env some AWS tooling installs in-tree
deploy/providers/AWS/pip/

trust/terraform.tfstate

.claude/settings.local.json
.codex

*.gz

.plans/
plans/

# Security scan reports
.security-reports/
.secrets.baseline

scripts/remove-env-from-history.sh

SECURITY_INCIDENT.md

*.jar

*.war
*.tf.backup
.deployment-structure-analysis.md
deploy/providers/AWS/REFACTORING.md

# Email template preview files (generated locally for testing)
deploy/providers/AWS/email_previews/
deploy/providers/AWS/dev/.terraform.lock.hcl

.claude/scheduled_tasks.lock
pi-session-*.html

# FLIP FL infrastructure — provisioned secrets (generated by make -C fl-services/<backend> provision)
fl-services/nvflare/provision/workspace-dev/
fl-services/nvflare/provision/workspace-stag/
fl-services/nvflare/provision/workspace-prod/

# FL app integration test output
.test_data/
.test_runs/

# NVFLARE provisioned secrets — NEVER commit to version control
**/signature.json
**/fed_client.json
**/fed_server.json
**/fed_admin.json

# Tutorial-generated files
*.pt

# flip-utils build artifacts
flip-utils/dist/

design_handoff*
CONTEXT.md

# Federated learning runtime directories (at repo root)
jobs/

trust/orthanc/orthanc-storage/

# FLIP FL infrastructure — provisioned secrets (generated by make -C fl-services/<backend> provision)
fl-services/nvflare/provision/workspace-dev/
fl-services/nvflare/provision/workspace-stag/
fl-services/nvflare/provision/workspace-prod/

# FL app integration test output
.test_data/
.test_runs/

# NVFLARE provisioned secrets — NEVER commit to version control
**/signature.json
**/fed_client.json
**/fed_server.json
**/fed_admin.json

# Tutorial-generated files
*.pt

# flip-utils build artifacts
flip-utils/dist/
.ralph/

# Claude Code: ignore local/personal state, but track shared routines
# (commands, hooks, project settings) so the team gets them on checkout.
.claude/*
!.claude/commands/
!.claude/hooks/
!.claude/settings.json
# Worktrees default to .claude/worktrees/ inside the repo — keep them out of
# version control (covered by .claude/* above, listed explicitly for clarity).
.claude/worktrees/

# fl-tutorials generated / uncommitted artifacts (data/, the spleen-seg uv.lock), scoped under the
# per-backend tutorial trees (fl-tutorials/<backend>/) so a bare `data/` doesn't over-match
# other data/ dirs in the monorepo:
# - generated tutorial datasets (spleen/xray images + accession CSVs)
# - tutorial uv.lock (tutorials intentionally don't pin a strict lockfile)
fl-tutorials/nvflare/data/
fl-tutorials/nvflare/image_segmentation/3d_spleen_segmentation/uv.lock
fl-services/flower/provision/creds/
fl-services/flower/runs/
fl-tutorials/flower/data/

# Round-timing extraction output (scripts/fl_round_metrics/ extractors and the
# tutorials' `make round-metrics` write
# rounds.tsv + summary.md + boxplots here) — data artifacts, not source.
round_metrics/

# ...but the extractors' test fixtures are hand-written synthetic logs, i.e. source, and
# the blanket `*.log` rule above would otherwise silently drop them from the commit and
# leave CI with nothing to test against.
!scripts/fl_round_metrics/tests/fixtures/*.log
# Exported TorchScript model bundles (MAP build artefacts). Scoped to the Python trees, NOT global
# *.ts / model.ts rules — flip-ui is TypeScript, where a module could legitimately be named model.ts
# or live under an export/ directory, and must stay tracked.
map-apps/**/*.ts
fl-tutorials/**/*.ts
flip-utils/**/*.ts
