From 4d5cae2f9409c966dd5a3d7287956117e0ba914e Mon Sep 17 00:00:00 2001 From: Eric Young Date: Thu, 17 Dec 2020 22:12:36 +0000 Subject: [PATCH 1/2] Add operating systems to .gitignore files Includes macOS, Linux, and Windows. We are including Windows because, although we don't currently support it, the folder structure could be used on this operating system. --- .gitignore | 200 +++++++++++++++++++----- {{ cookiecutter.repo_name }}/.gitignore | 200 +++++++++++++++++++----- 2 files changed, 328 insertions(+), 72 deletions(-) diff --git a/.gitignore b/.gitignore index a928b25..784348d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -# Created by https://www.gitignore.io/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks -# Edit at https://www.gitignore.io/?templates=vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks +# Created by https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows +# Edit at https://www.toptal.com/developers/gitignore?templates=vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows ### direnv ### .direnv @@ -68,21 +68,37 @@ htmlcov/ nosetests.xml coverage.xml *.cover +*.py,cover .hypothesis/ .pytest_cache/ +pytestdebug.log # Translations *.mo +# Django stuff: + +# Flask stuff: +instance/ +.webassets-cache + # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ +doc/_build/ # PyBuilder target/ +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + # pyenv .python-version @@ -93,12 +109,26 @@ target/ # install all needed dependencies. #Pipfile.lock -# celery beat schedule file +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff celerybeat-schedule +celerybeat.pid # SageMath parsed files *.sage.py +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +pythonenv* + # Spyder project settings .spyderproject .spyproject @@ -106,11 +136,6 @@ celerybeat-schedule # Rope project settings .ropeproject -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - # mkdocs documentation /site @@ -122,13 +147,17 @@ dmypy.json # Pyre type checker .pyre/ +# pytype static type analyzer +.pytype/ + +# profiling data +.prof + ### dotenv ### -.env ### Flask ### instance/* !instance/.gitignore -.webassets-cache ### Flask.Python Stack ### # Byte-compiled / optimized / DLL files @@ -147,12 +176,20 @@ instance/* # Translations +# Django stuff: + +# Flask stuff: + # Scrapy stuff: # Sphinx documentation # PyBuilder +# Jupyter Notebook + +# IPython + # pyenv # pipenv @@ -161,38 +198,85 @@ instance/* # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. -# celery beat schedule file +# PEP 582; used by e.g. github.com/David-OConnor/pyflow + +# Celery stuff # SageMath parsed files +# Environments + # Spyder project settings # Rope project settings -# Mr Developer - # mkdocs documentation # mypy # Pyre type checker +# pytype static type analyzer + +# profiling data + ### JupyterNotebooks ### # gitignore template for Jupyter Notebooks # website: http://jupyter.org/ -.ipynb_checkpoints */.ipynb_checkpoints/* # IPython -profile_default/ -ipython_config.py # Remove previous ipynb_checkpoints # git rm -r .ipynb_checkpoints/ +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + ### PyCharm+all ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff @@ -222,6 +306,9 @@ ipython_config.py # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules @@ -278,6 +365,7 @@ modules.xml .idea/sonarlint ### pydev ### +.pydevproject ### Python ### # Byte-compiled / optimized / DLL files @@ -296,12 +384,20 @@ modules.xml # Translations +# Django stuff: + +# Flask stuff: + # Scrapy stuff: # Sphinx documentation # PyBuilder +# Jupyter Notebook + +# IPython + # pyenv # pipenv @@ -310,37 +406,44 @@ modules.xml # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. -# celery beat schedule file +# PEP 582; used by e.g. github.com/David-OConnor/pyflow + +# Celery stuff # SageMath parsed files +# Environments + # Spyder project settings # Rope project settings -# Mr Developer - # mkdocs documentation # mypy # Pyre type checker +# pytype static type analyzer + +# profiling data + ### venv ### # Virtualenv # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +[Bb]in +[Ii]nclude +[Ll]ib +[Ll]ib64 +[Ll]ocal +[Ss]cripts pyvenv.cfg -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ pip-selfcheck.json ### Vim ### # Swap [._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files [._]*.sw[a-p] [._]s[a-rt-v][a-z] [._]ss[a-gi-z] @@ -352,21 +455,41 @@ Sessionx.vim # Temporary .netrwhist -*~ - # Auto-generated tag files tags - # Persistent undo [._]*.un~ -# Coc configuration directory -.vim - ### VirtualEnv ### # Virtualenv # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + ### VisualStudio ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. @@ -399,6 +522,7 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +[Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -438,6 +562,7 @@ StyleCopReport.xml *_p.c *_h.h *.ilk +*.meta *.obj *.iobj *.pch @@ -494,9 +619,6 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding add-in -.JustCode - # TeamCity is a build add-in _TeamCity* @@ -507,6 +629,9 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*[.json, .xml, .info] + # Visual Studio code coverage results *.coverage *.coveragexml @@ -713,7 +838,10 @@ healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ -# End of https://www.gitignore.io/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# End of https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows ### govcookiecutter ### diff --git a/{{ cookiecutter.repo_name }}/.gitignore b/{{ cookiecutter.repo_name }}/.gitignore index 0ba98d9..f08fa60 100644 --- a/{{ cookiecutter.repo_name }}/.gitignore +++ b/{{ cookiecutter.repo_name }}/.gitignore @@ -1,5 +1,5 @@ -# Created by https://www.gitignore.io/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks -# Edit at https://www.gitignore.io/?templates=vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks +# Created by https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows +# Edit at https://www.toptal.com/developers/gitignore?templates=vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows ### direnv ### .direnv @@ -68,21 +68,37 @@ htmlcov/ nosetests.xml coverage.xml *.cover +*.py,cover .hypothesis/ .pytest_cache/ +pytestdebug.log # Translations *.mo +# Django stuff: + +# Flask stuff: +instance/ +.webassets-cache + # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ +doc/_build/ # PyBuilder target/ +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + # pyenv .python-version @@ -93,12 +109,26 @@ target/ # install all needed dependencies. #Pipfile.lock -# celery beat schedule file +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff celerybeat-schedule +celerybeat.pid # SageMath parsed files *.sage.py +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +pythonenv* + # Spyder project settings .spyderproject .spyproject @@ -106,11 +136,6 @@ celerybeat-schedule # Rope project settings .ropeproject -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - # mkdocs documentation /site @@ -122,13 +147,17 @@ dmypy.json # Pyre type checker .pyre/ +# pytype static type analyzer +.pytype/ + +# profiling data +.prof + ### dotenv ### -.env ### Flask ### instance/* !instance/.gitignore -.webassets-cache ### Flask.Python Stack ### # Byte-compiled / optimized / DLL files @@ -147,12 +176,20 @@ instance/* # Translations +# Django stuff: + +# Flask stuff: + # Scrapy stuff: # Sphinx documentation # PyBuilder +# Jupyter Notebook + +# IPython + # pyenv # pipenv @@ -161,38 +198,85 @@ instance/* # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. -# celery beat schedule file +# PEP 582; used by e.g. github.com/David-OConnor/pyflow + +# Celery stuff # SageMath parsed files +# Environments + # Spyder project settings # Rope project settings -# Mr Developer - # mkdocs documentation # mypy # Pyre type checker +# pytype static type analyzer + +# profiling data + ### JupyterNotebooks ### # gitignore template for Jupyter Notebooks # website: http://jupyter.org/ -.ipynb_checkpoints */.ipynb_checkpoints/* # IPython -profile_default/ -ipython_config.py # Remove previous ipynb_checkpoints # git rm -r .ipynb_checkpoints/ +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + ### PyCharm+all ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff @@ -222,6 +306,9 @@ ipython_config.py # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules @@ -278,6 +365,7 @@ modules.xml .idea/sonarlint ### pydev ### +.pydevproject ### Python ### # Byte-compiled / optimized / DLL files @@ -296,12 +384,20 @@ modules.xml # Translations +# Django stuff: + +# Flask stuff: + # Scrapy stuff: # Sphinx documentation # PyBuilder +# Jupyter Notebook + +# IPython + # pyenv # pipenv @@ -310,37 +406,44 @@ modules.xml # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. -# celery beat schedule file +# PEP 582; used by e.g. github.com/David-OConnor/pyflow + +# Celery stuff # SageMath parsed files +# Environments + # Spyder project settings # Rope project settings -# Mr Developer - # mkdocs documentation # mypy # Pyre type checker +# pytype static type analyzer + +# profiling data + ### venv ### # Virtualenv # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +[Bb]in +[Ii]nclude +[Ll]ib +[Ll]ib64 +[Ll]ocal +[Ss]cripts pyvenv.cfg -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ pip-selfcheck.json ### Vim ### # Swap [._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files [._]*.sw[a-p] [._]s[a-rt-v][a-z] [._]ss[a-gi-z] @@ -352,21 +455,41 @@ Sessionx.vim # Temporary .netrwhist -*~ - # Auto-generated tag files tags - # Persistent undo [._]*.un~ -# Coc configuration directory -.vim - ### VirtualEnv ### # Virtualenv # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + ### VisualStudio ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. @@ -399,6 +522,7 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +[Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -438,6 +562,7 @@ StyleCopReport.xml *_p.c *_h.h *.ilk +*.meta *.obj *.iobj *.pch @@ -494,9 +619,6 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding add-in -.JustCode - # TeamCity is a build add-in _TeamCity* @@ -507,6 +629,9 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*[.json, .xml, .info] + # Visual Studio code coverage results *.coverage *.coveragexml @@ -713,7 +838,10 @@ healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ -# End of https://www.gitignore.io/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# End of https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows ### {{ cookiecutter.project_name }} ### From 89970d8f007a4df08a82f53d26dafd77ecc1d3d0 Mon Sep 17 00:00:00 2001 From: Eric Young Date: Fri, 8 Jan 2021 17:22:40 +0000 Subject: [PATCH 2/2] Add MS Visual Studio Code to `.gitignore`s Per PR #11 comments: https://github.com/ukgovdatascience/govcookiecutter/pull/12#discussion_r554064812 --- .gitignore | 17 ++++++++++++++--- {{ cookiecutter.repo_name }}/.gitignore | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 784348d..7236255 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -# Created by https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows -# Edit at https://www.toptal.com/developers/gitignore?templates=vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows +# Created by https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,linux,macos,flask,dotenv,django,direnv,python,windows,virtualenv,pycharm+all,visualstudio,jupyternotebooks,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=vim,venv,pydev,linux,macos,flask,dotenv,django,direnv,python,windows,virtualenv,pycharm+all,visualstudio,jupyternotebooks,visualstudiocode ### direnv ### .direnv @@ -464,6 +464,17 @@ tags # Virtualenv # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +### VisualStudioCode ### +.vscode/* +#!.vscode/tasks.json +#!.vscode/launch.json +*.code-workspace + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + ### Windows ### # Windows thumbnail cache files Thumbs.db @@ -841,7 +852,7 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ -# End of https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows +# End of https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,linux,macos,flask,dotenv,django,direnv,python,windows,virtualenv,pycharm+all,visualstudio,jupyternotebooks,visualstudiocode ### govcookiecutter ### diff --git a/{{ cookiecutter.repo_name }}/.gitignore b/{{ cookiecutter.repo_name }}/.gitignore index f08fa60..e0ba574 100644 --- a/{{ cookiecutter.repo_name }}/.gitignore +++ b/{{ cookiecutter.repo_name }}/.gitignore @@ -1,5 +1,5 @@ -# Created by https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows -# Edit at https://www.toptal.com/developers/gitignore?templates=vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows +# Created by https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,linux,macos,flask,dotenv,django,direnv,python,windows,virtualenv,pycharm+all,visualstudio,jupyternotebooks,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=vim,venv,pydev,linux,macos,flask,dotenv,django,direnv,python,windows,virtualenv,pycharm+all,visualstudio,jupyternotebooks,visualstudiocode ### direnv ### .direnv @@ -464,6 +464,17 @@ tags # Virtualenv # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +### VisualStudioCode ### +.vscode/* +#!.vscode/tasks.json +#!.vscode/launch.json +*.code-workspace + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + ### Windows ### # Windows thumbnail cache files Thumbs.db @@ -841,7 +852,7 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ -# End of https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,flask,dotenv,django,direnv,python,virtualenv,pycharm+all,visualstudio,jupyternotebooks,macos,linux,windows +# End of https://www.toptal.com/developers/gitignore/api/vim,venv,pydev,linux,macos,flask,dotenv,django,direnv,python,windows,virtualenv,pycharm+all,visualstudio,jupyternotebooks,visualstudiocode ### {{ cookiecutter.project_name }} ###