I noticed that .venv was missing from the .gitignore, so I went to add it, but figured I may as well update to the latest provided by Github in the process!
I "diffed" the two files with the following script to see what else to append to the bottom of github's template, then tidied up things that were caught more explicitly:
>>> with open('.gitignore') as f:
... a = f.readlines()
...
>>> with open('.gitignore2') as f:
... b = f.readlines()
...
>>> a = set(a)
>>> b = set(b)
>>> b-a
{'build/\n', 'eggs/\n', '.ipynb_checkpoints\n', '# SageMath parsed files\n', 'venv/\n', '*.manifest\n', '# poetry\n', '.scrapy\n', '# commonly ignored for libraries.\n', 'downloads/\n', '#poetry.lock\n', '*$py.class\n', '# pdm\n', '# and can be added to the global gitignore or merged into this file. For a more nuclear\n', 'db.sqlite3\n', '# Environments\n', 'profile_default/\n', '# For a library or package, you might want to ignore these files since the code is\n', '# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it\n', '.pybuilder/\n', '.pyre/\n', 'lib/\n', '# Distribution / packaging\n', '# Scrapy stuff:\n', '# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore\n', '.hypothesis/\n', 'instance/\n', '# PyCharm\n', 'celerybeat.pid\n', 'dist/\n', 'ENV/\n', '.venv\n', 'venv.bak/\n', '.webassets-cache\n', '# option (not recommended) you can uncomment the following to ignore the entire idea folder.\n', '.spyderproject\n', 'env/\n', 'develop-eggs/\n', '# PyBuilder\n', '.pdm.toml\n', '.Python\n', "# having no cross-platform support, pipenv may install dependencies that don't work, or not\n", '*.spec\n', '# Sphinx documentation\n', '*.egg-info/\n', '# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control\n', '# Pyre type checker\n', 'sdist/\n', '# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.\n', 'db.sqlite3-journal\n', 'lib64/\n', '*.sage.py\n', '#.idea/', '# .python-version\n', '# IPython\n', '# JetBrains specific template is maintained in a separate JetBrains.gitignore that can\n', '# Celery stuff\n', 'coverage.xml\n', '# intended to run in multiple environments; otherwise, check them in:\n', '/site\n', '.pytest_cache/\n', '# Rope project settings\n', '.coverage.*\n', '# Byte-compiled / optimized / DLL files\n', '# pyenv\n', '# in version control.\n', 'ipython_config.py\n', 'wheels/\n', '# mypy\n', '# mkdocs documentation\n', '# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm\n', '.tox/\n', 'env.bak/\n', '.nox/\n', '*.py,cover\n', '# Usually these files are written by a python script from a template\n', '# before PyInstaller builds the exe, so as to inject date/other infos into it.\n', '__pycache__/\n', 'target/\n', '#pdm.lock\n', '# Flask stuff:\n', 'dmypy.json\n', 'MANIFEST\n', '# pytype static type analyzer\n', 'parts/\n', '.ropeproject\n', '*.cover\n', '# pipenv\n', '# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.\n', '# PyInstaller\n', '# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.\n', '# This is especially recommended for binary packages to ensure reproducibility, and is more\n', '.spyproject\n', 'cython_debug/\n', 'htmlcov/\n', 'cover/\n', '.dmypy.json\n', 'docs/_build/\n', '.pytype/\n', '# Cython debug symbols\n', 'pip-delete-this-directory.txt\n', '# https://pdm.fming.dev/#use-with-ide\n', 'share/python-wheels/\n', '.env\n', 'var/\n', '__pypackages__/\n', '# install all needed dependencies.\n', '.eggs/\n', 'local_settings.py\n', '.mypy_cache/\n', 'celerybeat-schedule\n', '# Django stuff:\n', '# Jupyter Notebook\n', '# Spyder project settings\n', '#Pipfile.lock\n', '*.pot\n', '# However, in case of collaboration, if having platform-specific dependencies or dependencies\n'}
>>> for l in (a-b):
... print(l)
...
I noticed that
.venv
was missing from the.gitignore
, so I went to add it, but figured I may as well update to the latest provided by Github in the process!I "diffed" the two files with the following script to see what else to append to the bottom of github's template, then tidied up things that were caught more explicitly: