Compare commits

12 Commits

Author SHA1 Message Date
64f3256d3d sort
Some checks failed
Python Linters / formatting (pull_request) Has been cancelled
Python Linters / mypy (pull_request) Has been cancelled
Python Linters / pylint (pull_request) Has been cancelled
REUSE Compliance / reuse (pull_request) Successful in 9s
Selftests / test-build-install (pull_request) Failing after 8s
Selftests / test-sync (pull_request) Has been cancelled
2025-01-12 19:55:01 +01:00
bf9d229fc7 add cache
Some checks failed
Python Linters / pylint (pull_request) Failing after 58s
Python Linters / formatting (pull_request) Failing after 10s
Python Linters / mypy (pull_request) Failing after 10s
REUSE Compliance / reuse (pull_request) Successful in 8s
Selftests / test-build-install (pull_request) Failing after 7s
Selftests / test-sync (pull_request) Failing after 9s
2025-01-12 19:45:10 +01:00
553dffae1f prod
Some checks failed
Python Linters / formatting (pull_request) Successful in 1m4s
Python Linters / pylint (pull_request) Failing after 1m12s
REUSE Compliance / reuse (pull_request) Successful in 14s
Selftests / test-build-install (pull_request) Failing after 11s
Python Linters / mypy (pull_request) Successful in 1m5s
Selftests / test-sync (pull_request) Failing after 58s
2025-01-12 19:37:37 +01:00
7ea7181947 syntax
Some checks failed
Python Linters / pylint (pull_request) Failing after 14s
Python Linters / formatting (pull_request) Failing after 14s
Python Linters / mypy (pull_request) Failing after 13s
REUSE Compliance / reuse (pull_request) Successful in 13s
Selftests / test-build-install (pull_request) Failing after 10s
Selftests / test-sync (pull_request) Failing after 11s
2025-01-12 19:36:45 +01:00
dfd8f242e8 try copy paste
Some checks failed
Python Linters / pylint (pull_request) Failing after 55s
Python Linters / formatting (pull_request) Failing after 54s
Python Linters / mypy (pull_request) Failing after 9s
REUSE Compliance / reuse (pull_request) Successful in 12s
Selftests / test-build-install (pull_request) Failing after 11s
Selftests / test-sync (pull_request) Failing after 9s
2025-01-12 19:06:41 +01:00
4dc7f8dc15 neu
Some checks failed
Python Linters / pylint (pull_request) Failing after 12s
Python Linters / formatting (pull_request) Failing after 12s
Python Linters / mypy (pull_request) Failing after 11s
REUSE Compliance / reuse (pull_request) Successful in 12s
Selftests / test-build-install (pull_request) Failing after 12s
Selftests / test-sync (pull_request) Failing after 12s
2025-01-12 13:24:19 +01:00
b5d635d92e echo to path
Some checks failed
Python Linters / pylint (pull_request) Failing after 14s
Python Linters / formatting (pull_request) Failing after 13s
Python Linters / mypy (pull_request) Failing after 14s
REUSE Compliance / reuse (pull_request) Successful in 13s
Selftests / test-build-install (pull_request) Failing after 11s
Selftests / test-sync (pull_request) Failing after 12s
2025-01-12 13:22:39 +01:00
752c2a37ae printenv
Some checks failed
Python Linters / pylint (pull_request) Failing after 51s
Python Linters / formatting (pull_request) Failing after 51s
REUSE Compliance / reuse (pull_request) Successful in 15s
Selftests / test-build-install (pull_request) Failing after 11s
Python Linters / mypy (pull_request) Failing after 51s
Selftests / test-sync (pull_request) Failing after 38s
2025-01-12 13:19:58 +01:00
069ffd94e3 echo
Some checks failed
Python Linters / pylint (pull_request) Failing after 53s
Python Linters / formatting (pull_request) Failing after 53s
REUSE Compliance / reuse (pull_request) Successful in 14s
Selftests / test-build-install (pull_request) Failing after 11s
Python Linters / mypy (pull_request) Failing after 50s
Selftests / test-sync (pull_request) Failing after 39s
2025-01-12 13:14:55 +01:00
8a778247ca try CI fixes
Some checks failed
Python Linters / pylint (pull_request) Failing after 51s
Python Linters / formatting (pull_request) Failing after 51s
REUSE Compliance / reuse (pull_request) Successful in 12s
Selftests / test-build-install (pull_request) Failing after 12s
Python Linters / mypy (pull_request) Failing after 45s
Selftests / test-sync (pull_request) Failing after 35s
2025-01-12 12:27:43 +01:00
6eaf0a795d fix poetry install in ubuntu 24.04
Some checks failed
Python Linters / pylint (push) Failing after 48s
Python Linters / formatting (push) Failing after 50s
REUSE Compliance / reuse (push) Successful in 13s
Selftests / test-build-install (push) Failing after 11s
Python Linters / mypy (push) Failing after 48s
Selftests / test-sync (push) Failing after 35s
2025-01-12 12:25:44 +01:00
576ef895e0 make log file destination configurable
Some checks failed
Python Linters / pylint (push) Failing after 57s
Python Linters / formatting (push) Failing after 55s
REUSE Compliance / reuse (push) Successful in 18s
Python Linters / mypy (push) Failing after 11s
Selftests / test-build-install (push) Failing after 9s
Selftests / test-sync (push) Failing after 10s
2025-01-12 12:11:58 +01:00
9 changed files with 160 additions and 864 deletions

