Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
1ad4070
Add rich traceback, Fix size bug in space edit command
tgross03 Dec 10, 2025
046bf46
Merge branch 'main' into add_docs
tgross03 Dec 10, 2025
ea44755
Add first pages, Add logo, Set Theme
tgross03 Dec 11, 2025
f852ea1
Cleanup
tgross03 Dec 11, 2025
1684158
Fix logo in README
tgross03 Dec 11, 2025
8b9ab31
Restructure docs
tgross03 Dec 12, 2025
e8931a1
Restructure docs
tgross03 Dec 15, 2025
f3a1d2c
Restructure docs
tgross03 Dec 18, 2025
3cfb5e3
Add CLI reference, Add first guides and structure to docs
tgross03 Dec 19, 2025
d72b142
Add API reference extensions
tgross03 Dec 21, 2025
85968fe
Remove old source file
tgross03 Dec 21, 2025
64e4c8a
Fix logo in README
tgross03 Dec 21, 2025
95c0f20
Restructure package, Start creation of API reference
tgross03 Dec 21, 2025
4d52992
Cleanup import structure
tgross03 Dec 22, 2025
5b127ff
Finish API reference
tgross03 Dec 22, 2025
dc3cd16
Remove pandas from dependencies
tgross03 Dec 22, 2025
ed4e899
Add towncrier, Add scripts
tgross03 Dec 22, 2025
d5f2d30
Add remote upload test workflow
tgross03 Dec 22, 2025
d6cc7a7
Fix scp
tgross03 Dec 22, 2025
470228f
Fix scp
tgross03 Dec 22, 2025
4b7ea0a
Fix scp v3
tgross03 Dec 22, 2025
d64447f
Fix scp v4
tgross03 Dec 22, 2025
b612e56
Fix scp v5
tgross03 Dec 22, 2025
4af9f1f
Fix ssh key generation
tgross03 Dec 22, 2025
e203cd4
Fix ssh key generation
tgross03 Dec 22, 2025
383e0b4
Fix ssh on remote
tgross03 Dec 22, 2025
6f547ac
Fix ssh on remote
tgross03 Dec 22, 2025
9869010
Reduce verbosity of workflow
tgross03 Dec 22, 2025
426d5f7
Fix Protocol not existing error
tgross03 Dec 22, 2025
1e0ec8f
Fix Protocol not existing error
tgross03 Dec 22, 2025
0f1066b
Change generated directory
tgross03 Dec 22, 2025
45f0ed8
Raise verbosity level for ssh / scp commands
tgross03 Dec 22, 2025
6f1f84e
Update workflow event
tgross03 Dec 22, 2025
21e523e
Update workflow, Remove scripts
tgross03 Dec 23, 2025
b9735b3
Add transparency notice
tgross03 Dec 27, 2025
026f411
Modify transparency notice
tgross03 Dec 27, 2025
c1057dd
Add AI guidelines, Add docs test
tgross03 Dec 28, 2025
548b816
Merge branch 'main' into add_docs
tgross03 Dec 31, 2025
5e06294
Add changelog
tgross03 Dec 31, 2025
f69af3b
Add tutorial for using 'towncrier' changelogs
tgross03 Dec 31, 2025
55796a3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 31, 2025
7311ae4
Remove test changes
tgross03 Dec 31, 2025
51df0ef
Add tutorial to towncrier ignore
tgross03 Dec 31, 2025
205514d
Add changelog workflow, Adjust test / docs workflow
tgross03 Dec 31, 2025
e5eb3cd
Add ignore label to changelog workflow
tgross03 Dec 31, 2025
76655be
Add ignore label to changelog workflow
tgross03 Dec 31, 2025
513e49c
Fix ignore label in changelog workflow
tgross03 Dec 31, 2025
cd0afad
Fix quotes in changelog.yml for ignore label check
tgross03 Dec 31, 2025
292c038
Fix changelog workflow ignore label
tgross03 Dec 31, 2025
f7e204f
Fix changelog workflow ignore label
tgross03 Dec 31, 2025
f15dc2d
Fix changelog workflow ignore label
tgross03 Dec 31, 2025
2bc9a05
Fix changelog workflow ignore label
tgross03 Dec 31, 2025
19efb1d
Fix changelog workflow
tgross03 Dec 31, 2025
336f174
Fix changelog workflow
tgross03 Dec 31, 2025
754e97a
Fix changelog workflow
tgross03 Dec 31, 2025
004df05
Add test changelog
tgross03 Jan 1, 2026
118a7c5
Fix changelog workflow
tgross03 Jan 1, 2026
01202de
Fix release workflow
tgross03 Jan 1, 2026
74b9ac7
Fix release workflow
tgross03 Jan 1, 2026
2da292d
Fix release workflow
tgross03 Jan 1, 2026
ed1d53b
Fix release workflow
tgross03 Jan 1, 2026
ab09fe3
Create Changelog for v0.1.0-beta1
Jan 1, 2026
45dfc1f
Change release workflow order
tgross03 Jan 1, 2026
b54445d
Add test changes
tgross03 Jan 1, 2026
171d854
Add test changes (for PR 3)
tgross03 Jan 1, 2026
5ba93da
Add CHANGELOG.rst to towncrier ignore
tgross03 Jan 1, 2026
8906e7c
Create Changelog for v0.1.0-beta1
backpy-robot[bot] Jan 1, 2026
40bf251
Remove test CHANGELOG
tgross03 Jan 2, 2026
b6108ee
Add dependency groups
tgross03 Jan 2, 2026
878da08
Remove toml, Add tomli_w
tgross03 Jan 2, 2026
c381947
fix: Wrong types in config set CLI
tgross03 Feb 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Changelog

