Skip to content

Commit 3fad4cd

Browse files
authored
Add resources specific to Python (#1)
2 parents 528efa2 + 0860b12 commit 3fad4cd

File tree

6 files changed

+109
-1
lines changed

6 files changed

+109
-1
lines changed

.borg.template.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file configures `borg` when this repository is used as a source.
2+
# This file should only be present in a template repository.
3+
4+
# If this file is present in a child repository, it should be deleted.
5+
6+
[template]
7+
files = [
8+
# All SecOps Repos
9+
".gitattributes",
10+
".github/workflows/pr_reminder.yml",
11+
".github/workflows/cleanup.yml",
12+
"CODE_OF_CONDUCT.md",
13+
"SECURITY.md",
14+
]

.borg.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[source]
2+
url = 'https://raw.githubusercontent.com/techservicesillinois/secdev-template-repository/refs/heads/main/'
3+
# Additional configuration will be loaded from `<url>/.borg.template.toml`

.gitattributes

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitignore

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
VENV_PYTHON:=venv/bin/python
2+
SRCS:=$(shell find src tests -name '*.py')
3+
4+
all: test
5+
6+
venv: requirements-test.in requirements.in
7+
rm -rf $@
8+
python -m venv venv
9+
$(VENV_PYTHON) -m pip install -r $^
10+
# Install dependencies from pyproject.toml
11+
$(VENV_PYTHON) -m pip install -e .
12+
13+
lint: venv .lint
14+
.lint: $(SRCS) $(TSCS)
15+
$(VENV_PYTHON) -m flake8 $?
16+
touch $@
17+
18+
static: venv .static
19+
.static: $(SRCS) $(TSCS)
20+
echo "Code: $(SRCS)"
21+
echo "Test: $(TSCS)"
22+
$(VENV_PYTHON) -m mypy $^
23+
touch $@
24+
25+
autopep8:
26+
autopep8 --in-place $(SRCS)
27+
28+
unit: venv
29+
$(VENV_PYTHON) -m pytest
30+
31+
test: lint static unit
32+
33+
clean:
34+
rm -rf .lint .static
35+
rm -rf .mypy_cache
36+
-find src -type d -name __pycache__ -exec rm -fr "{}" \;
37+
38+
force-clean: clean
39+
rm -rf venv

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## About
22

33
This repository is used by Cybersecurity operations teams at the
4-
University of Illinois as a GitHub template.
4+
University of Illinois as a GitHub template *for Python projects*.
55

66
This resource helps comply with University of Illinois
77
Cybersecurity standards - including [IT-07][it07], [IT08][it08],

0 commit comments

Comments
 (0)