Package: demo-project-123
Welcome to the Python Class Cookie CutterA cookie cutter is a template for creating a new project. This cookie cutter will be used to create a new Python project with all of the development tools and initial code preconfigured and ready for use with Visual Studio Code.Getting StartedTo use this Cookie Cutter you will need Python and the Cookie Cutter package installed. Also, the files created with the Cookie Cutter project template are designed to work withFor WindowsDownload the Windows Installer for Python frompython.orgOn the first page of the installation wizard, check the box to add Python to the path. This will make it easier to run Python from the command prompt.Complete the install as normal.For macOS or LinuxInstall Homebrew frombrew.shThen, run:brewinstallpythonFor All SystemsTo verify the Python installation, run the following command:python-VEnsure it outputs the version you just installed.If the version displayed is different from the version installed the most likely you will need to adjust your system paths to resolve to the new Python path. Configuring path environment variables is outside the scope of this document.Upgrade PIP and Install Cookie CutterWith Python installed, let's ensure we have the latest PIP package manager.python-mpipinstall--upgradepipsetuptoolswheelWith PIP upgraded, now the Cookie Cutter package needs to be installed. From a terminal window, run the following command:python-mpipinstallcookiecutterCreate a new Project with Cookie CutterFrom a terminal window, change to the folder where you would like to store your new project.To create the new project, run the following command:cookiecutterhttps://github.com/t4d-starter-projects/cookiecutter-create-python-projectIt will prompt you for a project name, type in a name. I recommended something with no spaces, allow lower case, and no special characters except for an underscore.A new folder is created with the project name. The contents of the cookie cutter project template are copied into the folder.Get the Project Up and Running in Visual Studio CodeFirst, ensure you have Visual Studio Code installed. It can be downloaded from herecode.visualstudio.com.Install thePython extensionfor Visual Studio Code.Start Visual Studio Code, and open the project folder created by Cookie Cutter.Open a terminal window. Within the terminal session verify you are in the folder with the "requirements.txt" file.Create a new virtual environment.python-mvenvvenvNote:On systems where you have Python 2 installed along with Python 3 you may need to use thepython3command instead of the plainpythoncommand for this one step.When the environment is created Visual Studio Code should detect it and asked you if you want to make this virtual environment the Python interpreter in Visual Studio, click "Yes".Activate the environment in the terminal window.Windows with PowerShell.\venv\Scripts\Activate.ps1macOS, Linux, Bash/Zsh Shellsource./venv/bin/activateUpgrade PIP for the virtual environment.python-mpipinstall--upgradepipsetuptoolswheelInstall the packages listed in therequirements.txtfile.python-mpipinstall-rrequirements.txtCongrats! You are all done!To run the project in various ways, here are the commands:Run the Main Modulepython-mdemo_project_123Run the Pylint Linterpython-mpylint--max-line-length=79--unsafe-load-any-extension=y--ignore=.git,venv,.vscode,__pycache__demo_project_123testsRun the Flake8 Linterpython-mflake8--exclude=venv,.git,__pycache__Run the MyPy Linterpython-mmypy--ignore-missing-imports--follow-imports=silent--show-column-numbers--strict--excludevenv.Run the Unit Tests with Code Coveragepython-mcoveragerun-munittesttests.__main__Generate Code Coverage Reportpython-mcoveragereport--omit="venv/*,tests/*,setup.py"ExtraIncluded is an Azure Pipeline file that will validate the source code per the linting rules and run unit tests and code coverage when committed code to Azure Repos.