hut-services 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hut_services-0.1.0/.bumpversion.cfg +9 -0
- hut_services-0.1.0/.editorconfig +5 -0
- hut_services-0.1.0/.github/actions/setup-venv/action.yml +28 -0
- hut_services-0.1.0/.github/workflows/docu.yml +33 -0
- hut_services-0.1.0/.github/workflows/main.yml +36 -0
- hut_services-0.1.0/.github/workflows/main.yml.old +70 -0
- hut_services-0.1.0/.github/workflows/new-version.yml +51 -0
- hut_services-0.1.0/.github/workflows/publish-pypi.yml +32 -0
- hut_services-0.1.0/.github/workflows/release.yml.wait +41 -0
- hut_services-0.1.0/.gitignore +167 -0
- hut_services-0.1.0/.pre-commit-config.yaml +24 -0
- hut_services-0.1.0/.python-version +1 -0
- hut_services-0.1.0/CHANGELOG.md +34 -0
- hut_services-0.1.0/CONTRIBUTING.md +98 -0
- hut_services-0.1.0/LICENSE +21 -0
- hut_services-0.1.0/Makefile +20 -0
- hut_services-0.1.0/PKG-INFO +58 -0
- hut_services-0.1.0/README.md +22 -0
- hut_services-0.1.0/assets/logo/logo.png +0 -0
- hut_services-0.1.0/assets/logo/logo.svg +103 -0
- hut_services-0.1.0/cliff.toml +93 -0
- hut_services-0.1.0/docs/assets/favicon.png +1 -0
- hut_services-0.1.0/docs/changelog.md +3 -0
- hut_services-0.1.0/docs/css/custom.css +0 -0
- hut_services-0.1.0/docs/docu.md +21 -0
- hut_services-0.1.0/docs/examples/osm_service.py +13 -0
- hut_services-0.1.0/docs/index.md +3 -0
- hut_services-0.1.0/mkdocs.yml +276 -0
- hut_services-0.1.0/poetry.toml +2 -0
- hut_services-0.1.0/pyproject.toml +169 -0
- hut_services-0.1.0/src/hut_services/__init__.py +61 -0
- hut_services-0.1.0/src/hut_services/core/__init__.py +0 -0
- hut_services-0.1.0/src/hut_services/core/cache.py +31 -0
- hut_services-0.1.0/src/hut_services/core/guess.py +201 -0
- hut_services-0.1.0/src/hut_services/core/schema/__init__.py +42 -0
- hut_services-0.1.0/src/hut_services/core/schema/_base.py +7 -0
- hut_services-0.1.0/src/hut_services/core/schema/_booking.py +85 -0
- hut_services-0.1.0/src/hut_services/core/schema/_contact.py +102 -0
- hut_services-0.1.0/src/hut_services/core/schema/_hut.py +89 -0
- hut_services-0.1.0/src/hut_services/core/schema/_hut_base_converter.py +176 -0
- hut_services-0.1.0/src/hut_services/core/schema/_hut_base_source.py +139 -0
- hut_services-0.1.0/src/hut_services/core/schema/_hut_fields.py +176 -0
- hut_services-0.1.0/src/hut_services/core/schema/_license.py +51 -0
- hut_services-0.1.0/src/hut_services/core/schema/_photo.py +27 -0
- hut_services-0.1.0/src/hut_services/core/schema/geo/__init__.py +3 -0
- hut_services-0.1.0/src/hut_services/core/schema/geo/bbox.py +8 -0
- hut_services-0.1.0/src/hut_services/core/schema/geo/geo.py +111 -0
- hut_services-0.1.0/src/hut_services/core/schema/geo/types.py +14 -0
- hut_services-0.1.0/src/hut_services/core/schema/locale.py +40 -0
- hut_services-0.1.0/src/hut_services/core/service/__init__.py +3 -0
- hut_services-0.1.0/src/hut_services/core/service/_service_base.py +155 -0
- hut_services-0.1.0/src/hut_services/core/utils/__init__.py +1 -0
- hut_services-0.1.0/src/hut_services/core/utils/_gps_converter.py +190 -0
- hut_services-0.1.0/src/hut_services/geocode/__init__.py +3 -0
- hut_services-0.1.0/src/hut_services/geocode/schema.py +78 -0
- hut_services-0.1.0/src/hut_services/geocode/script.py +22 -0
- hut_services-0.1.0/src/hut_services/geocode/service.py +157 -0
- hut_services-0.1.0/src/hut_services/osm/__init__.py +3 -0
- hut_services-0.1.0/src/hut_services/osm/coordinates.py +5 -0
- hut_services-0.1.0/src/hut_services/osm/exceptions.py +4 -0
- hut_services-0.1.0/src/hut_services/osm/schema.py +303 -0
- hut_services-0.1.0/src/hut_services/osm/service.py +133 -0
- hut_services-0.1.0/src/hut_services/py.typed +0 -0
- hut_services-0.1.0/src/hut_services/refuges_info/__init__.py +4 -0
- hut_services-0.1.0/src/hut_services/refuges_info/coordinates.py +18 -0
- hut_services-0.1.0/src/hut_services/refuges_info/exceptions.py +4 -0
- hut_services-0.1.0/src/hut_services/refuges_info/massif.py +66 -0
- hut_services-0.1.0/src/hut_services/refuges_info/schema.py +290 -0
- hut_services-0.1.0/src/hut_services/refuges_info/service.py +152 -0
- hut_services-0.1.0/src/hut_services/refuges_info/utils.py +109 -0
- hut_services-0.1.0/src/hut_services/services.py +11 -0
- hut_services-0.1.0/src/hut_services/wikicommons/__init__.py +3 -0
- hut_services-0.1.0/src/hut_services/wikicommons/service.py +271 -0
- hut_services-0.1.0/src/hut_services/wikidata/__init__.py +3 -0
- hut_services-0.1.0/src/hut_services/wikidata/schema.py +130 -0
- hut_services-0.1.0/src/hut_services/wikidata/script.py +26 -0
- hut_services-0.1.0/src/hut_services/wikidata/service.py +179 -0
- hut_services-0.1.0/src/hut_services/wikipedia/README.adoc +4 -0
- hut_services-0.1.0/tasks/__init__.py +41 -0
- hut_services-0.1.0/tasks/_env.py +6 -0
- hut_services-0.1.0/tasks/_logger.py +55 -0
- hut_services-0.1.0/tasks/changelog.py +63 -0
- hut_services-0.1.0/tasks/check.py +57 -0
- hut_services-0.1.0/tasks/docs.py +16 -0
- hut_services-0.1.0/tasks/gen_ref_pages.py +36 -0
- hut_services-0.1.0/tasks/project.py +112 -0
- hut_services-0.1.0/tasks/tests.py +13 -0
- hut_services-0.1.0/tests/core/schema/test_contact_schema.py +21 -0
- hut_services-0.1.0/tests/core/schema/test_onwer_schema.py +21 -0
- hut_services-0.1.0/tests/core/test_guess.py +67 -0
- hut_services-0.1.0/tests/core/utils/test_gps_converter.py +16 -0
- hut_services-0.1.0/tests/geocode/test_geocode_service.py +27 -0
- hut_services-0.1.0/tests/osm/test_osm_service.py +78 -0
- hut_services-0.1.0/tests/refuges_info/test_refuges_info_service.py +24 -0
- hut_services-0.1.0/tox.ini +16 -0
- hut_services-0.1.0/uv.lock +1836 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: "setup-uv-env"
|
|
2
|
+
description: "Composite action to setup the Python and uv environment."
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
required: false
|
|
7
|
+
description: "The python version to use"
|
|
8
|
+
default: "3.12"
|
|
9
|
+
|
|
10
|
+
runs:
|
|
11
|
+
using: "composite"
|
|
12
|
+
steps:
|
|
13
|
+
- name: "Install uv"
|
|
14
|
+
uses: astral-sh/setup-uv@v4
|
|
15
|
+
with:
|
|
16
|
+
# Install a specific version of uv.
|
|
17
|
+
version: "0.5.8"
|
|
18
|
+
enable-cache: true
|
|
19
|
+
cache-dependency-glob: "uv.lock"
|
|
20
|
+
|
|
21
|
+
- name: "Set up Python"
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version-file: ".python-version"
|
|
25
|
+
|
|
26
|
+
- name: Install the project
|
|
27
|
+
run: uv sync --all-extras --dev
|
|
28
|
+
shell: bash
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Build & Publish Docu
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
repository_dispatch:
|
|
9
|
+
types: [new-tag-created]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
deploy:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
- name: Configure Git Credentials
|
|
21
|
+
run: |
|
|
22
|
+
git config user.name github-actions[bot]
|
|
23
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
24
|
+
- name: Set up the environment
|
|
25
|
+
uses: ./.github/actions/setup-venv
|
|
26
|
+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
27
|
+
- uses: actions/cache@v4
|
|
28
|
+
with:
|
|
29
|
+
key: mkdocs-material-${{ env.cache_id }}
|
|
30
|
+
path: .cache
|
|
31
|
+
restore-keys: |
|
|
32
|
+
mkdocs-material-
|
|
33
|
+
- run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
quality:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Check out
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up the environment
|
|
18
|
+
uses: ./.github/actions/setup-venv
|
|
19
|
+
|
|
20
|
+
- name: Run checks
|
|
21
|
+
run: uv run inv check
|
|
22
|
+
|
|
23
|
+
- name: Run test
|
|
24
|
+
run: uv run inv tests.run
|
|
25
|
+
|
|
26
|
+
#check-docs:
|
|
27
|
+
# runs-on: ubuntu-latest
|
|
28
|
+
# steps:
|
|
29
|
+
# - name: Check out
|
|
30
|
+
# uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
# - name: Set up the environment
|
|
33
|
+
# uses: ./.github/actions/setup-venv
|
|
34
|
+
|
|
35
|
+
# - name: Check if documentation can be built
|
|
36
|
+
# run: uv run mkdocs build -s
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
quality:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Check out
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
- uses: actions/cache@v3
|
|
18
|
+
with:
|
|
19
|
+
path: ~/.cache/pre-commit
|
|
20
|
+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
21
|
+
|
|
22
|
+
- name: Set up the environment
|
|
23
|
+
uses: ./.github/actions/setup-uv-env
|
|
24
|
+
|
|
25
|
+
- name: Run checks
|
|
26
|
+
run: make check
|
|
27
|
+
|
|
28
|
+
#tox:
|
|
29
|
+
# runs-on: ubuntu-latest
|
|
30
|
+
# strategy:
|
|
31
|
+
# matrix:
|
|
32
|
+
# python-version: ["3.10", "3.11"]
|
|
33
|
+
# fail-fast: false
|
|
34
|
+
# steps:
|
|
35
|
+
# - name: Check out
|
|
36
|
+
# uses: actions/checkout@v3
|
|
37
|
+
|
|
38
|
+
# - name: Set up python
|
|
39
|
+
# uses: actions/setup-python@v4
|
|
40
|
+
# with:
|
|
41
|
+
# python-version: ${{ matrix.python-version }}
|
|
42
|
+
|
|
43
|
+
# - name: Install Poetry
|
|
44
|
+
# uses: snok/install-poetry@v1
|
|
45
|
+
|
|
46
|
+
# - name: Load cached venv
|
|
47
|
+
# uses: actions/cache@v3
|
|
48
|
+
# with:
|
|
49
|
+
# path: .tox
|
|
50
|
+
# key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
|
|
51
|
+
|
|
52
|
+
# - name: Install tox
|
|
53
|
+
# run: |
|
|
54
|
+
# python -m pip install --upgrade pip
|
|
55
|
+
# python -m pip install tox tox-gh-actions
|
|
56
|
+
|
|
57
|
+
# - name: Test with tox
|
|
58
|
+
# run: tox
|
|
59
|
+
|
|
60
|
+
#check-docs:
|
|
61
|
+
# runs-on: ubuntu-latest
|
|
62
|
+
# steps:
|
|
63
|
+
# - name: Check out
|
|
64
|
+
# uses: actions/checkout@v3
|
|
65
|
+
|
|
66
|
+
# - name: Set up the environment
|
|
67
|
+
# uses: ./.github/actions/setup-poetry-env
|
|
68
|
+
|
|
69
|
+
# - name: Check if documentation can be built
|
|
70
|
+
# run: poetry run mkdocs build -s
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: New Version
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Main"]
|
|
6
|
+
types:
|
|
7
|
+
- completed
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
check-and-tag:
|
|
11
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up the environment
|
|
21
|
+
uses: ./.github/actions/setup-venv
|
|
22
|
+
|
|
23
|
+
- name: Extract latest version
|
|
24
|
+
id: latest-version
|
|
25
|
+
run: |
|
|
26
|
+
VERSION=$(uv run inv version); echo "Current version: $VERSION"
|
|
27
|
+
echo "version=$VERSION" >> $GITHUB_ENV
|
|
28
|
+
|
|
29
|
+
- name: Check if tag exists
|
|
30
|
+
uses: mukunku/tag-exists-action@v1.6.0
|
|
31
|
+
id: check-tag
|
|
32
|
+
with:
|
|
33
|
+
tag: "v${{ env.version }}"
|
|
34
|
+
|
|
35
|
+
- name: Create and push tag if not exists
|
|
36
|
+
if: steps.check-tag.outputs.exists == 'false'
|
|
37
|
+
run: |
|
|
38
|
+
echo "Creating new tag: v${{ env.version }}"
|
|
39
|
+
git tag "v${{ env.version }}"
|
|
40
|
+
git push origin "v${{ env.version }}"
|
|
41
|
+
|
|
42
|
+
- name: Trigger repository_dispatch if tag is created
|
|
43
|
+
if: steps.check-tag.outputs.exists == 'false'
|
|
44
|
+
env:
|
|
45
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
46
|
+
run: |
|
|
47
|
+
curl -X POST \
|
|
48
|
+
-H "Accept: application/vnd.github.everest-preview+json" \
|
|
49
|
+
-H "Authorization: token $GITHUB_TOKEN" \
|
|
50
|
+
https://api.github.com/repos/${{ github.repository }}/dispatches \
|
|
51
|
+
-d '{"event_type": "new-tag-created", "client_payload": { "version": "${{ env.version }}" }}'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish to PyPi
|
|
2
|
+
|
|
3
|
+
# Configures this workflow to run every time a change is pushed to the branch called `release`.
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- "v*.*.*"
|
|
8
|
+
repository_dispatch:
|
|
9
|
+
types: [new-tag-created]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pypi-publish:
|
|
13
|
+
name: Upload release to PyPI
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment:
|
|
16
|
+
name: pypi
|
|
17
|
+
url: https://pypi.org/p/${{ github.repository }}
|
|
18
|
+
permissions:
|
|
19
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
20
|
+
steps:
|
|
21
|
+
# retrieve your distributions here
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Set up the environment
|
|
26
|
+
uses: ./.github/actions/setup-venv
|
|
27
|
+
|
|
28
|
+
- name: Build Package
|
|
29
|
+
run: uv build
|
|
30
|
+
|
|
31
|
+
- name: Publish package distributions to PyPI
|
|
32
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Create Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
repository_dispatch:
|
|
8
|
+
types: [new-tag-created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
create-release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up the environment
|
|
21
|
+
uses: ./.github/actions/setup-venv
|
|
22
|
+
|
|
23
|
+
- name: Get latest changelog
|
|
24
|
+
id: changelog
|
|
25
|
+
run: |
|
|
26
|
+
VERSION=$(uv run inv version); echo "Current version: $VERSION"
|
|
27
|
+
echo "version=${VERSION}" >> $GITHUB_ENV
|
|
28
|
+
echo "body<<EOF" >> $GITHUB_ENV
|
|
29
|
+
BODY=$(uv run inv changelog); echo "Changelog body:"; echo "$BODY"
|
|
30
|
+
echo "${BODY}" >> $GITHUB_ENV
|
|
31
|
+
echo "EOF" >> $GITHUB_ENV
|
|
32
|
+
|
|
33
|
+
- name: Create GitHub Release
|
|
34
|
+
uses: softprops/action-gh-release@v2
|
|
35
|
+
with:
|
|
36
|
+
tag_name: v${{ env.version }}
|
|
37
|
+
name: ${{ env.version }}
|
|
38
|
+
body: ${{ env.body }}
|
|
39
|
+
draft: false
|
|
40
|
+
prerelease: false
|
|
41
|
+
make_latest: true
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
docs/source
|
|
2
|
+
|
|
3
|
+
# From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# poetry
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
106
|
+
#poetry.lock
|
|
107
|
+
|
|
108
|
+
# pdm
|
|
109
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
110
|
+
#pdm.lock
|
|
111
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
112
|
+
# in version control.
|
|
113
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
114
|
+
.pdm.toml
|
|
115
|
+
|
|
116
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
117
|
+
__pypackages__/
|
|
118
|
+
|
|
119
|
+
# Celery stuff
|
|
120
|
+
celerybeat-schedule
|
|
121
|
+
celerybeat.pid
|
|
122
|
+
|
|
123
|
+
# SageMath parsed files
|
|
124
|
+
*.sage.py
|
|
125
|
+
|
|
126
|
+
# Environments
|
|
127
|
+
.env
|
|
128
|
+
.venv
|
|
129
|
+
env/
|
|
130
|
+
venv/
|
|
131
|
+
ENV/
|
|
132
|
+
env.bak/
|
|
133
|
+
venv.bak/
|
|
134
|
+
|
|
135
|
+
# Spyder project settings
|
|
136
|
+
.spyderproject
|
|
137
|
+
.spyproject
|
|
138
|
+
|
|
139
|
+
# Rope project settings
|
|
140
|
+
.ropeproject
|
|
141
|
+
|
|
142
|
+
# mkdocs documentation
|
|
143
|
+
/site
|
|
144
|
+
|
|
145
|
+
# mypy
|
|
146
|
+
.mypy_cache/
|
|
147
|
+
.dmypy.json
|
|
148
|
+
dmypy.json
|
|
149
|
+
|
|
150
|
+
# Pyre type checker
|
|
151
|
+
.pyre/
|
|
152
|
+
|
|
153
|
+
# pytype static type analyzer
|
|
154
|
+
.pytype/
|
|
155
|
+
|
|
156
|
+
# Cython debug symbols
|
|
157
|
+
cython_debug/
|
|
158
|
+
|
|
159
|
+
# Vscode config files
|
|
160
|
+
.vscode/
|
|
161
|
+
|
|
162
|
+
# PyCharm
|
|
163
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
164
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
165
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
166
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
167
|
+
#.idea/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: "v5.0.0"
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-case-conflict
|
|
6
|
+
- id: check-merge-conflict
|
|
7
|
+
- id: check-toml
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
args: [--unsafe]
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: trailing-whitespace
|
|
12
|
+
|
|
13
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
14
|
+
rev: "v0.8.2"
|
|
15
|
+
hooks:
|
|
16
|
+
- id: ruff
|
|
17
|
+
args: [--exit-non-zero-on-fix]
|
|
18
|
+
- id: ruff-format
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
21
|
+
rev: "v3.0.3"
|
|
22
|
+
hooks:
|
|
23
|
+
- id: prettier
|
|
24
|
+
types_or: [css, javascript, json, scss, yaml]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!-- Auto generated. Run 'inv release' in order to update -->
|
|
2
|
+
|
|
3
|
+
# Changelog
|
|
4
|
+
|
|
5
|
+
All notable changes to this project will be documented in this file.
|
|
6
|
+
|
|
7
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
8
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2025-01-05
|
|
11
|
+
|
|
12
|
+
#### 🚀 Features
|
|
13
|
+
- Add photos support ([#3]) - [dc2caed]
|
|
14
|
+
|
|
15
|
+
#### 📘 Documentation
|
|
16
|
+
- Add documentation page ([#6]) - [a630a92]
|
|
17
|
+
|
|
18
|
+
#### 💻 Tooling
|
|
19
|
+
- Replace `make` with [`invoke`](https://www.pyinvoke.org/) (see `inv help`) ([#5]) - [1c26026]
|
|
20
|
+
- Change from `poetry` to [`uv`](https://docs.astral.sh/uv/) ([#4]) - [748bca2]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
[#3]: https://github.com/wodore/hut-services/pull/3
|
|
24
|
+
[dc2caed]: https://github.com/wodore/hut-services/commit/dc2caed474dec35516c2b551dd47f5c187513603
|
|
25
|
+
|
|
26
|
+
[#6]: https://github.com/wodore/hut-services/pull/6
|
|
27
|
+
[a630a92]: https://github.com/wodore/hut-services/commit/a630a92420d80e0bcfd42d998de9b9dfa1f374d9
|
|
28
|
+
|
|
29
|
+
[#5]: https://github.com/wodore/hut-services/pull/5
|
|
30
|
+
[1c26026]: https://github.com/wodore/hut-services/commit/1c2602652e3e279d4c62f62179c19d9ff3b00c07
|
|
31
|
+
[#4]: https://github.com/wodore/hut-services/pull/4
|
|
32
|
+
[748bca2]: https://github.com/wodore/hut-services/commit/748bca223545c160fb0f817cd78966c63883a17c
|
|
33
|
+
|
|
34
|
+
[0.1.0]: https://github.com/wodore/hut-services/releases/tag/v0.1.0
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Contributing to `hut-services`
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, and they are greatly appreciated!
|
|
4
|
+
Every little bit helps, and credit will always be given.
|
|
5
|
+
|
|
6
|
+
You can contribute in many ways:
|
|
7
|
+
|
|
8
|
+
# Types of Contributions
|
|
9
|
+
|
|
10
|
+
## Report Bugs
|
|
11
|
+
|
|
12
|
+
Report bugs at https://github.com/wodore/hut-services/issues
|
|
13
|
+
|
|
14
|
+
If you are reporting a bug, please include:
|
|
15
|
+
|
|
16
|
+
- Your operating system name and version.
|
|
17
|
+
- Any details about your local setup that might be helpful in troubleshooting.
|
|
18
|
+
- Detailed steps to reproduce the bug.
|
|
19
|
+
|
|
20
|
+
## Submit Feedback
|
|
21
|
+
|
|
22
|
+
The best way to send feedback is to file an issue at https://github.com/wodore/hut-services/issues.
|
|
23
|
+
|
|
24
|
+
If you are proposing a new feature:
|
|
25
|
+
|
|
26
|
+
- Explain in detail how it would work.
|
|
27
|
+
- Keep the scope as narrow as possible, to make it easier to implement.
|
|
28
|
+
- Remember that this is a volunteer-driven project, and that contributions
|
|
29
|
+
are welcome :)
|
|
30
|
+
|
|
31
|
+
# Get Started!
|
|
32
|
+
|
|
33
|
+
Ready to contribute? Here's how to set up `hut-services` for local development.
|
|
34
|
+
Please note this documentation assumes you already have `poetry` and `Git` installed and ready to go.
|
|
35
|
+
|
|
36
|
+
1. Fork the `hut-services` repo on GitHub.
|
|
37
|
+
|
|
38
|
+
2. Clone your fork locally:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
cd <directory_in_which_repo_should_be_created>
|
|
42
|
+
git clone git@github.com:YOUR_NAME/hut-services.git
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
3. Now we need to install the environment. Navigate into the directory
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cd hut-services
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
Then, install and activate the environment with:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
make init
|
|
56
|
+
source .venv/bin/activate
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
4. Create a branch for local development:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
git checkout -b name-of-your-bugfix-or-feature
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Now you can make your changes locally.
|
|
66
|
+
|
|
67
|
+
5. Don't forget to add test cases for your added functionality to the `tests` directory.
|
|
68
|
+
|
|
69
|
+
6. When you're done making changes, check that your changes pass the formatting tests.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
inv check
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Now, validate that all unit tests are passing:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
inv tests.run
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
7. Commit your changes and push your branch to GitHub:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git add .
|
|
85
|
+
git commit -m "Your detailed description of your changes."
|
|
86
|
+
git push origin name-of-your-bugfix-or-feature
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
8. Submit a pull request through the GitHub website.
|
|
90
|
+
|
|
91
|
+
# Pull Request Guidelines
|
|
92
|
+
|
|
93
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
94
|
+
|
|
95
|
+
1. The pull request should include tests.
|
|
96
|
+
|
|
97
|
+
2. If the pull request adds functionality, the docs should be updated.
|
|
98
|
+
Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, TBxy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
.PHONY: init
|
|
3
|
+
init: ## Install the uv environment and install the pre-commit hooks
|
|
4
|
+
@echo "Creating virtual environment using uv"
|
|
5
|
+
@uv sync
|
|
6
|
+
@ uv run invoke install
|
|
7
|
+
|
|
8
|
+
.PHONY: docs-test
|
|
9
|
+
docs-test: ## Test if documentation can be built without warnings or errors
|
|
10
|
+
@uv run mkdocs build -s
|
|
11
|
+
|
|
12
|
+
.PHONY: docs
|
|
13
|
+
docs: ## Build and serve the documentation
|
|
14
|
+
@uv run mkdocs serve -a localhost:8083 -w src
|
|
15
|
+
|
|
16
|
+
.PHONY: help
|
|
17
|
+
help:
|
|
18
|
+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
19
|
+
|
|
20
|
+
.DEFAULT_GOAL := help
|