Briefly describe the purpose and functionality of your project, script, or tool
This is a boilerplate TEMPLATE for Python projects. It's a starting point that (hopefully) helps cut down on the repetitive project setup tasks and help keep project file structures consistent.
Included are...
- A boilerplate
main.py
script with logging, cli arguments, and a few other things to help you get started .env
and.config
files to help keep secrets secret and simplify configuring your script to run by other users- An
environment.yml
file for configuring and setting up environments for your tool - Initial test framework and Travis CI integration already setup and ready to rock and roll
- VSCode
.vscode/
dir with configs for your project to utilizeunittest
and speed up
This should be a quick/small instruction set for how to run the script, with more a detailed instructions below
- Create a project from this template and alter as you need.
- Install dependancies (see Setup the environment below)
- Run the project via its' entry-point,
main.py
, passing in any required arguments
python main.py <args>
- Project Owner: name
- Project's Web Page: https://www.web.site
Describe how to quickly get started running your project.
Clone this repository to your local machine, create a VENV and install the project's requirements, then run main.py
.
- Create the conda VENV for the project and install the required packages
conda env create -f environment.yml -n <new-environment-name>
- Activate the new VENV
conda activate <new-environment-name>
pip install -r requirements.txt
- Rename
.config.TEMPLATE
to.config
. Edit values to work with your local machine. - Rename
.env.TEMPLATE
to.env
and update it with any required secrets
- Activate the VENV in your terminal and test the project
conda activate project_name
python main.py <arguments>
List any requirements or additional setup as needed to develop/contribute to this project.
*List any development-specific environment settings or steps here.
In VSCode, use the Testing pane.
From the Command Palette (F1 or ctrl/cmd+shift+p):
View: Show Testing
From the command line:
python -m unittest tests
Detail how to contribute to this project
Add more notes here if needed, or feel free remove from the README
- Store secrets, credentials, or confidential information in
.env
.- Use them in the script with
os.environ
. (e.g.os.environ['GITHUB_TOKEN']
)
- Use them in the script with
- Store any configuration variables (information that changes from machine to machine) in
.config
- Reference them in the script with
cfg
. (e.g.cfg.RESOURCE_PATH
)
- Reference them in the script with
This project adheres to the following standards:
Use this area for some quick contribution points or guidelines for devs
- Use
snake_case
for variable names - Use
camelCase
for function names- The first word (lowercase) should be a verb that describes the action it takes. (e.g.
parseData()
)
- The first word (lowercase) should be a verb that describes the action it takes. (e.g.
- Define constants near the top of the file, below imports/setup, with
UPPER_CASE_LIKE_THIS
- Import order, etc