View File

@@ -16,6 +16,10 @@ runs:
run: echo "/root/.local/bin" >> ${GITHUB_PATH} run: echo "/root/.local/bin" >> ${GITHUB_PATH}
- name: Install poetry - name: Install poetry
run: pipx install poetry run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry" # caching poetry dependencies
- name: Install poetry package - name: Install poetry package
run: poetry install --no-interaction ${{ inputs.poetry_install_args }} run: poetry install --no-interaction ${{ inputs.poetry_install_args }}
shell: bash shell: bash

View File

@@ -14,7 +14,7 @@ jobs:
pylint: pylint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v4
- name: Install dependencies - name: Install dependencies
uses: ./.gitea/actions/poetrybuild uses: ./.gitea/actions/poetrybuild
- name: Lint with pylint - name: Lint with pylint
@@ -23,7 +23,7 @@ jobs:
formatting: formatting:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v4
- name: Install dependencies - name: Install dependencies
uses: ./.gitea/actions/poetrybuild uses: ./.gitea/actions/poetrybuild
- name: Test formatting with isort and black - name: Test formatting with isort and black
@@ -34,7 +34,7 @@ jobs:
mypy: mypy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v4
- name: Install dependencies - name: Install dependencies
uses: ./.gitea/actions/poetrybuild uses: ./.gitea/actions/poetrybuild
- name: Test typing with mypy - name: Test typing with mypy

View File

@@ -11,8 +11,8 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v4
- name: Build and publish to PyPI - name: Build and publish to PyPI
uses: https://github.com/JRubics/poetry-publish@v2.1 uses: https://github.com/JRubics/poetry-publish@v2.0
with: with:
pypi_token: ${{ secrets.PYPI_TOKEN }} pypi_token: ${{ secrets.PYPI_TOKEN }}

View File

@@ -14,6 +14,6 @@ jobs:
reuse: reuse:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v4
- name: Check REUSE Compliance - name: Check REUSE Compliance
uses: https://github.com/fsfe/reuse-action@v6 uses: https://github.com/fsfe/reuse-action@v5

View File

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

957
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
[tool.poetry] [tool.poetry]
name = "seafile-mirror" name = "seafile-mirror"
version = "0.2.2" version = "0.2.0"
description = "Handle clean read-only (re-)syncs of Seafile libraries to mirror them" description = "Handle clean read-only (re-)syncs of Seafile libraries to mirror them"
authors = ["Max Mehl <mail@mehl.mx>"] authors = ["Max Mehl <mail@mehl.mx>"]
license = "Apache-2.0" license = "Apache-2.0"
@@ -20,13 +20,12 @@ python = "^3.10"
pyyaml = "^6.0.1" pyyaml = "^6.0.1"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
pylint = "^4.0.0" pylint = "^3.0.0"
isort = "^8.0.0" isort = "^5.12.0"
black = "^26.0.0" black = "^24.0.0"
mypy = "^1.5.1" mypy = "^1.5.1"
pylama = "^8.4.1" pylama = "^8.4.1"
types-pyyaml = "^6.0.12.11" types-pyyaml = "^6.0.12.11"
bump-my-version = "^1.0.0"
[build-system] [build-system]
requires = ["poetry-core"] requires = ["poetry-core"]
@@ -42,16 +41,3 @@ line-length = 100
# MYPY settings # MYPY settings
[tool.mypy] [tool.mypy]
files = ["seafile_mirror/*.py"] files = ["seafile_mirror/*.py"]
# Bump-My-Version
[tool.bumpversion]
commit = true
tag = true
allow_dirty = false
tag_name = "v{new_version}"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
regex = true
search = "^version = \"{current_version}\""
replace = "version = \"{new_version}\""

View File

@@ -1,18 +1,4 @@
{ {
$schema: "https://docs.renovatebot.com/renovate-schema.json", $schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["local>renovate-bot/renovate-config"], extends: ["local>renovate-bot/renovate-config"],
"packageRules": [
// Group and merge all dev dependencies, even major versions
{
"matchDepTypes": ["dev"],
"groupName": "all-dev-dependencies",
"automerge": true
},
// Merge all other patch and minor dependencies
{
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": "!/^0/",
"automerge": true
}
]
} }

View File

@@ -30,6 +30,7 @@ parser.add_argument("-c", "--configdir", required=True, help="The config directo
parser.add_argument( parser.add_argument(
"-l", "-l",
"--logfile", "--logfile",
required=True,
help="The path to the logfile. Default: <configdir>/seafile_mirror.log", help="The path to the logfile. Default: <configdir>/seafile_mirror.log",
) )
parser.add_argument( parser.add_argument(
@@ -57,7 +58,7 @@ parser.add_argument(
parser.add_argument("--version", action="version", version="%(prog)s " + __version__) parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
def main(): # pylint: disable=too-many-locals, too-many-statements, too-many-branches def main(): # pylint: disable=too-many-locals, too-many-statements
"""Main function""" """Main function"""
args = parser.parse_args() args = parser.parse_args()
# Set files depending on configdir # Set files depending on configdir