From e152a2edde836f8fb30427d13eb1e9e0d591a00b Mon Sep 17 00:00:00 2001 From: krateng Date: Sun, 10 Apr 2022 15:56:00 +0200 Subject: [PATCH 1/3] Containerfile transition test update --- .github/workflows/dockerhub.yml | 1 + Dockerfile => Containerfile | 0 README.md | 2 +- maloja/__pkginfo__.py | 2 +- pyproject.toml | 2 +- 5 files changed, 4 insertions(+), 3 deletions(-) rename Dockerfile => Containerfile (100%) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 88a0229..534be43 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -35,6 +35,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . + file: Containerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Containerfile similarity index 100% rename from Dockerfile rename to Containerfile diff --git a/README.md b/README.md index 984c8dd..97750e0 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Then install all the requirements and build the package: ### Docker -Pull the [latest image](https://hub.docker.com/r/krateng/maloja) or check out the repository and use the included Dockerfile. +Pull the [latest image](https://hub.docker.com/r/krateng/maloja) or check out the repository and use the included Containerfile. Of note are these settings which should be passed as environmental variables to the container: diff --git a/maloja/__pkginfo__.py b/maloja/__pkginfo__.py index 9e1199e..27a8f75 100644 --- a/maloja/__pkginfo__.py +++ b/maloja/__pkginfo__.py @@ -4,7 +4,7 @@ # you know what f*ck it # this is hardcoded for now because of that damn project / package name discrepancy # i'll fix it one day -VERSION = "2.14.7" +VERSION = "2.14.10" HOMEPAGE = "https://github.com/krateng/maloja" diff --git a/pyproject.toml b/pyproject.toml index effd0d4..d3f69a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "malojaserver" -version = "2.14.9" +version = "2.14.10" description = "Self-hosted music scrobble database" readme = "./README.md" requires-python = ">=3.6" From e52f35d65ba6c9031646d16313500d735bc4ad2c Mon Sep 17 00:00:00 2001 From: krateng Date: Sun, 10 Apr 2022 17:22:38 +0200 Subject: [PATCH 2/3] Added example compose file --- .github/workflows/dockerhub.yml | 1 + .gitignore | 1 - example-compose.yml | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 example-compose.yml diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 48eab50..16a4197 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -36,6 +36,7 @@ jobs: with: context: . file: Containerfile + #platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitignore b/.gitignore index c519deb..efc76ff 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ *.xcf /nohup.out *-old -/*.yml /pylintrc .venv/* /testdata* diff --git a/example-compose.yml b/example-compose.yml new file mode 100644 index 0000000..a8a23eb --- /dev/null +++ b/example-compose.yml @@ -0,0 +1,20 @@ +services: + maloja: + # from dockerhub + image: "krateng/maloja:latest" + # or built locally + #build: + # context: . + # dockerfile: ./Containerfile + ports: + - "42010:42010" + # different directories for configuration, state and logs + volumes: + - "$PWD/config:/etc/maloja" + - "$PWD/data:/var/lib/maloja" + - "$PWD/logs:/var/log/maloja" + #you can also have everything together instead: + #volumes: + #- "$PWD/data:/data" + #environment: + #- "MALOJA_DATA_DIRECTORY=/data" From df5eb499af8b80bbc1a960ef807681e8003a96e4 Mon Sep 17 00:00:00 2001 From: krateng Date: Sun, 10 Apr 2022 17:41:37 +0200 Subject: [PATCH 3/3] Added lint configuration and reorganized gitignore --- .gitignore | 18 +++++++++--------- pylintrc | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 pylintrc diff --git a/.gitignore b/.gitignore index efc76ff..7e6010c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ -# generic temporary / dev files +# temporary / generated files *.pyc -*.note -*.xcf -/nohup.out -*-old -/pylintrc -.venv/* -/testdata* -# build +# environments / builds +.venv/* +testdata* /dist /build /*.egg-info + +# dev files +*.xcf +*.note +*-old diff --git a/pylintrc b/pylintrc new file mode 100644 index 0000000..a2596b8 --- /dev/null +++ b/pylintrc @@ -0,0 +1,41 @@ +# no linting is currently enforced, this is just for reference +[MASTER] +disable=C0114,C0115,C0116, # docstrings + W0703, # broad exception catching + W1514, # open without encoding + +[VARIABLES] +allow-global-unused-variables=no + +[BASIC] +argument-naming-style=snake_case +attr-naming-style=snake_case +class-naming-style=PascalCase +const-naming-style=UPPER_CASE +function-naming-style=snake_case +variable-naming-style=snake_case +indent-string='\t' +good-names=i,j,k, # loops + x,y, # dimensions + e # exceptions + +max-line-length=200 +max-module-lines=1000 + +[DESIGN] + +max-args=8 +max-attributes=7 +max-bool-expr=5 +max-branches=12 +max-locals=15 +max-parents=7 +max-public-methods=20 +max-returns=6 +max-statements=50 +min-public-methods=2 + +[EXCEPTIONS] + +overgeneral-exceptions=BaseException, + Exception