Skip to content

connorwilloughby/python_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

welcome to the python starter template

This is a template that we have created to give everyone a much needed foundation to start their journey in python development. Please not this is a windows specific project and will not work with linux or other operating systems.

Built and maintained by @connorwilloughby. Please let me know if you have any questions and we can get you set up.

contents

  1. New users
    1. Collaboration software
    2. Handy extensions
  2. Documentation
    1. Packages
    2. Critical Files
      1. req.txt
      2. .vscode/launch.json
      3. .vscode/extensions.json
      4. main.py
  3. Support
    1. Admins

new users

Welcome! 👋👋

To get access to this repo, if you're looking to add a new user you will need the following:

collaboration software

  • Github Desktop
    • recommended for beginners
    • alternative would be the source control extension in vscode which requires an understanding of git / source control

handy extensions

So these aren't required however they will save you a huge amount of time / hassle and more importantly keep you sane when working on complex projects.

These are all installed by searching in the vscode extensions marketplace

If anyone knows how to link these please update the docs!

  • Python Extension
    • most important on the list as it will add intelligent typing and hints to your repo
  • Python Virtual Environment manager
  • Solar Lint
    • a powerful extension which will give basically perfect the code you write
  • Github Autopilot
    • a useful tool which will write much of your code for you

documentation

So there are a few things that we've built here for you. These code blocks will explain each step.

packages

literally the most important part of repo management

So setting up packages is an important part of sharing code with others. To get set up in a repo the owner SHOULD have a script explaining their dependencies set up however this is not always present.

We've put an example here of what needs to be added to your VS Code terminal in order to collect some example packages for this repo.

# this line creates a virtual environment
py -m venv venv
# in windows this line will allow the rest of the script to go ahead
# if in powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# this line starts the environment
.\/venv/scripts/activate
# this line will update your pip (package installer) version 
py -m pip install --upgrade pip
# this line will install all dependencies
py -m pip install -r req.txt

critical files

Firstly this repo currently very few critical files so please do take the time to look into each of these.

req.txt

This is a file which lists all packages required to run your script.

If you need add a package you can do this with direct terminal addition. Once you have finished you can use the following terminal command pip freeze > req.txt. This will replace the file with version specific dependencies for your code.

To run and collect dependencies its py -m pip install -r req.txt

.vscode/launch.json

Another more simple file thats used by vscode for setting up debugging. This is a pretty advanced subject so id say fire and forget on this one and if there are any issues consult the section below

File Documentation General Documentation.

.vscode/extensions.json

This ones more experimental and im not entirely sure if it works. Its purpose is to tell people when they have missing extensions such as the ones listed here

File Documentation. General Documentation.

.gitignore

This file is used to IGNORE parts of your repo in git. Decent naming right?! This is critical to save you from storing potentially massive packages in repos, we don't like this.

The one were using is maintained by github themselves (more info in docs below) and simply removes common python projects which would otherwise clog up your repo.

File Documentation. File Documentation.

main.py

This is a really simple bit of code mostly for training. Its not very important.

If you're wondering why I've included if name main here please watch this video YouTube link

support

So we have created a few channels for python support the current best place for support is the Python Pros team chat. If you don't have access you can ask anyone in the admin section.

You can alternatively reach us on teams directly!

admins

name github account
Connor Willoughby @connorwilloughby
Mohammed Eldosoky @mo1878

Thats it, well done if you read this far! 🎉

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages