Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3202 commits
Select commit Hold shift + click to select a range
515d526
Add the ability to store pickled compiled query ASTs in Postgres
shangyian Jan 21, 2025
c2baada
Update tests
shangyian Jan 21, 2025
139cf3d
Make the healthcheck point to an endpoint that doesn't result in a te…
shangyian Jan 21, 2025
94e1e53
coverage
shangyian Jan 21, 2025
3493a1f
Swap to zlib compressed AST
shangyian Jan 22, 2025
4398112
Fix tests
shangyian Jan 22, 2025
43f4be8
Add back support for compiled pre-agg queries
shangyian Jan 23, 2025
587d5b4
Fix lint
shangyian Jan 25, 2025
41a1811
Lock dependencies to py3.10 or above
shangyian Jan 24, 2025
2580947
Remove unnecessary dependencies
shangyian Jan 24, 2025
a7c90b6
Remove unnecessary dependencies
shangyian Jan 24, 2025
f6d62e1
Some more cleanup and fix tests
shangyian Jan 24, 2025
92f7196
Fix
shangyian Jan 24, 2025
c5670a4
Fix
shangyian Jan 24, 2025
891aa46
Fix
shangyian Jan 24, 2025
8ab7321
Fix
shangyian Jan 24, 2025
fba2c0c
Remove dependency on non-existent group
shangyian Jan 25, 2025
fc1ed3a
Pin a few deps
shangyian Jan 25, 2025
2521281
Fix
shangyian Jan 25, 2025
f5fff01
Fix
shangyian Jan 25, 2025
30c7d1a
Fix
shangyian Jan 25, 2025
2daf707
Add back sqlparse
shangyian Jan 26, 2025
b652113
Fix lockfile
shangyian Jan 26, 2025
fcc785d
Merge pull request #1280 from shangyian/pickle-query-ast
shangyian Jan 27, 2025
e2f34f1
Add custom metadata field to node revision.
agorajek Jan 24, 2025
2992ad0
Add custom metadata field to the cleint side.
agorajek Jan 25, 2025
fd5d215
Alembic code lint.
agorajek Jan 27, 2025
e159878
Merge pull request #1292 from shangyian/py310
shangyian Jan 27, 2025
91a45df
Revert "Alembic code lint."
agorajek Jan 27, 2025
ab915f0
Merge pull request #1291 from DataJunction/issue/1289
agorajek Jan 28, 2025
9d1153d
Bumping DJ to version 0.0.1a84
Jan 27, 2025
c409d00
Merge pull request #1293 from DataJunction/releases/version-0.0.1a84
agorajek Jan 28, 2025
5cf565f
Fix bug with displaying required dimensions for metrics
shangyian Jan 29, 2025
aa7aa38
Merge pull request #1296 from shangyian/metrics-required-dims-bug
shangyian Jan 29, 2025
492994b
Disable query AST population for now
shangyian Jan 30, 2025
e0a6023
Fix
shangyian Jan 30, 2025
548da6c
Fix import order
shangyian Jan 30, 2025
3bfb12b
Fix coverage
shangyian Jan 30, 2025
0c922c1
Merge pull request #1298 from shangyian/disable-query-ast
shangyian Jan 30, 2025
dd54bc2
[fix] bug in how AVG is decomposed into measures.
anhl-svg Jan 31, 2025
f190125
lint fixes to pass make check
anhl-svg Jan 31, 2025
9363cf7
Revert "lint fixes to pass make check"
anhl-svg Jan 31, 2025
b0dfb17
update test
anhl-svg Jan 31, 2025
dbfd71a
lint fix
anhl-svg Jan 31, 2025
7d79945
Fix measures SQL test
shangyian Feb 1, 2025
31d6086
Merge pull request #1299 from DataJunction/fix-pre-agg-count-bug
shangyian Feb 1, 2025
3ac86d2
Bumping DJ to version 0.0.1a85
Feb 1, 2025
0996dfa
Merge pull request #1302 from DataJunction/releases/version-0.0.1a85
shangyian Feb 1, 2025
6c6aa4d
Add slack invite link
samredai Feb 5, 2025
dccd3d3
Merge pull request #1306 from DataJunction/slack
shangyian Feb 6, 2025
6e99b8f
Add new cube materialization option that uses pre-aggregated measures…
shangyian Feb 2, 2025
088bd70
Add new cube materialization models and logic
shangyian Feb 2, 2025
c1710ec
Remove extraneous
shangyian Feb 2, 2025
d06feff
v0.0.1-a84.dev2
shangyian Feb 2, 2025
2994681
Include materialization info as API endpoint
shangyian Feb 2, 2025
c96cf8c
Fix materializations UI to have a single cube choice
shangyian Feb 3, 2025
9514b0b
Fix tests
shangyian Feb 4, 2025
b4ff309
Fix tests
shangyian Feb 4, 2025
8115fbb
Fix client tests
shangyian Feb 4, 2025
8b29f10
Fix
shangyian Feb 4, 2025
cd54f37
Fix tests
shangyian Feb 4, 2025
07ecc70
Fix tests
shangyian Feb 4, 2025
f9fd67f
Fix tests
shangyian Feb 7, 2025
7e4961f
Fix
shangyian Feb 8, 2025
c5900c9
Fix
shangyian Feb 8, 2025
a91e3ca
Add additional tests
shangyian Feb 8, 2025
efa5048
Fix
shangyian Feb 8, 2025
5d2b72c
Fix tests
shangyian Feb 8, 2025
b74b9ed
Fix tests
shangyian Feb 9, 2025
b70517c
Fix tests
shangyian Feb 9, 2025
8a1c1a2
Add better logging
shangyian Feb 9, 2025
d5f3582
Fix timeout
shangyian Feb 9, 2025
3a7a4a5
Fix coverage
shangyian Feb 10, 2025
080295a
Merge pull request #1304 from shangyian/smart-cube-materialization
shangyian Feb 10, 2025
60c1a25
Bumping DJ to version 0.0.1a86
Feb 10, 2025
053deae
Merge pull request #1303 from DataJunction/releases/version-0.0.1a86
shangyian Feb 10, 2025
cc38632
Hide deactivated nodes from DAG
shangyian Feb 10, 2025
a7b2080
Merge pull request #1307 from shangyian/dag-hide-deactivated
shangyian Feb 11, 2025
155ad43
switch to ruff
samredai Jan 31, 2025
cea15dd
Running ruff on new files
shangyian Feb 12, 2025
6ab5d0d
Merge pull request #1301 from samredai/ruff
shangyian Feb 12, 2025
adbf26f
Fix Pydantic model definition for valid OpenAPI schema
shangyian Feb 12, 2025
91c0973
Add test for validating OpenAPI schema
shangyian Feb 12, 2025
38a0dd2
Add additional logging for GQL endpoints
shangyian Feb 12, 2025
432689a
Remove some pylint skips
shangyian Feb 12, 2025
4c69133
Remove more pylint
shangyian Feb 12, 2025
8c9dbc4
Remove pylint directives
shangyian Feb 12, 2025
f373a00
Remove additional pylint directives
shangyian Feb 12, 2025
1816a90
Fix tests
shangyian Feb 12, 2025
d4bee92
Fix coverage
shangyian Feb 12, 2025
518f8f3
Fix materialization
shangyian Feb 12, 2025
68fb486
Merge pull request #1308 from shangyian/fix-openapi-json
shangyian Feb 12, 2025
1d6319b
Endpoints and data model for saving user notification subscriptions (…
samredai Feb 13, 2025
cf70ce0
run tests on main branch after merging PR (#1310)
samredai Feb 13, 2025
f206de7
Add foreign key reference mapping to dimension link metadata output (…
shangyian Feb 18, 2025
944f55e
Python and javascript integration tests (#1311)
samredai Feb 18, 2025
fb3cc28
Add/Edit Node Page UI Extension (#1314)
shangyian Feb 19, 2025
8da9b84
Bumping DJ to version 0.0.1a87 (#1312)
agorajek Feb 19, 2025
00f4e9c
Added cache interface and cachelib + noop implementations (#1209)
samredai Feb 19, 2025
e9bb4e2
Update java client (#1315)
samredai Feb 20, 2025
ea6d490
Various UI Bugfixes (#1317)
shangyian Feb 25, 2025
abadac5
Add better metric metadata to materializations (#1322)
shangyian Feb 26, 2025
d5ea731
Bumping DJ to version 0.0.1a88 (#1319)
agorajek Feb 26, 2025
2598d91
Fix YAML tagging so that all nodes actually get tagged (#1325)
shangyian Mar 3, 2025
2ee5767
Decompose ANY_VALUE in metric definitions into measures (#1326)
shangyian Mar 3, 2025
e4f36c1
Bumping DJ to version 0.0.1a89 (#1327)
agorajek Mar 3, 2025
59c040c
Fix Cube() making in DJ client. (#1329)
agorajek Mar 7, 2025
761e588
Bumping DJ to version 0.0.1a90 (#1332)
agorajek Mar 7, 2025
b2c4b1e
Fix aggregation function check for metric definition (#1331)
shangyian Mar 8, 2025
31a9d0e
Process every history event through notifier depnedency after saving …
samredai Mar 10, 2025
c4a424c
Normalize all column names to be lowercase (#1335)
shangyian Mar 11, 2025
7ae4f0c
Bumping DJ to version 0.0.1a91 (#1334)
agorajek Mar 12, 2025
83e52b6
Fix java build (#1338)
shangyian Mar 13, 2025
2fae0e3
Break out logic for getting a user's notification preferences to a se…
samredai Mar 14, 2025
6605d37
Add ability to search on display name using findNodes (#1341)
shangyian Mar 14, 2025
d865a63
Add column description (#1343)
anhqle Mar 20, 2025
3346124
Fix SQL column metadata (#1345)
shangyian Mar 20, 2025
b2f5d0b
Bumping DJ to version 0.0.1a92 (#1342)
agorajek Mar 20, 2025
a546757
Add support for count_if in decomposing to measures (#1347)
shangyian Mar 24, 2025
cdb5e2f
Bumping DJ to version 0.0.1a93 (#1348)
agorajek Mar 26, 2025
4141e42
Fix error with getting cube materialization (#1354)
shangyian Apr 6, 2025
ac6e6de
Add formatting fields for metric display precision (#1356)
shangyian Apr 8, 2025
b90bc82
Bumping DJ to version 0.0.1a94 (#1351)
agorajek Apr 8, 2025
84953fa
Get all users subscribed to a specific notification (#1353)
samredai Apr 9, 2025
ded38bf
Switch python client, query service to use ruff (#1357)
shangyian Apr 9, 2025
8fd9d39
Fix bug when editing cube node with materialization (#1362)
shangyian Apr 11, 2025
8b989c8
Handle measures SQL generation where for measures columns with reserv…
shangyian Apr 11, 2025
7835ce4
Allow filtering history to events subscribed to for notifications (#1…
samredai Apr 15, 2025
4773d5e
Speed up metric edit UI load time (#1359)
shangyian Apr 15, 2025
286c3c6
Bumping DJ to version 0.0.1a95 (#1364)
agorajek Apr 16, 2025
9c59bd1
Support DISTINCT decomposition + pre-aggregation (#1367)
shangyian Apr 17, 2025
02d82c5
Cache metrics list endpoint (#1366)
samredai Apr 24, 2025
a04055a
Execute database statements with retry logic (#1369)
shangyian Apr 24, 2025
174b508
Bumping DJ to version 0.0.1a96 (#1370)
agorajek Apr 25, 2025
778d6c9
node button cleanup & watch button (#1365)
CircArgs Apr 26, 2025
beab1f9
Add additional details to cube history (#1361)
shangyian Apr 27, 2025
889fd7e
Support Viewing+Editing Multiple Dimension Links (#1372)
shangyian Apr 29, 2025
28b7560
Bumping DJ to version 0.0.1a97 (#1373)
agorajek Apr 29, 2025
37d9b8b
Add limit to findNodes GQL query (#1377)
shangyian May 10, 2025
30a00af
Bumping DJ to version 0.0.1a98 (#1374)
agorajek May 10, 2025
47b421f
Update linters (ruff, add-trailing-comma) (#1383)
shangyian May 19, 2025
6c49d86
Fix build_preaggregate_query bug. (#1381)
agorajek May 20, 2025
5cdeb5f
[WIP] Add query parameters to DJ... (#1382)
agorajek May 20, 2025
74430f3
Bumping DJ to version 0.0.1a99 (#1384)
shangyian May 20, 2025
ef7546a
Fix `show_deleted` query param for /materializations, rename it `incl…
samredai May 22, 2025
8fc66bc
Add plugin support for SQL transpilation (#1376)
shangyian May 22, 2025
a5fcaf1
Speed up the recursive dimensions graph CTE query (#1385)
shangyian May 22, 2025
41291ff
Bumping DJ to version 0.0.1a100 (#1387)
agorajek May 22, 2025
5c2776a
Add GraphQL schema generation script and seed schema file (#1390)
shangyian May 27, 2025
954704a
Add /cubes endpoint to get metadata on all cubes (#1391)
samredai May 27, 2025
61d621a
Correctly resolve generated queries in DISTINCT-agg metrics (#1388)
shangyian May 28, 2025
99d2b1e
Add pagination to /cubes endpoint (#1394)
samredai May 30, 2025
ed5a51c
Add endpoint to list available dialects (#1393)
shangyian May 31, 2025
c0a61f9
Enable metrics to reference available dimensions in definition (#1344)
shangyian Jun 3, 2025
0d955e3
Bumping DJ to version 0.0.1a101 (#1389)
agorajek Jun 3, 2025
b5c1ecc
Column metadata should include origin for columns (#1397)
shangyian Jun 4, 2025
e30c7b3
Add option to delete materializations by node version. (#1396)
agorajek Jun 10, 2025
613540d
Manage GraphQL DB session via middleware (#1403)
shangyian Jun 16, 2025
1511cad
Fix hashing on measure decomposition. (#1404)
agorajek Jun 16, 2025
9a43841
After a node is deleted, its materializations should be deactivated (…
shangyian Jun 16, 2025
53b90e2
Relax restrictions on cube validation so that cubes can be created wi…
shangyian Jun 17, 2025
ba5ddba
Add custom_metadata and downstream nodes to GraphQL api. (#1401)
agorajek Jun 17, 2025
6e514ea
Bumping DJ to version 0.0.1a102 (#1400)
agorajek Jun 17, 2025
ad99fac
Revert "Fix hashing on measure decomposition. (#1404)" (#1407)
agorajek Jun 19, 2025
6bf954b
Add GraphQL support for generating measures SQL directly on a cube (#…
shangyian Jun 19, 2025
18a44e4
Add filtering on columns for node revisions in GQL (#1409)
shangyian Jun 19, 2025
57ec71d
Add docker compose with superset (#1406)
shangyian Jun 19, 2025
4ed0619
Bumping DJ to version 0.0.1a103 (#1411)
agorajek Jun 19, 2025
2b5e869
Update test.yml (#1412)
agorajek Jun 19, 2025
f278669
Fix partition resolution on columns (#1414)
shangyian Jun 20, 2025
f1e018b
Fix test action. (#1415)
agorajek Jun 20, 2025
e2563f4
Do not require description field on a new node. (#1418)
agorajek Jun 20, 2025
5d0cfe5
Skip deactivated nodes in namespace export. (#1419)
agorajek Jun 21, 2025
87ed92a
Add reader database cluster support (#1417)
shangyian Jun 21, 2025
0c2fc10
Bumping DJ to version 0.0.1a104 (#1413)
agorajek Jun 21, 2025
583c54c
Add additional database indexes for performance (#1309)
shangyian Jun 23, 2025
55caf94
Dimensions DAG Efficiency (#1424)
shangyian Jun 23, 2025
36b3dfb
Add better tests for read replica + use in docker compose (#1420)
shangyian Jun 23, 2025
460074d
Bumping DJ to version 0.0.1a105 (#1421)
agorajek Jun 23, 2025
3f1ddab
Add missing create read-only user script (#1426)
shangyian Jun 24, 2025
7c15b25
Provide additional information on parent nodes in GQL (#1429)
shangyian Jun 25, 2025
75ed5e1
Create release.yml (#1428)
agorajek Jun 25, 2025
52ee0c8
Add custom_metadata to /metrics/<name> api. (#1431)
agorajek Jun 27, 2025
87c193a
Use session.remove() in session middleware (#1430)
shangyian Jun 27, 2025
a08429f
Add deactivated filter for downstreamNodes GraphQL query (#1432)
shangyian Jun 27, 2025
dbbdba4
Bumping DJ to version 0.0.1a106 (#1433)
agorajek Jun 27, 2025
19406da
When a dimension node is deactivated or hard-deleted, it should not s…
shangyian Jul 1, 2025
64fb62b
Fix ability to run validation queries (#1427)
shangyian Jul 1, 2025
b010f09
MAX function should be able to work on boolean arguments (#1437)
shangyian Jul 2, 2025
7d9e91a
Add node owners (#1436)
shangyian Jul 4, 2025
ff02cf5
Upgrade lockfiles + bugfixes to docker compose, QS db, and reflection…
shangyian Jul 5, 2025
45f654c
Model DJ system metrics in DJ (#1440)
shangyian Jul 11, 2025
1876adb
Remove SQLAlchemy warnings about multiple write paths for ORM objects…
shangyian Jul 11, 2025
c96a361
Upgrade to 0.0.1a107 (#1442)
shangyian Jul 15, 2025
333e2c8
Change virtual catalog name default and move system node seeds (#1443)
shangyian Jul 18, 2025
c8baa46
Bumping DJ to version 0.0.1a108 (#1444)
agorajek Jul 18, 2025
90dd3ea
Enable modifying a cube's owners (#1446)
shangyian Jul 22, 2025
5889d09
Bumping DJ to version 0.0.1a109 (#1447)
agorajek Jul 22, 2025
a5d0cfa
Overview dashboard (#1441)
shangyian Jul 28, 2025
f303735
Bumping DJ to version 0.0.1a110 (#1450)
agorajek Jul 29, 2025
44d1d12
Minor adjustments around Roads Example notebook. (#1405)
agorajek Jul 29, 2025
dfbc3c6
Add caching for sql generation (#1449)
shangyian Jul 29, 2025
7eceab5
Add dimension link versioning to nodes (#1453)
shangyian Aug 2, 2025
dd9e491
Arithmetic Unary Operator Support (#1456)
shangyian Aug 2, 2025
2163804
Bumping DJ to version 0.0.1a111 (#1452)
agorajek Aug 2, 2025
80befc5
Make sure that cache key is static (#1458)
shangyian Aug 3, 2025
df284aa
Save versioned measures (#1457)
shangyian Aug 5, 2025
79f9d3b
Bumping DJ to version 0.0.1a112 (#1459)
agorajek Aug 5, 2025
07fea2f
Expose materialization information better for cubes. (#1460)
agorajek Aug 8, 2025
211a2d6
Make the search elss long (#1464)
shangyian Aug 10, 2025
85efaee
Fix unit test failures due to expired JWT token. Tests were using a s…
shangyian Aug 22, 2025
61c564e
Fix issue with metrics not using dim ref correctly (#1470)
shangyian Aug 22, 2025
4c8c974
Fix inefficiencies in finding linked nodes to dimensions (#1469)
shangyian Aug 22, 2025
ecb8c86
Enable correct sorting of nodes within namespace (#1463)
shangyian Aug 22, 2025
b3c5eb4
Cache node upstreams (#1465)
shangyian Aug 22, 2025
815cb8f
Add support for additional dialects (#1473)
shangyian Aug 22, 2025
d2c2ef5
Bumping DJ to version 0.0.1a113 (#1466)
agorajek Aug 22, 2025
964480e
Avoid use of scoped session in favor of AsyncSession directly (#1476)
shangyian Aug 25, 2025
efa3668
Bumping DJ to version 0.0.1a114 (#1475)
agorajek Aug 25, 2025
30d6bbe
Support usage of relative urls for notifications backend call from UI…
shangyian Aug 25, 2025
8868956
Bumping DJ to version 0.0.1a115 (#1477)
agorajek Aug 25, 2025
e354562
Add BFS fallback for getting node downstreams with high fanout (#1479)
shangyian Aug 27, 2025
236b042
Bumping DJ to version 0.0.1a116 (#1480)
agorajek Aug 27, 2025
e49236d
Support query params and caching in GQL measures SQL generation (#1481)
shangyian Aug 27, 2025
bd41b48
Add check for node existence when upserting complex dimension link (#…
shangyian Sep 2, 2025
737e10c
Add caching for node and metrics SQL + reorganize (#1482)
shangyian Sep 2, 2025
9397220
Bumping DJ to version 0.0.1a117 (#1483)
agorajek Sep 2, 2025
3330400
Prevent unnecessary owner updates if the owner did not change in the …
shangyian Sep 4, 2025
6fbf3e5
Add support for service accounts (#1485)
shangyian Sep 4, 2025
86c995e
Refactor node API crud calls (#1489)
shangyian Sep 8, 2025
26e602b
Bumping DJ to version 0.0.1a118 (#1488)
agorajek Sep 8, 2025
df85cab
Move refresh source node logic to separate function from API endpoint…
shangyian Sep 11, 2025
f531353
Fix background tasks to not have database sessions or ORM objects pas…
shangyian Sep 11, 2025
16f1e27
Speed up hard delete of namespaces (#1494)
shangyian Sep 12, 2025
08c810c
Speed up creating nodes (#1495)
shangyian Sep 13, 2025
28e9848
Start using patch release numbers. (#1497)
agorajek Sep 16, 2025
5e21478
Bumping DJ to version 0.0.2 (#1498)
agorajek Sep 16, 2025
ca4efac
Fix running client tests + print the missing coverage lines (#1501)
shangyian Sep 18, 2025
70e4dc3
Enable cascading of node deletes to the tag-node and attribute-col re…
shangyian Sep 18, 2025
11f53d6
Bulk Deployment (#1491)
shangyian Sep 24, 2025
acb38be
Upgrade datajunction-server to pydantic v2
shangyian Sep 24, 2025
482666d
Fix various models to be pydantic v2 compatible
shangyian Sep 24, 2025
2e2c600
Set up fastapi mcp
shangyian Sep 24, 2025
3965b89
some additional info
shangyian Sep 24, 2025
51bda24
Fix
shangyian Sep 24, 2025
9f6b203
Fix remaining nodes tests
shangyian Sep 25, 2025
d69c05a
Fix
shangyian Sep 25, 2025
7694246
Clean up pydantic migration
shangyian Sep 25, 2025
3b8e629
Fix addl tests
shangyian Sep 25, 2025
4b4f5f1
Fix deployment tests
shangyian Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 8 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = datajunction
# omit = bad_file.py
source = dj
omit =
*/dj/sql/parsing/backends/grammar/generated/*
*/dj/sql/parsing/backends/antlr4.py
*/dj/sql/parsing/ast.py

[paths]
source =
src/
dj/
*/site-packages/

[report]
Expand All @@ -26,3 +29,5 @@ exclude_lines =
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

if TYPE_CHECKING:
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Summary

<!-- What's this change about? -->

### Test Plan

<!-- How did you test your change? -->

- [ ] PR has an associated issue: #
- [ ] `make check` passes
- [ ] `make test` shows 100% unit test coverage

### Deployment Plan

<!-- Any special instructions around deployment? -->
20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .github/release.yml

changelog:
exclude:
labels:
- ignore-for-release
authors:
- octocat
categories:
- title: Breaking Changes 🛠
labels:
- Semver-Major
- breaking-change
- title: Exciting New Features 🎉
labels:
- Semver-Minor
- enhancement
- title: Other Changes
labels:
- "*"
114 changes: 114 additions & 0 deletions .github/workflows/client-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: "Manual : Run client integration tests"
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
python-client-integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Build and launch DJ demo environment
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./docker-compose.yml"
services: |
dj
postgres_metadata
db-migration
db-seed
djqs
djqs-db-migration
djrs-redis
djrs-worker
djrs-beat
dj-trino
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: pdm-project/setup-pdm@v3
name: Setup PDM
with:
python-version: ${{ matrix.python-version }}
architecture: x64
prerelease: true
enable-pep582: true
- name: Install dependencies
run: |
pdm sync -d
cd ./datajunction-clients/python; pdm install -d -G pandas
- name: Python client integration tests
run: cd datajunction-clients/python && make test PYTEST_ARGS="--integration -k test_integration"

javascript-client-integration:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Build and launch DJ demo environment
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./docker-compose.yml"
services: |
dj
postgres_metadata
db-migration
db-seed
djqs
djqs-db-migration
djrs-redis
djrs-worker
djrs-beat
dj-trino
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dev Dependencies
run: npm install --only=dev
working-directory: ./datajunction-clients/javascript
- name: Javascript client integration tests
run: npm test
working-directory: ./datajunction-clients/javascript

java-client-integration:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17 ]
distribution: [ 'temurin' ]
steps:
- uses: actions/checkout@v3
- name: Build and launch DJ demo environment
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./docker-compose.yml"
services: |
dj
postgres_metadata
db-migration
db-seed
djqs
djqs-db-migration
djrs-redis
djrs-worker
djrs-beat
dj-trino
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.distribution }}
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: cleanTest test
build-root-directory: ./datajunction-clients/java

65 changes: 65 additions & 0 deletions .github/workflows/generate-openapi-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: "Manual : Generate OpenAPI client"
on:
workflow_dispatch:
jobs:
generate-python-client:
env:
PDM_DEPS: 'urllib3<2'
runs-on: ubuntu-latest
name: Generate Python Client
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install DJ
run: |
python -m pip install --upgrade pip
pip install .

- name: Generate OpenAPI Spec
run: ./scripts/generate-openapi.py -o openapi.json

- name: Configure Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"

- name: Commit OpenAPI Spec
run: |
git add openapi.json
git commit -m "Updating OpenAPI Spec"

- name: Generate Python client
uses: openapi-generators/openapitools-generator-action@v1.4.0
with:
generator: python
openapi-file: openapi.json
config-file: ./.github/files/python-client-gen.yml
command-args: --skip-validate-spec

- name: Move client to right directory
run: |
mkdir -p ./openapi/python
cp -r python-client/* ./openapi/python/
rm -rf python-client

- name: Set short sha
id: sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Commit generated files
run: |
git add openapi/python/
git commit -m "Update DJ Python client"
git checkout -b ci-pr/python-client-${{ steps.sha.outputs.short_sha }}
git push --set-upstream origin ci-pr/python-client-${{ steps.sha.outputs.short_sha }}

- name: Open a PR
run: gh pr create -B main -H ci-pr/python-client-${{ steps.sha.outputs.short_sha }} --title 'Update Python Client - ${{ steps.sha.outputs.short_sha }}' --body '(This PR was generated by a GitHub action)'
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/generate-openapi-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Manual : Generate OpenAPI spec"
on:
workflow_dispatch:
jobs:
generate-openapi-spec:
env:
PDM_DEPS: 'urllib3<2'
defaults:
run:
working-directory: ./datajunction-server
runs-on: ubuntu-latest
name: OpenAPI Spec
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 19

- name: Install DJ
run: |
python -m pip install --upgrade pip
pip install .

- name: Generate OpenAPI Spec
run: |
./scripts/generate-openapi.py -o ../openapi.json

- name: Generate Markdown Docs from Spec
run: |
npm install -g widdershins
widdershins ../openapi.json -o ../docs/content/0.1.0/docs/developers/the-datajunction-api-specification.md --code=true --omitBody=true --summary=true

- name: Configure Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"

- name: Set short sha
id: sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Commit OpenAPI Spec
run: |
git add ../openapi.json
git add ../docs/content/0.1.0/docs/developers/the-datajunction-api-specification.md
git commit -m "Updating OpenAPI Spec"
git checkout -b ci-pr/python-client-${{ steps.sha.outputs.short_sha }}
git push --set-upstream origin ci-pr/python-client-${{ steps.sha.outputs.short_sha }}

- name: Open a PR
run: gh pr create -B main -H ci-pr/python-client-${{ steps.sha.outputs.short_sha }} --title 'Update OpenAPI Spec - ${{ steps.sha.outputs.short_sha }}' --body '(This PR was generated by a GitHub action)'
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
name: "@Daily : Run tests with latest dependencies"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 6 * * *'

jobs:
build:
daily:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
python-version: ['3.10', '3.11.0rc1']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install latest dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[testing]'
- name: Test with pytest
run: |
pytest --cov=src/datajunction -vv tests/ --doctest-modules src/datajunction
pre-commit run --all-files
pytest --cov-fail-under=100 --cov=dj -vv tests/ --doctest-modules dj --without-integration --without-slow-integration
Loading
Loading