laketower 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.
Potentially problematic release.
This version of laketower might be problematic. Click here for more details.
- laketower-0.1.0/.github/workflows/ci-cd.yml +180 -0
- laketower-0.1.0/.gitignore +14 -0
- laketower-0.1.0/.python-version +1 -0
- laketower-0.1.0/CHANGELOG.md +24 -0
- laketower-0.1.0/LICENSE.md +661 -0
- laketower-0.1.0/PKG-INFO +285 -0
- laketower-0.1.0/README.md +262 -0
- laketower-0.1.0/demo/generate.py +82 -0
- laketower-0.1.0/demo/laketower.yml +7 -0
- laketower-0.1.0/demo/sample_table/_delta_log/00000000000000000000.json +3 -0
- laketower-0.1.0/demo/sample_table/_delta_log/00000000000000000001.json +2 -0
- laketower-0.1.0/demo/sample_table/_delta_log/00000000000000000002.json +2 -0
- laketower-0.1.0/demo/sample_table/_delta_log/00000000000000000003.json +4 -0
- laketower-0.1.0/demo/sample_table/part-00001-1a31a393-6db6-4d1a-bf4e-81ea061ff8cd-c000.snappy.parquet +0 -0
- laketower-0.1.0/demo/sample_table/part-00001-5af77102-9207-4c89-aaf6-37e1f815ec26-c000.snappy.parquet +0 -0
- laketower-0.1.0/demo/sample_table/part-00001-b11bab55-43d0-4d05-ae88-5b9481ae57db-c000.snappy.parquet +0 -0
- laketower-0.1.0/demo/weather/_delta_log/00000000000000000000.json +3 -0
- laketower-0.1.0/demo/weather/_delta_log/00000000000000000001.json +2 -0
- laketower-0.1.0/demo/weather/_delta_log/00000000000000000002.json +2 -0
- laketower-0.1.0/demo/weather/part-00001-2323b963-be56-44e0-8c10-e237e7e6d4b9-c000.snappy.parquet +0 -0
- laketower-0.1.0/demo/weather/part-00001-6360cbf8-f8a9-475f-8729-6f20b4ca64a9-c000.snappy.parquet +0 -0
- laketower-0.1.0/laketower/__about__.py +1 -0
- laketower-0.1.0/laketower/__init__.py +0 -0
- laketower-0.1.0/laketower/__main__.py +4 -0
- laketower-0.1.0/laketower/cli.py +380 -0
- laketower-0.1.0/pyproject.toml +52 -0
- laketower-0.1.0/tasks.py +44 -0
- laketower-0.1.0/tests/__init__.py +0 -0
- laketower-0.1.0/tests/test_cli.py +556 -0
- laketower-0.1.0/uv.lock +1418 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
name: CI/CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- "*"
|
|
9
|
+
pull_request:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
ci:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
enable-cache: true
|
|
25
|
+
cache-dependency-glob: "uv.lock"
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: uv sync --all-extras --dev
|
|
28
|
+
- name: Run QA
|
|
29
|
+
run: uv run inv qa
|
|
30
|
+
- name: Upload coverage artifacts
|
|
31
|
+
if: ${{ matrix.python-version == 3.13 }}
|
|
32
|
+
uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: coverage
|
|
35
|
+
path: .coverage
|
|
36
|
+
include-hidden-files: true
|
|
37
|
+
|
|
38
|
+
coverage:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
needs: ci
|
|
41
|
+
if: ${{ !cancelled() }}
|
|
42
|
+
permissions:
|
|
43
|
+
contents: write
|
|
44
|
+
issues: write
|
|
45
|
+
pull-requests: write
|
|
46
|
+
env:
|
|
47
|
+
CODECOV_MD_FILE: "coverage.md"
|
|
48
|
+
CODECOV_REPORT_TITLE: "Code coverage report"
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
- name: Install uv
|
|
52
|
+
uses: astral-sh/setup-uv@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: "3.13"
|
|
55
|
+
enable-cache: true
|
|
56
|
+
cache-dependency-glob: "uv.lock"
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: uv sync --all-extras --dev
|
|
59
|
+
- uses: actions/download-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: coverage
|
|
62
|
+
- name: Generate Markdown code coverage report
|
|
63
|
+
run: |
|
|
64
|
+
echo "## ${CODECOV_REPORT_TITLE}" >> "${CODECOV_MD_FILE}"
|
|
65
|
+
uv run coverage report --show-missing --format=markdown >> "${CODECOV_MD_FILE}"
|
|
66
|
+
- name: Export code coverage report to job summary
|
|
67
|
+
run: cat "${CODECOV_MD_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
|
68
|
+
- name: Add or update code coverage comment to pull request
|
|
69
|
+
uses: actions/github-script@v7
|
|
70
|
+
if: ${{ github.event_name == 'pull_request' }}
|
|
71
|
+
with:
|
|
72
|
+
script: |
|
|
73
|
+
const fs = require('fs')
|
|
74
|
+
|
|
75
|
+
const body = fs.readFileSync(`${process.env.CODECOV_MD_FILE}`, 'utf-8')
|
|
76
|
+
|
|
77
|
+
const comments = await github.paginate(
|
|
78
|
+
github.rest.issues.listComments,
|
|
79
|
+
{
|
|
80
|
+
issue_number: context.issue.number,
|
|
81
|
+
owner: context.repo.owner,
|
|
82
|
+
repo: context.repo.repo,
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
const matches = comments.filter(
|
|
86
|
+
comment => comment.body && comment.body.includes(`${process.env.CODECOV_REPORT_TITLE}`)
|
|
87
|
+
)
|
|
88
|
+
const comment = matches[0]
|
|
89
|
+
|
|
90
|
+
if (comment) {
|
|
91
|
+
const commentId = comment.id.toString()
|
|
92
|
+
console.log(`updating existing comment comment_id=${commentId}`)
|
|
93
|
+
github.rest.issues.updateComment({
|
|
94
|
+
owner: context.repo.owner,
|
|
95
|
+
repo: context.repo.repo,
|
|
96
|
+
comment_id: commentId,
|
|
97
|
+
body: body,
|
|
98
|
+
})
|
|
99
|
+
} else {
|
|
100
|
+
console.log('adding new comment')
|
|
101
|
+
github.rest.issues.createComment({
|
|
102
|
+
issue_number: context.issue.number,
|
|
103
|
+
owner: context.repo.owner,
|
|
104
|
+
repo: context.repo.repo,
|
|
105
|
+
body: body,
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
- name: Check code coverage constraint
|
|
109
|
+
run: uv run coverage report --fail-under=100
|
|
110
|
+
|
|
111
|
+
build:
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
needs: ci
|
|
114
|
+
steps:
|
|
115
|
+
- uses: actions/checkout@v4
|
|
116
|
+
- name: Install uv
|
|
117
|
+
uses: astral-sh/setup-uv@v5
|
|
118
|
+
with:
|
|
119
|
+
python-version: '3.13'
|
|
120
|
+
enable-cache: true
|
|
121
|
+
cache-dependency-glob: "uv.lock"
|
|
122
|
+
- name: Install dependencies
|
|
123
|
+
run: uv sync --all-extras --dev
|
|
124
|
+
- name: Build package
|
|
125
|
+
run: uv build
|
|
126
|
+
- name: Upload package build artifacts
|
|
127
|
+
uses: actions/upload-artifact@v4
|
|
128
|
+
with:
|
|
129
|
+
name: build
|
|
130
|
+
path: dist
|
|
131
|
+
include-hidden-files: true
|
|
132
|
+
|
|
133
|
+
test-pypi-publish:
|
|
134
|
+
name: Upload release to Test PyPI
|
|
135
|
+
runs-on: ubuntu-latest
|
|
136
|
+
needs: build
|
|
137
|
+
if: ${{ contains(github.ref, 'main') || startsWith(github.head_ref, 'release/') }}
|
|
138
|
+
environment:
|
|
139
|
+
name: test-pypi
|
|
140
|
+
url: https://test.pypi.org/project/laketower/
|
|
141
|
+
permissions:
|
|
142
|
+
id-token: write
|
|
143
|
+
steps:
|
|
144
|
+
- name: Download package build artifacts
|
|
145
|
+
uses: actions/download-artifact@v4
|
|
146
|
+
with:
|
|
147
|
+
name: build
|
|
148
|
+
path: dist/
|
|
149
|
+
- name: Publish package distributions to Test PyPI
|
|
150
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
151
|
+
with:
|
|
152
|
+
repository-url: https://test.pypi.org/legacy/
|
|
153
|
+
skip-existing: true
|
|
154
|
+
- name: Install uv
|
|
155
|
+
uses: astral-sh/setup-uv@v5
|
|
156
|
+
- name: Validate package is available with uvx
|
|
157
|
+
run: uvx --index https://test.pypi.org/simple/ --index-strategy unsafe-best-match laketower --version
|
|
158
|
+
|
|
159
|
+
pypi-publish:
|
|
160
|
+
name: Upload release to PyPI
|
|
161
|
+
runs-on: ubuntu-latest
|
|
162
|
+
needs: build
|
|
163
|
+
if: ${{ contains(github.ref, 'tags') }}
|
|
164
|
+
environment:
|
|
165
|
+
name: pypi
|
|
166
|
+
url: https://pypi.org/project/laketower/
|
|
167
|
+
permissions:
|
|
168
|
+
id-token: write
|
|
169
|
+
steps:
|
|
170
|
+
- name: Download package build artifacts
|
|
171
|
+
uses: actions/download-artifact@v4
|
|
172
|
+
with:
|
|
173
|
+
name: build
|
|
174
|
+
path: dist/
|
|
175
|
+
- name: Publish package distributions to PyPI
|
|
176
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
177
|
+
- name: Install uv
|
|
178
|
+
uses: astral-sh/setup-uv@v5
|
|
179
|
+
- name: Validate package is available with uvx
|
|
180
|
+
run: uvx laketower --version
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2025-02-15
|
|
11
|
+
Initial release of `laketower`.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- `cli` module
|
|
15
|
+
- Validate YAML configuration
|
|
16
|
+
- List all registered tables
|
|
17
|
+
- Display a given table metadata
|
|
18
|
+
- Display a given table schema
|
|
19
|
+
- Display a given table history
|
|
20
|
+
- View a given table with simple query builder
|
|
21
|
+
- Query all registered tables with DuckDB SQL dialect
|
|
22
|
+
|
|
23
|
+
[Unreleased]: https://github.com/datalpia/laketower/compare/0.1.0...HEAD
|
|
24
|
+
[0.1.0]: https://github.com/datalpia/laketower/releases/tag/0.1.0
|