Skip to content

Commit 26b95e9

Browse files
Merge pull request #17 from MITLibraries/update-readme-and-makefile
Update README and Makefile
2 parents e252fa2 + 9f82a72 commit 26b95e9

File tree

2 files changed

+29
-28
lines changed

2 files changed

+29
-28
lines changed

Makefile

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,57 @@
11
SHELL=/bin/bash
22
DATETIME:=$(shell date -u +%Y%m%dT%H%M%SZ)
33

4-
help: # preview Makefile commands
4+
help: # Preview Makefile commands
55
@awk 'BEGIN { FS = ":.*#"; print "Usage: make <target>\n\nTargets:" } \
66
/^[-_[:alpha:]]+:.?*#/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)
77

8-
## ---- Dependency commands ---- ##
8+
#######################
9+
# Dependency commands
10+
#######################
911

10-
install: # install Python dependencies
12+
install: # Install Python dependencies
1113
pipenv install --dev
1214
pipenv run pre-commit install
1315

14-
update: install # update Python dependencies
16+
update: install # Update Python dependencies
1517
pipenv clean
1618
pipenv update --dev
1719

18-
## ---- Unit test commands ---- ##
20+
######################
21+
# Unit test commands
22+
######################
1923

20-
test: # run tests and print a coverage report
24+
test: # Run tests and print a coverage report
2125
pipenv run coverage run --source=my_app -m pytest -vv
2226
pipenv run coverage report -m
2327

24-
coveralls: test # write coverage data to an LCOV report
28+
coveralls: test # Write coverage data to an LCOV report
2529
pipenv run coverage lcov -o ./coverage/lcov.info
2630

31+
####################################
32+
# Code quality and safety commands
33+
####################################
2734

28-
## ---- Code quality and safety commands ---- ##
35+
lint: black mypy ruff safety # Run linters
2936

30-
lint: black mypy ruff safety # run linters
31-
32-
black: # run 'black' linter and print a preview of suggested changes
37+
black: # Run 'black' linter and print a preview of suggested changes
3338
pipenv run black --check --diff .
3439

35-
mypy: # run 'mypy' linter
40+
mypy: # Run 'mypy' linter
3641
pipenv run mypy .
3742

38-
ruff: # run 'ruff' linter and print a preview of errors
43+
ruff: # Run 'ruff' linter and print a preview of errors
3944
pipenv run ruff check .
4045

41-
safety: # check for security vulnerabilities and verify Pipfile.lock is up-to-date
46+
safety: # Check for security vulnerabilities and verify Pipfile.lock is up-to-date
4247
pipenv check
4348
pipenv verify
4449

45-
lint-apply: # apply changes with 'black' and resolve 'fixable errors' with 'ruff'
50+
lint-apply: # Apply changes with 'black' and resolve 'fixable errors' with 'ruff'
4651
black-apply ruff-apply
4752

48-
black-apply: # apply changes with 'black'
53+
black-apply: # Apply changes with 'black'
4954
pipenv run black .
5055

51-
ruff-apply: # resolve 'fixable errors' with 'ruff'
56+
ruff-apply: # Resolve 'fixable errors' with 'ruff'
5257
pipenv run ruff check --fix .

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A template repository for creating Python CLI applications.
44

5-
## App setup (delete this section and above after initial application setup)
5+
## App Setup (delete this section and above after initial application setup)
66

77
1. Rename "my_app" to the desired app name across the repo. (May be helpful to do a project-wide find-and-replace).
88
2. Update Python version if needed.
@@ -33,25 +33,21 @@ Description of the app
3333
- To lint the repo: `make lint`
3434
- To run the app: `pipenv run my_app --help`
3535

36-
## Environment variables
36+
## Environment Variables
3737

3838
### Required
3939

40-
```
41-
# If set to a valid Sentry DSN, enables Sentry exception monitoring. This is not needed for local development.
42-
SENTRY_DSN=
43-
44-
# Set to `dev` for local development, this will be set to `stage` and `prod` in those environments by Terraform.
45-
WORKSPACE=
40+
```shell
41+
SENTRY_DSN=### If set to a valid Sentry DSN, enables Sentry exception monitoring. This is not needed for local development.
42+
WORKSPACE=### Set to `dev` for local development, this will be set to `stage` and `prod` in those environments by Terraform.
4643
```
4744

4845
### Optional
4946

5047
_Delete this section if it isn't applicable to the PR._
5148

52-
```
53-
# Description for optional environment variable
54-
<OPTIONAL_ENV>=
49+
```shell
50+
<OPTIONAL_ENV>=### Description for optional environment variable
5551
```
5652

5753

0 commit comments

Comments
 (0)