Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed May 17, 2024
2 parents 1233452 + a2f989c commit 9fce129
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 10 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cache-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Cleanup caches after merge
on:
pull_request:
types:
- closed
workflow_dispatch:

jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
# `actions:write` permission is required to delete caches
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
actions: write
contents: read

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Cleanup cache
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH --limit 100 --sort size | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
restore-keys: |
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements/core.txt', 'requirements/docs.txt') }}
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-
${{ runner.os }}-python-
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools wheel
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
restore-keys: |
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-
${{ runner.os }}-python
${{ runner.os }}-
${{ runner.os }}-python-
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools wheel
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
restore-keys: |
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-${{ hashFiles('requirements.txt', 'requirements-docs.txt') }}
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-release-
${{ runner.os }}-python-
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools wheel
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ jobs:
restore-keys: |
${{ runner.os }}-python-${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version}}-tests-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version}}-tests-
${{ runner.os }}-python
${{ runner.os }}-
${{ runner.os }}-python-
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools wheel
Expand Down
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand Down Expand Up @@ -49,7 +49,7 @@ repos:
args: [-w]

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
rev: v2.13.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2', --offset, '2']
Expand Down Expand Up @@ -82,6 +82,11 @@ repos:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]

- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/pycqa/bandit
rev: 1.7.8
hooks:
Expand All @@ -93,7 +98,7 @@ repos:
require_serial: true

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.3.0
rev: 24.4.2
hooks:
- id: black

Expand Down
7 changes: 7 additions & 0 deletions docs/changelog/0.1.6.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
0.1.6 (2024-05-17)
==================

Features
--------

- Allow using ``horizon-hwm-store`` with ``data-horizon`` 0.2.x.
1 change: 1 addition & 0 deletions docs/changelog/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:caption: Changelog

DRAFT
0.1.6
0.1.5
0.1.4
0.1.3
Expand Down
2 changes: 1 addition & 1 deletion horizon_hwm_store/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.5
0.1.6
2 changes: 1 addition & 1 deletion horizon_hwm_store/horizon_hwm_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def main(config):
def client(self) -> HorizonClientSync:
if not self._client:
self._client = HorizonClientSync( # noqa: WPS601
base_url=self.api_url,
base_url=str(self.api_url), # type: ignore[arg-type]
auth=self.auth,
retry=self.retry,
timeout=self.timeout,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
data-horizon[client-sync]>=0.0.8,<0.2
data-horizon[client-sync]>=0.0.8,<0.3
etl-entities>=2.1.0,<2.4.0

0 comments on commit 9fce129

Please sign in to comment.