Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2490 commits
Select commit Hold shift + click to select a range
c9ee27e
Merge pull request #1044 from DataJunction/releases/version-0.0.1a52
shangyian Jun 10, 2024
db26fee
Support filtering on dimensions available on upstream source nodes ev…
shangyian Jun 11, 2024
f708bf1
Merge pull request #1046 from shangyian/upstream-source-filters
shangyian Jun 12, 2024
c576818
Fix updating cubes with the Python client
shangyian Jun 11, 2024
e1e9dce
Fix bug with filter-only dimensions having wrong metadata when callin…
shangyian Jun 13, 2024
59d1e21
Merge pull request #1049 from shangyian/filter-only-dims-metadata
shangyian Jun 14, 2024
2c78958
Merge pull request #1047 from shangyian/client-cube-update
shangyian Jun 14, 2024
3135485
Add a get node function to the DJ client that is agnostic to the node…
shangyian Jun 14, 2024
c1feedd
Fix bug with cube node updates not being registered because they were…
shangyian Jun 14, 2024
af27452
Merge pull request #1053 from shangyian/add-get-node-client
shangyian Jun 14, 2024
37f1486
Bumping DJ to version 0.0.1a53
Jun 14, 2024
294daa3
Merge pull request #1054 from DataJunction/releases/version-0.0.1a53
shangyian Jun 14, 2024
9d11754
Add support for lookback windows when materializing cubes
shangyian Jun 14, 2024
c449e25
Merge pull request #1056 from shangyian/cube-materialization-lookback
shangyian Jun 18, 2024
1f4c6eb
Bumping DJ to version 0.0.1a54
Jun 17, 2024
3189fa6
Merge pull request #1058 from DataJunction/releases/version-0.0.1a54
shangyian Jun 18, 2024
569d2e2
Add datajunction-community google group to readme (#1069)
samredai Jun 20, 2024
7d805c3
Add ability to set tags when creating a cube
shangyian Jun 19, 2024
0c20fd9
Add ability to set metric metadata, required dimensions, and tags
shangyian Jun 20, 2024
a8ae130
Merge pull request #1066 from shangyian/cubes-client-create-tags
shangyian Jun 20, 2024
9596917
Add jinja2 templating to support cleaner client code generation
shangyian Jun 20, 2024
44887b6
Add notebook export for namespaces and cubes
shangyian Jun 20, 2024
a839236
Fix recreating deactivated namespace
shangyian Jun 20, 2024
c88f1af
Add complete test coverage for notebook exports of nodes, including t…
shangyian Jun 21, 2024
a498aa0
Merge pull request #1070 from shangyian/client-export-nodes
shangyian Jun 25, 2024
7f78b9a
Bumping DJ to version 0.0.1a55
Jun 24, 2024
374497e
Merge pull request #1072 from DataJunction/releases/version-0.0.1a55
shangyian Jun 25, 2024
fc24a69
Make server/api/c* tests run in module scope.
agorajek Jun 10, 2024
a76a008
Fix missing unit tests.
agorajek Jun 23, 2024
714c760
Merge pull request #1045 from DataJunction/tests-api-c
agorajek Jun 25, 2024
2c0f75b
Make tests/api/data_test.py use module scope.
agorajek Jun 25, 2024
ef3febe
Merge pull request #1074 from DataJunction/tests-api-d
agorajek Jun 26, 2024
02cd837
Change tests/api/dimensions_test.py to module scope.
agorajek Jun 26, 2024
e1a7c71
Convert tests/api/djql_test.py to module scope.
agorajek Jun 26, 2024
477f3ae
Merge pull request #1075 from DataJunction/tests-api-d
agorajek Jun 27, 2024
420db4e
Convert tests/api/[e-h]* to module scope.
agorajek Jun 27, 2024
77be5ee
Merge pull request #1076 from DataJunction/tests-api-h
shangyian Jun 27, 2024
5a77560
Raise an error if a temporal partition was not specified for a Druid …
shangyian Jun 27, 2024
992f036
Collections API
samredai Jun 20, 2024
780510b
Add delete endpoint for removing nodes from a collection
samredai Jun 20, 2024
05073f4
some pr feedback
samredai Jun 21, 2024
b8875f9
adding tests for collections
samredai Jun 26, 2024
5826127
collections tests
samredai Jun 28, 2024
9a5a676
fix import
samredai Jun 28, 2024
ff5779a
lint
samredai Jun 28, 2024
09ee765
Fix tests
shangyian Jun 28, 2024
3a1909d
Merge pull request #1077 from shangyian/temporal-partition-raise
shangyian Jun 28, 2024
e8c5266
Convert tests/api/measures_test.py to module scope.
agorajek Jun 28, 2024
45d2bb6
Bumping DJ to version 0.0.1a56
Jul 1, 2024
76cd786
Merge pull request #1080 from DataJunction/tests-api-m
agorajek Jul 1, 2024
4d5bbaf
Fix sequence function
shangyian Jun 28, 2024
ea74774
fix test class name
samredai Jul 1, 2024
1552e47
change fixtures to module scope
samredai Jul 1, 2024
2229d12
fix tests
samredai Jul 1, 2024
da0479b
Merge pull request #1079 from shangyian/fix-sequence
shangyian Jul 1, 2024
e20e392
Make the tests async compatible
samredai Jul 1, 2024
dab827b
Merge pull request #1081 from DataJunction/releases/version-0.0.1a56
shangyian Jul 2, 2024
f2982e0
fix asserts in collections module scope tests
samredai Jul 2, 2024
a3010be
use different collection for each async test
samredai Jul 2, 2024
e591ae6
Merge pull request #1071 from DataJunction/collections
samredai Jul 2, 2024
a387121
Convert tests/api/materializations_test.py to module scope.
agorajek Jul 1, 2024
ae736a8
Merge branch 'main' into tests-api-m
agorajek Jul 2, 2024
116206b
Merge pull request #1082 from DataJunction/tests-api-m
agorajek Jul 3, 2024
382ff3b
For notebook export, add generated client code for setting column att…
shangyian Jul 3, 2024
c3dbee2
Allow docs dropdown in UI with .env configured urls
samredai Jul 3, 2024
bef7429
Merge pull request #1083 from shangyian/notebook-export-column-attr
shangyian Jul 3, 2024
93e7bdf
Fix issue with lateral view explode sql rendering
shangyian Jul 5, 2024
03522ae
Fix bug with explode
shangyian Jul 5, 2024
27690a2
Merge pull request #1086 from shangyian/fix-explode-bug
shangyian Jul 5, 2024
80e29a5
Merge pull request #1085 from DataJunction/extra-docs
samredai Jul 6, 2024
6428508
Convert tests/api/namespaces_test.py and node_update_test.py to modul…
agorajek Jul 6, 2024
800520c
Use module-level fixtures for sql tests
shangyian Jul 3, 2024
1d17ecd
Fix tests
shangyian Jul 5, 2024
db848c4
Fix access test
shangyian Jul 6, 2024
7f95b38
Merge pull request #1084 from shangyian/module-sql-tests
agorajek Jul 7, 2024
dde24a6
Merge pull request #1088 from DataJunction/tests-api-n
agorajek Jul 7, 2024
b1afcb2
Bumping DJ to version 0.0.1a57
Jul 8, 2024
6be919c
Merge pull request #1089 from DataJunction/releases/version-0.0.1a57
shangyian Jul 8, 2024
87a46fa
Add Trino to a DJQS, including an optional trino docker compose profile
samredai Jul 8, 2024
2dd416d
detect STR as StringType()
samredai Jul 8, 2024
db70a04
create pdm lock with newer version of pdm
samredai Jul 8, 2024
908b1ab
fix bugs
samredai Jul 8, 2024
1f29d5a
recreating pdm.lock with pdm==2.8.1
samredai Jul 8, 2024
8743f39
Add a demo .env for the query service
samredai Jul 8, 2024
c1c727b
Remove optimization to filter down query only to necessary columns un…
shangyian Jul 8, 2024
8471181
Pass in dimension node filters so that dimension node select optimiza…
shangyian Jul 8, 2024
2c6bbb2
fix tests
samredai Jul 9, 2024
f225885
set default reflection engine for tests explicitly
samredai Jul 9, 2024
1caf64b
Merge pull request #1091 from shangyian/fix-optimize-query
shangyian Jul 9, 2024
2126eb3
pass engine and engine version in tests
samredai Jul 9, 2024
80b75ff
don't need to test setting an engine version explicitly
samredai Jul 9, 2024
6b57086
don't set default in test settings
samredai Jul 9, 2024
bedd2ca
Merge pull request #1090 from DataJunction/add-trino-to-djqs
samredai Jul 9, 2024
43218d7
Add additional node and measures sql to the Python client
shangyian Jul 9, 2024
5adb960
Add docs on new client updates
shangyian Jul 9, 2024
29430a3
Add test coverage
shangyian Jul 9, 2024
ff657bc
Merge pull request #1093 from shangyian/client-additional-sql
shangyian Jul 9, 2024
3f9710b
Make add namespace popover less confusing by pre-populating it with t…
shangyian Jul 11, 2024
8858950
Support requesting SQL for cubes from the /sql/<node> endpoint
shangyian Jul 9, 2024
e181828
Merge pull request #1095 from shangyian/cube-sql
shangyian Jul 11, 2024
918acc2
Merge pull request #1100 from shangyian/fix-add-namespace
shangyian Jul 11, 2024
651ba47
Upsert users who are authenticated but not stored in the user table
samredai Jul 12, 2024
ce3a25c
lint
samredai Jul 12, 2024
03ac4e4
add docs and change dependency name
samredai Jul 12, 2024
d45ef05
Add DataJunction+Trino Quickstart
samredai Jul 12, 2024
97f4b84
add images
samredai Jul 12, 2024
0ea7c52
Add a section on also configuring tpch and trino on the core service
samredai Jul 12, 2024
32a1997
Bumping DJ to version 0.0.1a58
Jul 15, 2024
0d8114c
Merge pull request #1106 from DataJunction/releases/version-0.0.1a58
shangyian Jul 15, 2024
27eb935
Merge pull request #1103 from DataJunction/dj-trino-quickstart
samredai Jul 15, 2024
06b1ea1
Merge pull request #1101 from DataJunction/upsert-user
samredai Jul 15, 2024
380057f
Bumping DJ to version 0.0.1a59
Jul 15, 2024
0aef921
Merge pull request #1108 from DataJunction/releases/version-0.0.1a59
samredai Jul 15, 2024
5bca291
Add find nodes graphQL query
shangyian Jul 14, 2024
044ee18
Refactor GraphQL query input parser and resolvers
shangyian Jul 14, 2024
2fd777a
More refactoring of GraphQL scalars
shangyian Jul 14, 2024
89a2947
Fix
shangyian Jul 15, 2024
e164b55
Add additional tests to cover GraphQL queries of all node fields
shangyian Jul 16, 2024
7ecd258
Coverage
shangyian Jul 16, 2024
b3e02b8
coverage
shangyian Jul 16, 2024
b5192b9
Merge pull request #1107 from shangyian/graphql-find-nodes
shangyian Jul 17, 2024
620e2cc
Fix SQL building with filters so that the filter expression is attach…
shangyian Jul 16, 2024
84b005d
Add null check for filter pushdown
shangyian Jul 17, 2024
bdfe735
Add additional tests for filter pushdown
shangyian Jul 17, 2024
28c7a5b
Fix aliasing in filter clauses
shangyian Jul 17, 2024
9f012d0
Merge pull request #1109 from shangyian/fix-filters
shangyian Jul 17, 2024
a3fe9e2
Add users endpoints for retrieving nodes by user
shangyian Jul 10, 2024
2577882
Fix tests
shangyian Jul 10, 2024
0d12423
Update users endpoints and add one for retrieving the current user
shangyian Jul 17, 2024
da41132
Merge pull request #1096 from shangyian/my-nodes-dashboard
shangyian Jul 17, 2024
b6f1b38
Update the GET /users endpoint to only pull users with activity when …
shangyian Jul 17, 2024
3551bb2
Remove unnecessary endpoint
shangyian Jul 18, 2024
82a17fd
Remove unnecessary endpoint
shangyian Jul 18, 2024
3b986a8
Merge pull request #1110 from shangyian/fix-users
samredai Jul 18, 2024
29c4d53
Require current_user everywhere, no longer optional
samredai Jul 22, 2024
8fdf311
Bugfix, make sure EXPLODE includes parenthesis around column list
samredai Jul 22, 2024
ce6a4bb
login the test builder client
samredai Jul 22, 2024
7f25603
lint
samredai Jul 22, 2024
de8889f
Differentiate lateral view explode and an explode in the projection
samredai Jul 22, 2024
219c92f
Merge pull request #1114 from DataJunction/bug-fix-explode
samredai Jul 23, 2024
1dab167
authenticated test client in tests and fix settings dep injection
samredai Jul 25, 2024
909dd43
make secret required in settings
samredai Jul 25, 2024
de27a5d
lint
samredai Jul 25, 2024
16fd8df
change to correct iss for auth test
samredai Jul 25, 2024
907f2cd
Revert "Merge pull request #1109 from shangyian/fix-filters"
shangyian Jul 25, 2024
562df7c
Merge pull request #1113 from DataJunction/require-current_user
samredai Jul 25, 2024
87c33a1
forward request headers when requests are made to query service
samredai Jul 25, 2024
32af3b0
remove request_headers null check
samredai Jul 25, 2024
1fd4efd
fix bug in TestRequestsSessionWithEndpoint
samredai Jul 25, 2024
0718447
Getting further
shangyian Jul 17, 2024
10a8c4a
Add v2 build
shangyian Jul 17, 2024
22f1f51
Fix
shangyian Jul 18, 2024
90b519f
Add tests and refactor
shangyian Jul 18, 2024
1758437
Fix
shangyian Jul 18, 2024
1cf0ea8
temp
shangyian Jul 18, 2024
7a6571d
temp
shangyian Jul 19, 2024
15633c0
more test cases
shangyian Jul 19, 2024
cc975d1
Fix
shangyian Jul 23, 2024
44fa178
add more tests and cleanup
shangyian Jul 23, 2024
41b971c
Add v2 measures sql endpoint
shangyian Jul 23, 2024
24e600e
Fix
shangyian Jul 23, 2024
ec7967c
update client to use v2
shangyian Jul 23, 2024
eacc001
Add more tests for measures sql and add canonical dimension renames
shangyian Jul 24, 2024
4715824
Fix lint
shangyian Jul 24, 2024
73ff4e9
Add better descriptions of new measures v2 endpoint
shangyian Jul 24, 2024
0bc2fdc
More comments
shangyian Jul 24, 2024
8e82d27
Make sure filters are always pushed down to source nodes
shangyian Jul 24, 2024
0d30c7d
Fix tests
shangyian Jul 25, 2024
9ca045e
Add coverage
shangyian Jul 25, 2024
2659009
Remove comment
shangyian Jul 25, 2024
95cfc38
Merge pull request #1121 from shangyian/revert/fix-filters
shangyian Jul 25, 2024
ab2333a
remove explicit cache control headers pass along
samredai Jul 25, 2024
2ddc24d
Merge branch 'main' into node-sql-build
shangyian Jul 25, 2024
22cd023
Merge pull request #1120 from DataJunction/pass-on-request-headers
samredai Jul 26, 2024
42f70b3
Merge pull request #1116 from shangyian/node-sql-build
shangyian Jul 26, 2024
3286bcb
Bumping DJ to version 0.0.1a60
Jul 22, 2024
8a3e35d
Merge pull request #1112 from DataJunction/releases/version-0.0.1a60
shangyian Jul 26, 2024
0c403d9
Accept query headers for trino
sadath-12 Jul 26, 2024
4c86a7d
Accept auth headers in trino
sadath-12 Jul 26, 2024
1e2fdbb
Add sorting to fields in explorer view's node table
shangyian Jul 26, 2024
07594ca
Move the add nodes dropdown above the node table
shangyian Jul 26, 2024
1c46a83
remove node mode from table
shangyian Jul 26, 2024
0ad48a9
Cleanup
shangyian Jul 26, 2024
a2c46b7
adjust headers
sadath-12 Jul 26, 2024
485050d
Fix
shangyian Jul 26, 2024
988e8ad
Fix
shangyian Jul 26, 2024
8ceea6f
Merge pull request #1123 from shangyian/add-field-sorting
shangyian Jul 26, 2024
b097c86
better uri.path handling
sadath-12 Jul 28, 2024
44e77a7
Merge branch 'main' into dynamic
sadath-12 Jul 28, 2024
26cf071
Bumping DJ to version 0.0.1a61
Jul 29, 2024
2a7e7c7
add trino_server header
sadath-12 Jul 29, 2024
fea9a69
pass trino server url
sadath-12 Jul 29, 2024
2044f3c
minor change
sadath-12 Jul 29, 2024
ab0e2c7
cleanup imports
sadath-12 Jul 29, 2024
30a5b7f
re-org
sadath-12 Jul 29, 2024
5912705
rename header
sadath-12 Jul 29, 2024
e5ae941
headers correct
sadath-12 Jul 30, 2024
e4690b0
Merge pull request #1124 from DataJunction/releases/version-0.0.1a61
shangyian Jul 30, 2024
fbf7e34
Merge branch 'main' into dynamic
sadath-12 Jul 30, 2024
0728301
When listing nodes in a namespace, return additional information on t…
shangyian Jul 28, 2024
c38000c
Add filter options to the existing Explore dashboard
shangyian Jul 28, 2024
06ce653
Remove redundant styling
shangyian Jul 28, 2024
645b81d
Add test for list nodes for namespace output changes
shangyian Jul 28, 2024
ac97659
Fix client tests
shangyian Jul 29, 2024
f42c652
Add option to request edited by attribute for node if desired
shangyian Jul 31, 2024
8a018f5
Do not pass on encoding-related headers to the query service
shangyian Jul 31, 2024
5cfc0ba
Add filtered headers for other query service calls as well
shangyian Jul 31, 2024
e47c5b0
Add unit test for filtered headers
shangyian Aug 1, 2024
5216c80
Add logging
samredai Aug 1, 2024
3e31a24
add a test for SQLALCHEMY_URI header
samredai Aug 1, 2024
c458fc4
Merge pull request #1129 from shangyian/ignore-some-headers
shangyian Aug 1, 2024
203288e
Merge pull request #1115 from sadath-12/dynamic
samredai Aug 1, 2024
5e5d78e
Merge pull request #1126 from shangyian/explore-filters
shangyian Aug 1, 2024
4fbbb85
Fix bug with retrieving revisions for nodes in the graphql findNodes …
shangyian Aug 6, 2024
3c39303
Fix build failures due to types-pkg-resources being yanked.
shangyian Aug 6, 2024
0180bc4
Merge pull request #1134 from shangyian/fix-graphql-revisions
shangyian Aug 7, 2024
daf2472
Fixing greenlet spawn error when building metrics sql
shangyian Aug 6, 2024
8d94936
Fix another bug where we should ignore some headers when asking the q…
shangyian Aug 7, 2024
eeee994
Merge pull request #1136 from shangyian/fix-sql-build-greenlet
shangyian Aug 7, 2024
70cbee1
Cubes should be able to reference dimension attributes that share the…
shangyian Aug 9, 2024
5812a12
Add test for such cube dimensions
shangyian Aug 9, 2024
7dc8b7a
Merge pull request #1138 from shangyian/fix-cube-dimensions
shangyian Aug 9, 2024
fd629f2
Refactor node query building v2 to use the builder pattern
shangyian Jul 31, 2024
152a2d4
Add test coverage
shangyian Jul 31, 2024
403ad21
Refactor based on comments
shangyian Aug 5, 2024
0794716
Change table to cached property
shangyian Aug 5, 2024
fa62e57
Pass in settings to GeneratedSQL object
shangyian Aug 5, 2024
32060bf
Make sure that ordering of CTEs are in correct order
shangyian Aug 7, 2024
e036e70
Save all ctes to mapping
shangyian Aug 7, 2024
1982d67
Reuse alias for node references where specified by the user
shangyian Aug 7, 2024
39463ac
Additional refactoring
shangyian Aug 8, 2024
973ec9c
Fix inclusion of ctes
shangyian Aug 8, 2024
93e83e1
Fix CTE type propagation
shangyian Aug 9, 2024
3f1d266
Remove duplicate CTEs when building final query
shangyian Aug 10, 2024
e2a64db
Fix issue where bad attribution of CTE columns was happening when a n…
shangyian Aug 10, 2024
a7af859
Fix bad aliasing of columns
shangyian Aug 10, 2024
eed61ab
Merge pull request #1128 from shangyian/query-builder-pattern
shangyian Aug 10, 2024
91530f8
Bumping DJ to version 0.0.1a62
Aug 5, 2024
5bae4b5
Merge pull request #1130 from DataJunction/releases/version-0.0.1a62
shangyian Aug 11, 2024
3056b22
schema: multi-tenancy
sadath-12 Aug 12, 2024
4537bc1
Merge branch 'main' into schema
sadath-12 Aug 12, 2024
28ef69b
Add depth filter when retrieving downstream nodes
shangyian Aug 6, 2024
4ab80dc
Comments
shangyian Aug 13, 2024
6f5741a
Add tests and fix lint
shangyian Aug 13, 2024
03119d8
manage migrations
sadath-12 Aug 13, 2024
84e7818
Merge pull request #1135 from shangyian/depth-filter
shangyian Aug 13, 2024
c83a186
route requests to schema
sadath-12 Aug 14, 2024
5bf3677
remove print
sadath-12 Aug 14, 2024
1a52076
fix lint
sadath-12 Aug 14, 2024
f046828
Merge branch 'main' into schema
sadath-12 Aug 14, 2024
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? -->
79 changes: 79 additions & 0 deletions .github/workflows/client-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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
run: DOTENV_FILE="/code/datajunction-server/.env.integration" docker-compose --profile demo up -d
- 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
run: docker-compose --profile demo up -d
- 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
run: docker-compose --profile demo up -d
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.distribution }}
- name: Official Gradle Wrapper Validation Action
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
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