on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]

permissions:
contents: read

env:
PR_NUMBER: ${{ github.event.number }}

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Check for file
if: ${{
hashFiles(format('docs/changes/{0}.*.rst', github.event.number)) == '' &&
! contains( github.event.pull_request.labels.*.name, 'skip-changelog')
}}
run: |
ls docs/changes
echo ERROR: No changelog file found for pull request \#"$PR_NUMBER"!
exit 1

43 changes: 23 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: CI

on:
Expand All @@ -21,7 +18,7 @@ jobs:
python-version: ["3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -31,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e ".[tests]"
pip install -e . --group tests
pip freeze

- name: Test with pytest
Expand All @@ -43,18 +40,24 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

# pre-commit:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.14"]
#
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Display Python version
# run: python -c "import sys; print(sys.version)"
# - uses: pre-commit/action@v3.0.1
test_docs:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
architecture: 'x64'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install documentation dependencies
run: |
pip install --upgrade pip
pip install -e . --group docs
pip freeze
- name: Build documentation
run: |
make -C docs html
90 changes: 90 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Docs

on:
release:
types: [published]

permissions:
contents: write

jobs:
build_and_release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
architecture: 'x64'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e . --group docs
pip freeze
- name: Build towncrier
run: |
towncrier build --yes

- name: Build sphinx docs
run: |
make -C docs html
- name: Compress build
run: |
sudo apt update --yes && sudo apt install zip --yes
cd docs/_build/html && zip -r ../html.zip ./*
cd ../../../

# The App Token creation and git config setup were adapted from:
# - create-github-app-token (https://github.com/actions/create-github-app-token)
# Originally licensed under MIT License. Copyright (c) 2023 Gregor Martynus, Parker Brown.
- name: Create GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Setup git config
run: |
set +x
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
- name: Commit and Push
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
set +x
git add -u docs/changes/
git add docs/changes/*.rst
git commit -m "Create Changelog for ${{ github.event.release.tag_name }}" || exit 0

git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:${{ github.event.release.target_commitish }}

# Inspired by: https://stackoverflow.com/a/60479844 and https://stackoverflow.com/a/70447517
- name: Create SSH key
run: |
install -m 600 -D /dev/null ~/.ssh/id_key
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_key
ssh-keyscan -H "$SSH_HOSTNAME" > ~/.ssh/known_hosts
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
SSH_HOSTNAME: ${{secrets.SSH_HOSTNAME}}
- name: Upload to server
run: |
ssh -v -i ~/.ssh/id_key "$SSH_USER@$SSH_HOSTNAME" "rm -rf '$SSH_TARGET_DIR/' && mkdir -p '$SSH_TARGET_DIR'"
scp -v -i ~/.ssh/id_key -r docs/_build/html.zip "$SSH_USER"@"$SSH_HOSTNAME":"$SSH_TARGET_DIR"/html.zip
ssh -v -i ~/.ssh/id_key "$SSH_USER@$SSH_HOSTNAME" "unzip -o '$SSH_TARGET_DIR/html.zip' -d '$SSH_TARGET_DIR' && rm -rf '$SSH_TARGET_DIR/html.zip'"
env:
SSH_USER: ${{secrets.SSH_USER}}
SSH_HOSTNAME: ${{secrets.SSH_HOSTNAME}}
SSH_TARGET_DIR: ${{secrets.SSH_TARGET_DIR}}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/build
docs/_generated

# PyBuilder
.pybuilder/
Expand Down
9 changes: 4 additions & 5 deletions ASSETS_LEGAL.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
==============
Asset Licenses
==============
--------------

This file documents the sources and licenses of additional media used within this repository,
which is not inside of the main source code of the module.

**Backpy Logo and Icon**

=================== ===================================================================================================================================================================
**File** `</assets/backpy_logo.png>`_ `</assets/backpy_icon.png>`_
=================== ==========================================================================================================================================================================================================================================================================================
**File** `</docs/_static/logos/backpy_logo_dark.png>`_ `</docs/_static/logos/backpy_logo_light.png>`_ `</docs/_static/logos/backpy_icon_dark.png>`_ `</docs/_static/logos/backpy_icon_light.png>`_ `</docs/_static/logos/backpy_header_dark.png>`_ `</docs/_static/logos/backpy_header_light.png>`_
**Author** `<https://github.com/tgross03>`_
**Used Elements** | `Font Awesome 'database' icon <https://fontawesome.com/icons/database?f=classic&s=solid>`_ (License: `CC-4.0-BY <https://creativecommons.org/licenses/by/4.0/>`_)
| `Catppuccin Colors <https://catppuccin.com/palette/>`_ (License: `MIT License <https://catppuccin.com/licensing/>`_)
=================== ===================================================================================================================================================================
=================== ==========================================================================================================================================================================================================================================================================================


103 changes: 100 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ Public License instead of this License. But first, please read

### Third-party code notice

This project includes adapted code from the following sources:
This project includes adapted code or assets from the following sources:

- pyvisgen (https://github.com/radionets-project/pyvisgen)
Licensed under the MIT License.
Expand All @@ -685,7 +685,15 @@ This project includes adapted code from the following sources:
Licensed under the BSD 3-Clause License.
Copyright (c) 2011-2024, Astropy Developers

The original MIT License and BSD 3-Clause License texts are included below:
- Fira Sans Font (https://fonts.google.com/specimen/Fira+Sans)
Licensed under the SIL Open Font License, Version 1.1.
Copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.

- JetBrains Mono Font (https://fonts.google.com/specimen/JetBrains+Mono)
Licensed under the SIL Open Font License, Version 1.1.
Copyright (c) 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)

The original MIT License, BSD 3-Clause License and SIL Open Font License, Version 1.1 texts are included below:

--------------------

Expand Down Expand Up @@ -738,4 +746,93 @@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PRO
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# backpy [![CI Status](https://github.com/tgross03/backpy/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/tgross03/backpy/actions/workflows/ci.yml?branch=main) [![codecov](https://codecov.io/gh/tgross03/backpy/graph/badge.svg?token=NSQD951ZPJ)](https://codecov.io/gh/tgross03/backpy) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/tgross03/backpy/main.svg)](https://results.pre-commit.ci/latest/github/tgross03/backpy/main) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)


[![BackPy Logo](./assets/backpy_logo.png)](https://github.com/tgross03/backpy)
[![BackPy Logo](./docs/_static/logos/backpy_logo_dark.png)](https://github.com/tgross03/backpy)

> [!CAUTION]
> This package is still in development and not stable at this time! Features and functionalities might not work as expected.
Expand Down
Binary file removed assets/backpy_icon.png
Binary file not shown.
Binary file removed assets/backpy_logo.png
Binary file not shown.
28 changes: 9 additions & 19 deletions backpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
from __future__ import annotations

from backpy.core.config.configuration import TOMLConfiguration
from backpy.core.config import TOMLConfiguration
from backpy.core.config.variables import VariableLibrary

VariableLibrary()
from backpy import version

from rich import traceback

from backpy.core.backup import compression
from backpy.core.utils.times import TimeObject
from backpy.core.remote import Remote, Protocol
traceback.install(show_locals=True)

# Import in the correct order to avoid circular imports
from backpy.core.backup.types import BackupSpaceType
from backpy.core.backup.backup_space import BackupSpace
from backpy.core.backup.backup import Backup
from backpy.core.backup.file_backup_space import FileBackupSpace
VariableLibrary()

__all__ = [
"FileBackupSpace",
"TOMLConfiguration",
"VariableLibrary",
"BackupSpace",
"BackupSpaceType",
"Backup",
"compression",
"TimeObject",
"Remote",
"Protocol",
"TOMLConfiguration",
]

__version__ = version.__version__
Loading
Loading