Skip to content

Commit b3c4a26

Browse files
committed
🎉 Initial commit
0 parents  commit b3c4a26

24 files changed

Lines changed: 1461 additions & 0 deletions

.github/release_sources.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changes to any file or a file within a directory will trigger a release.
2+
src:
3+
- 'src/**'
4+
- 'pyproject.toml'
5+
- 'README.md'

.github/workflows/codeql.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '0 0 * * *'
21+
workflow_dispatch:
22+
23+
permissions: {}
24+
25+
jobs:
26+
analyze:
27+
name: Analyze
28+
# Runner size impacts CodeQL analysis time. To learn more, please see:
29+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
30+
# - https://gh.io/supported-runners-and-hardware-resources
31+
# - https://gh.io/using-larger-runners
32+
# Consider using larger runners for possible analysis time improvements.
33+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
34+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
35+
permissions:
36+
# required for all workflows
37+
security-events: write
38+
39+
# only required for workflows in private repositories
40+
actions: read
41+
contents: read
42+
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
language: [ 'python' ]
47+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
48+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
49+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
50+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
51+
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
# Initializes the CodeQL tools for scanning.
57+
- name: Initialize CodeQL
58+
uses: github/codeql-action/init@v3
59+
with:
60+
languages: ${{ matrix.language }}
61+
# If you wish to specify custom queries, you can do so here or in a config file.
62+
# By default, queries listed here will override any specified in a config file.
63+
# Prefix the list here with "+" to use these queries and those in the config file.
64+
65+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
66+
# queries: security-extended,security-and-quality
67+
68+
69+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
70+
# If this step fails, then you should remove it and run the build manually (see below)
71+
- name: Autobuild
72+
uses: github/codeql-action/autobuild@v3
73+
74+
# ℹ️ Command-line programs to run using the OS shell.
75+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
76+
77+
# If the Autobuild fails above, remove it and uncomment the following three lines.
78+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
79+
80+
# - run: |
81+
# echo "Run, Build Application using script"
82+
# ./location_of_script_within_repo/buildscript.sh
83+
84+
- name: Perform CodeQL Analysis
85+
uses: github/codeql-action/analyze@v3
86+
with:
87+
category: "/language:${{matrix.language}}"

