Compare commits

..

9 Commits

Author SHA1 Message Date
8eeb7fab40 chore(deps): update dependency pylint to v3.3.4
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
Python Linters / pylint (pull_request) Successful in 34s
Python Linters / formatting (pull_request) Successful in 30s
Python Linters / mypy (pull_request) Successful in 31s
REUSE Compliance / reuse (pull_request) Successful in 14s
Selftests / test-build-install (pull_request) Successful in 1m14s
Selftests / test-sync (pull_request) Successful in 58s
2025-01-31 23:06:44 +00:00
bea16d9b67 Bump version: 0.2.1 → 0.2.2
All checks were successful
Python package / build (push) Successful in 1m14s
Python Linters / pylint (push) Successful in 43s
Python Linters / formatting (push) Successful in 37s
Python Linters / mypy (push) Successful in 41s
Selftests / test-build-install (push) Successful in 40s
Selftests / test-sync (push) Successful in 1m2s
REUSE Compliance / reuse (push) Successful in 19s
2025-01-12 21:25:37 +01:00
f9e46060cf Revert "update release workflow to be based on releases"
Some checks failed
Python Linters / formatting (push) Waiting to run
Python Linters / mypy (push) Waiting to run
REUSE Compliance / reuse (push) Waiting to run
Selftests / test-build-install (push) Waiting to run
Selftests / test-sync (push) Waiting to run
Python Linters / pylint (push) Has been cancelled
This reverts commit be86ebad40.

This isn't possible with act
2025-01-12 21:24:57 +01:00
b250c89d38 Bump version: 0.2.0 → 0.2.1
All checks were successful
Python Linters / pylint (push) Successful in 40s
Python Linters / formatting (push) Successful in 36s
Python Linters / mypy (push) Successful in 38s
REUSE Compliance / reuse (push) Successful in 8s
Selftests / test-build-install (push) Successful in 42s
Selftests / test-sync (push) Successful in 1m3s
2025-01-12 21:17:45 +01:00
9a598a799d Merge pull request 'Update release workflow' (#26) from release-workflow into main
Some checks are pending
Python Linters / pylint (push) Waiting to run
Python Linters / formatting (push) Waiting to run
Python Linters / mypy (push) Waiting to run
REUSE Compliance / reuse (push) Waiting to run
Selftests / test-build-install (push) Waiting to run
Selftests / test-sync (push) Waiting to run
Reviewed-on: #26
2025-01-12 21:17:35 +01:00
be86ebad40 update release workflow to be based on releases
All checks were successful
Python Linters / pylint (pull_request) Successful in 45s
Python Linters / formatting (pull_request) Successful in 37s
Python Linters / mypy (pull_request) Successful in 38s
REUSE Compliance / reuse (pull_request) Successful in 9s
Selftests / test-build-install (pull_request) Successful in 40s
Selftests / test-sync (pull_request) Successful in 1m2s
2025-01-12 21:15:46 +01:00
a61f197da9 add bump-my-version 2025-01-12 21:15:25 +01:00
6ed3e30f56 fix poetry install in ubuntu 24.04
All checks were successful
Python Linters / pylint (push) Successful in 40s
Python Linters / formatting (push) Successful in 37s
Python Linters / mypy (push) Successful in 37s
REUSE Compliance / reuse (push) Successful in 9s
Selftests / test-build-install (push) Successful in 40s
Selftests / test-sync (push) Successful in 1m4s
2025-01-12 21:06:39 +01:00
a613879338 make log file destination configurable 2025-01-12 21:06:39 +01:00
4 changed files with 23 additions and 11 deletions

View File

@@ -12,8 +12,10 @@ inputs:
runs:
using: "composite"
steps:
- name: Add pipx to PATH
run: echo "/root/.local/bin" >> ${GITHUB_PATH}
- name: Install poetry
run: pip install poetry
run: pipx install poetry
- name: Install poetry package
run: poetry install --no-interaction ${{ inputs.poetry_install_args }}
shell: bash

View File

@@ -14,11 +14,13 @@ on:
jobs:
# Test building the package and installing it via pip3
test-build-install:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Add pipx to PATH
run: echo "/root/.local/bin" >> ${GITHUB_PATH}
- name: Install poetry
run: pip install poetry
run: pipx install poetry
- name: Build package
run: poetry build
- name: Install package

12
poetry.lock generated
View File

@@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand.
[[package]]
name = "astroid"
@@ -287,13 +287,13 @@ vulture = ["vulture"]
[[package]]
name = "pylint"
version = "3.3.3"
version = "3.3.4"
description = "python code static checker"
optional = false
python-versions = ">=3.9.0"
files = [
{file = "pylint-3.3.3-py3-none-any.whl", hash = "sha256:26e271a2bc8bce0fc23833805a9076dd9b4d5194e2a02164942cb3cdc37b4183"},
{file = "pylint-3.3.3.tar.gz", hash = "sha256:07c607523b17e6d16e2ae0d7ef59602e332caa762af64203c24b41c27139f36a"},
{file = "pylint-3.3.4-py3-none-any.whl", hash = "sha256:289e6a1eb27b453b08436478391a48cd53bb0efb824873f949e709350f3de018"},
{file = "pylint-3.3.4.tar.gz", hash = "sha256:74ae7a38b177e69a9b525d0794bd8183820bfa7eb68cc1bee6e8ed22a42be4ce"},
]
[package.dependencies]
@@ -301,10 +301,10 @@ astroid = ">=3.3.8,<=3.4.0-dev0"
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
dill = [
{version = ">=0.2", markers = "python_version < \"3.11\""},
{version = ">=0.3.6", markers = "python_version >= \"3.11\""},
{version = ">=0.3.7", markers = "python_version >= \"3.12\""},
{version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""},
]
isort = ">=4.2.5,<5.13.0 || >5.13.0,<6"
isort = ">=4.2.5,<5.13.0 || >5.13.0,<7"
mccabe = ">=0.6,<0.8"
platformdirs = ">=2.2.0"
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}

View File

@@ -27,6 +27,11 @@ from ._seafile import (
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("-c", "--configdir", required=True, help="The config directory")
parser.add_argument(
"-l",
"--logfile",
help="The path to the logfile. Default: <configdir>/seafile_mirror.log",
)
parser.add_argument(
"-d",
"--dry",
@@ -52,13 +57,16 @@ parser.add_argument(
parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
def main(): # pylint: disable=too-many-locals, too-many-statements
def main(): # pylint: disable=too-many-locals, too-many-statements, too-many-branches
"""Main function"""
args = parser.parse_args()
# Set files depending on configdir
configdir = args.configdir.rstrip("/") + "/"
configfile = configdir + "seafile_mirror.conf.yaml"
cachefile = configdir + ".seafile_mirror.db.json"
if args.logfile:
logfile = args.logfile
else:
logfile = configdir + "seafile_mirror.log"
# Logging