Skip to content

Commit

Permalink
feat: add Python Functions entries to the template .gitignore (#542)
Browse files Browse the repository at this point in the history
Python support for Salesforce Functions is currently in beta.

When working on a Python project, it's typical to install the project's
dependencies inside a Python "virtual environment". This environment
is typically placed inside the project directory, with a directory name of
`.venv` or `venv`. This environment is machine-specific, so must not
be committed to source control.

In addition, when Python files are run, the Python interpreter writes the
generated bytecode to disk, as a performance improvement for subsequent
invocations. This bytecode is stored under `__pycache__` directories alongside
the source code, and is environment-specific so similarly should not be committed
to source control.

Currently the beta docs for Python Functions have the user manually edit their
project's `.gitignore`, however this adds friction and a potential source of
mistakes, so we should add these entries to the template directly.

GUS-W-12198175.

Co-authored-by: Ed Morley <[email protected]>
  • Loading branch information
CristiCanizales and edmorley authored Jan 18, 2023
1 parent 7c43b44 commit 6738346
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/templates/project/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ ehthumbs.db
$RECYCLE.BIN/

# Local environment variables
.env
.env

# Python Salesforce Functions
**/__pycache__/
**/.venv/
**/venv/

0 comments on commit 6738346

Please sign in to comment.