.github/workflows/standard.yaml

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
# ----------------------------------------------------------------------
2+
# |
3+
# | Copyright (c) 2024 David Brownell
4+
# | Distributed under the MIT License.
5+
# |
6+
# ----------------------------------------------------------------------
7+
name: "Standard"
8+
9+
run-name: ${{ github.run_number }} [${{ github.actor }}] on ${{ github.ref_name }}
10+
11+
on:
12+
pull_request:
13+
branches:
14+
- main
15+
push:
16+
branches:
17+
- main
18+
schedule:
19+
- cron: '0 0 * * *' # Once a day at 12am UTC
20+
workflow_dispatch:
21+
22+
permissions: {}
23+
24+
jobs:
25+
# ----------------------------------------------------------------------
26+
action_contexts:
27+
name: "Display GitHub Action Contexts"
28+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_display_action_contexts.yaml@CI-v0.20.0
29+
30+
# ----------------------------------------------------------------------
31+
validate:
32+
strategy:
33+
fail-fast: false
34+
35+
matrix:
36+
os:
37+
- macos-latest
38+
- ubuntu-latest
39+
- windows-latest
40+
41+
python_version:
42+
- "3.12"
43+
- "3.11"
44+
- "3.10"
45+
# - "3.9" # Not supported
46+
# - "3.8" # Not supported
47+
48+
name: Validate
49+
50+
permissions:
51+
contents: read
52+
53+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_validate_python.yaml@CI-v0.20.0
54+
with:
55+
operating_system: ${{ matrix.os }}
56+
python_version: ${{ matrix.python_version }}
57+
58+
# ----------------------------------------------------------------------
59+
package_coverage:
60+
needs: validate
61+
62+
name: Postprocess Coverage Info
63+
64+
permissions:
65+
contents: read
66+
67+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_package_python_coverage.yaml@CI-v0.20.0
68+
with:
69+
gist_id: f15146b1b8fdc0a5d45ac0eb786a84f7
70+
gist_filename: FileBackup_coverage.json
71+
secrets:
72+
GIST_TOKEN: ${{ secrets.GIST_TOKEN }}
73+
74+
# ----------------------------------------------------------------------
75+
create_package:
76+
needs: validate
77+
78+
strategy:
79+
fail-fast: false
80+
81+
matrix:
82+
os:
83+
- macos-latest
84+
- ubuntu-latest
85+
- windows-latest
86+
87+
python_version:
88+
- "3.12"
89+
- "3.11"
90+
- "3.10"
91+
# - "3.9" # Not supported
92+
# - "3.8" # Not supported
93+
94+
name: Create Package
95+
96+
permissions:
97+
contents: read
98+
99+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_create_python_package.yaml@CI-v0.20.0
100+
with:
101+
operating_system: ${{ matrix.os }}
102+
python_version: ${{ matrix.python_version }}
103+
104+
# ----------------------------------------------------------------------
105+
validate_package:
106+
needs: create_package
107+
108+
strategy:
109+
fail-fast: false
110+
111+
matrix:
112+
os:
113+
- macos-latest
114+
- ubuntu-latest
115+
- windows-latest
116+
117+
python_version:
118+
- "3.12"
119+
- "3.11"
120+
- "3.10"
121+
# - "3.9" # Not supported
122+
# - "3.8" # Not supported
123+
124+
name: Validate Package
125+
126+
permissions:
127+
contents: read
128+
129+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_validate_python_package.yaml@CI-v0.20.0
130+
with:
131+
operating_system: ${{ matrix.os }}
132+
python_version: ${{ matrix.python_version }}
133+
validation_command: python -c "from FileBackup import __version__; print(__version__)"
134+
135+
# ----------------------------------------------------------------------
136+
create_binary:
137+
needs: validate
138+
139+
strategy:
140+
fail-fast: false
141+
142+
matrix:
143+
os:
144+
- macos-latest
145+
- ubuntu-latest
146+
- windows-latest
147+
148+
python_version:
149+
- "3.11"
150+
151+
name: Create Binary
152+
153+
permissions:
154+
contents: read
155+
156+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_create_python_binary.yaml@CI-v0.20.0
157+
with:
158+
operating_system: ${{ matrix.os }}
159+
python_version: ${{ matrix.python_version }}
160+
161+
# ----------------------------------------------------------------------
162+
validate_binary:
163+
needs: create_binary
164+
165+
strategy:
166+
fail-fast: false
167+
168+
matrix:
169+
os:
170+
- macos-latest
171+
- ubuntu-latest
172+
- windows-latest
173+
174+
python_version:
175+
- "3.11"
176+
177+
name: Validate Binary
178+
179+
permissions:
180+
contents: read
181+
182+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_validate_python_binary.yaml@CI-v0.20.0
183+
with:
184+
operating_system: ${{ matrix.os }}
185+
python_version: ${{ matrix.python_version }}
186+
validation_command: FileBackup Version
187+
188+
189+
# ----------------------------------------------------------------------
190+
create_docker_image:
191+
needs: validate
192+
193+
strategy:
194+
fail-fast: false
195+
196+
matrix:
197+
python_version:
198+
- "3.12"
199+
- "3.11"
200+
- "3.10"
201+
# - "3.9" # Not supported
202+
# - "3.8" # Not supported
203+
204+
name: Create Docker Image
205+
206+
permissions:
207+
contents: read
208+
packages: write
209+
210+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_create_docker_image.yaml@CI-v0.20.0
211+
with:
212+
operating_system: ubuntu-latest
213+
python_version: ${{ matrix.python_version }}
214+
name_suffix: -${{ matrix.python_version }}
215+
bootstrap_args: ""
216+
docker_description: "FileBackup - ${{ matrix.python_version }}"
217+
push_image_as_package: true
218+
container_registry_username: davidbrownell
219+
220+
221+
# ----------------------------------------------------------------------
222+
publish:
223+
needs:
224+
- validate_package
225+
- validate_binary
226+
227+
- create_docker_image
228+
229+
230+
name: Publish
231+
232+
permissions:
233+
contents: write
234+
235+
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_publish_python.yaml@CI-v0.20.0
236+
with:
237+
release_sources_configuration_filename: .github/release_sources.yaml
238+
secrets:
239+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
240+
241+
MINISIGN_PRIVATE_KEY: ${{ secrets.MINISIGN_PRIVATE_KEY }}
242+

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Activate*.cmd
2+
Activate*.sh
3+
Deactivate*.cmd
4+
Deactivate*.sh
5+
6+
**/__pycache__/**
7+
**/Generated/**
8+
**/.coverage
9+
**/lcov.info
10+
**/.vscode
11+
12+
build/**
13+
dist/**
14+
src/FileBackup.egg-info/**
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#############################################################################################################
2+
# This file is used by PythonProjectBootstrapper (https://github.com/gt-sse-center/PythonProjectBootstrapper)
3+
# to rerun generation on this python package. To use this file, run the following command from within this
4+
# working directory:
5+
#
6+
# PythonProjectBootstrapper package . --config .python_project_bootstrapper_config.yml
7+
#
8+
#############################################################################################################
9+
default_context:
10+
name: David Brownell
11+
email: db@DavidBrownell.com
12+
project_description: Tool for creating and restoring file system backups.
13+
license: MIT
14+
github_url: https://github.com
15+
github_username: davidbrownell
16+
github_project_name: FileBackup
17+
pypi_project_name: FileBackup
18+
gist_id: f15146b1b8fdc0a5d45ac0eb786a84f7
19+
gist_username: davidbrownell
20+
minisign_public_key: RWTO8gifpEKQhwiguxsldM47Php1GeTs0foueIpaLPp0xSy0N5FBn/70
21+
openssf_best_practices_badge_id: 9068
22+
create_docker_image: True

0 commit comments

Comments
 (0)