Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2676 commits
Select commit Hold shift + click to select a range
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
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
84e7818
Merge pull request #1135 from shangyian/depth-filter
shangyian Aug 13, 2024
67455fe
include sql_columns output in /cube/{cube_name} endpoint
samredai Aug 15, 2024
ac5d21e
add tests
samredai Aug 15, 2024
5517189
use amenable_name
samredai Aug 15, 2024
7109ff4
fix coverage
samredai Aug 16, 2024
0dae9e3
Merge pull request #1146 from samredai/sql_columns
samredai Aug 16, 2024
55232ba
Add created_by for nodes, collections, node revisions, and tags
samredai Aug 18, 2024
5952c76
update tests and expired test auth token
samredai Aug 18, 2024
6c95b69
fix linters
samredai Aug 18, 2024
49c2779
set created_by_id for all Node/NodeRevisions directly created within …
samredai Aug 18, 2024
6482077
add createdBy field to findNodes graphql resolver
samredai Aug 18, 2024
78b46de
update test assertions, add long description to alembic upgrade
samredai Aug 18, 2024
f7683ba
Merge pull request #1147 from samredai/createdBy
samredai Aug 19, 2024
d52293d
Add edited by field to the findNodes GraphQL query
shangyian Aug 13, 2024
0b81f5a
Add loading of created_by attribute to both REST and GraphQL
shangyian Aug 28, 2024
38f2662
Add back for GraphQL user query
shangyian Aug 28, 2024
f5fe041
Fix lint
shangyian Aug 28, 2024
687555e
Fix lint
shangyian Aug 28, 2024
788aa23
Fix tests
shangyian Aug 29, 2024
cf8f1fb
Merge pull request #1142 from shangyian/add-created-by-graphql
shangyian Aug 29, 2024
780fe8b
Bumping DJ to version 0.0.1a63
Aug 26, 2024
eed4dbf
Merge pull request #1139 from DataJunction/releases/version-0.0.1a63
shangyian Aug 29, 2024
10a9e5e
Adding '/data/{node_name}' path to fetch data for a single node with …
skastel Aug 22, 2024
075c98d
Adding no cover to lines that coverage refuses to acknowledge being hit.
skastel Aug 28, 2024
1a70480
Merge pull request #1151 from skastel/add_node_data_fetch
agorajek Aug 29, 2024
34089a2
Always refresh the user object after getting the current user from th…
shangyian Aug 29, 2024
8642b8e
Fix lint
shangyian Aug 29, 2024
c527394
Fix tests
shangyian Aug 29, 2024
6d488a7
Merge pull request #1152 from shangyian/use-refreshed-user
shangyian Aug 30, 2024
b4439f2
Migrate to the new SQL build for metrics SQL and data endpoints
shangyian Aug 21, 2024
a1ee48f
Fix
shangyian Aug 21, 2024
7e2e71d
Fix
shangyian Aug 21, 2024
b78b266
Fix find nodes test
shangyian Aug 24, 2024
cf5d3d2
Fix dimension links test
shangyian Aug 24, 2024
0795aeb
Fix tests
shangyian Aug 26, 2024
192cd9c
Migrate various sql-building endpoints to use new build
shangyian Aug 26, 2024
d9c85ef
Cleanup
shangyian Aug 26, 2024
53b7602
Remove unused build code and add a few additional tests for node SQL …
shangyian Aug 27, 2024
2d000c7
Remove unnecessary tests
shangyian Aug 28, 2024
f6bb67c
Fix lint
shangyian Aug 28, 2024
0207b14
Fix client tests
shangyian Aug 29, 2024
0861a3c
Fix tests
shangyian Aug 30, 2024
9dd2320
Fix client tests
shangyian Aug 30, 2024
94cbbd7
Fix
shangyian Aug 30, 2024
b29cade
Fix tests
shangyian Sep 3, 2024
8483e38
Merge pull request #1149 from shangyian/metrics-sql-migrate-v2
shangyian Sep 3, 2024
78aa0fd
Bumping DJ to version 0.0.1a64
Sep 2, 2024
edb9ab4
Merge pull request #1154 from DataJunction/releases/version-0.0.1a64
shangyian Sep 4, 2024
56a5bbc
Fix issue with GraphQL findNode queries erroring out when retrieving …
shangyian Sep 3, 2024
369834f
Merge pull request #1155 from shangyian/fix-graphql-tags-null-descrip
shangyian Sep 5, 2024
6b1d7da
Fix from_json function to parse the specified schema
shangyian Sep 6, 2024
9a7cebc
fix lint
shangyian Sep 6, 2024
c76575d
fix lint
shangyian Sep 6, 2024
ef3fe9b
Merge pull request #1160 from shangyian/fix-from-json
shangyian Sep 6, 2024
d66c20a
Make node list max configurable
shangyian Sep 3, 2024
d2462e4
Merge pull request #1157 from shangyian/make-list-nodes-configurable
shangyian Sep 6, 2024
f9ceefa
Adding 'use_materialized' flag to sql endpoints to allow clients to s…
skastel Sep 6, 2024
a8a825d
Adding unit test for use_materialized=False
skastel Sep 9, 2024
873e00b
Adding 'use_materialized' param to python sql client.
skastel Sep 9, 2024
2224347
Removing print in favor of logger
skastel Sep 9, 2024
48007f5
Add default catalog setting for DJ nodes created that don't have an i…
shangyian Sep 9, 2024
6406a84
Merge pull request #1167 from shangyian/add-default-catalog
shangyian Sep 10, 2024
d41eab8
Merge pull request #1161 from DataJunction/allow_unmaterialized_sql_flag
shangyian Sep 10, 2024
a2a2a92
Bumping DJ to version 0.0.1a65
Sep 9, 2024
9a8d293
Merge pull request #1165 from DataJunction/releases/version-0.0.1a65
shangyian Sep 10, 2024
11f7e64
Fix a bug where when any node with a query is updated, we should reva…
shangyian Sep 8, 2024
412b648
Add register_view to Server and Python client.
agorajek Aug 30, 2024
3d89ba9
Add query-based source node refresh.
agorajek Aug 30, 2024
34a6a51
Fix tests
shangyian Sep 9, 2024
1bcf1a8
Merge pull request #1153 from DataJunction/issue/1127
agorajek Sep 12, 2024
790ce61
init script to create djqs database
samredai Sep 5, 2024
b74a3ce
dependencies: remove sqlmodel and sqlalchemy, add psycopg
samredai Sep 5, 2024
76cf4ce
remove alembic and Settings reliance on pydantic
samredai Sep 9, 2024
2414001
Remove catalogs and engines models and CRUD endpoints
samredai Sep 9, 2024
cdc1e2d
Add pyscopg_pool dependency
samredai Sep 9, 2024
c4eddb6
alembic working w/o sqlmodel
samredai Sep 9, 2024
1c5ecf3
columns endpoint working
samredai Sep 9, 2024
9b8c696
both query endpoints work
samredai Sep 9, 2024
599c822
Source code should be good, now just need to update tests
samredai Sep 9, 2024
c7bb8d9
test configured for new structure
samredai Sep 10, 2024
c2541ec
Tests at 92 coverage
samredai Sep 11, 2024
efecabb
Full coverage
samredai Sep 11, 2024
0cf0e4f
Set default engine and engine version if not explicitly set in request
samredai Sep 11, 2024
13eb60c
Passing tests and linters as well as 100% coverage
samredai Sep 11, 2024
dae6642
Use dj database for djqs queries with alembic_version_djqs table name
samredai Sep 11, 2024
c16969f
update the dependencies to allow for pdm install --dev to work
samredai Sep 11, 2024
470ede3
Postgres testcontainer configured to run on port 4321 for DJQS tests
samredai Sep 11, 2024
8b6e696
update pdm version for djqs and remove unused dblink script
samredai Sep 11, 2024
e1ab22e
Install dev dependencies for tests
samredai Sep 11, 2024
56dc3ab
remove pytest.ini and update pylint config
samredai Sep 11, 2024
5e7fef9
simplify pdm install command in github action
samredai Sep 11, 2024
b90f813
increase timeout to 10 seconds for postgres pool init
samredai Sep 11, 2024
72abd3e
remove print statement
samredai Sep 11, 2024
e70e0e1
parameterize db name in alembic script, and add examples for endpoint…
samredai Sep 11, 2024
504f198
-x uri=... param for alembic scripts
samredai Sep 12, 2024
f6736e8
remove Settings.alembic_uri, no longer used
samredai Sep 15, 2024
ed981c9
Merge pull request #1168 from samredai/djqs-psycopg
samredai Sep 15, 2024
710ad83
Merge pull request #1164 from shangyian/dimension-link-update-bug
shangyian Sep 16, 2024
e116552
Make Python client unit tests fast again.
agorajek Sep 18, 2024
5a4c1b6
Merge pull request #1171 from DataJunction/issue/1170
agorajek Sep 19, 2024
a079c74
Speed up SQL building by assigning columns to their table origins in …
shangyian Sep 20, 2024
0986371
Fix lint
shangyian Sep 21, 2024
14725be
Raise errors on ambiguous column origins and check for column namespa…
shangyian Sep 21, 2024
20c9d1f
Clean up function names
shangyian Sep 21, 2024
49e94cf
Close threadpoolexecutor
shangyian Sep 22, 2024
813d5c4
Comments
shangyian Sep 24, 2024
6e68cf8
Fix an issue where we should not parse set ops or lateral views in th…
shangyian Sep 24, 2024
7d062ff
Merge pull request #1173 from shangyian/speed-up-build
shangyian Sep 24, 2024
c911c18
Support order in the new SQL builder
shangyian Sep 24, 2024
d2bb24f
Add support for setting order in the measures SQL endpoint
shangyian Sep 24, 2024
f77d88a
Add tests for requesting measures SQL with order by
shangyian Sep 24, 2024
63fd6bb
Add better error handling for order by check
shangyian Sep 24, 2024
c433988
Add test for error handling of order clause
shangyian Sep 24, 2024
96fa157
Merge pull request #1176 from shangyian/orderby-support
shangyian Sep 24, 2024
7b12ef8
partial inline table implementation
shangyian Sep 24, 2024
784ffeb
Fix an issue with certain types of inline table queries
shangyian Sep 24, 2024
408cc2c
Fix bug and add tests for inline table parsing
shangyian Sep 25, 2024
7b3e8f9
Cleanup
shangyian Sep 25, 2024
1892ef7
Simplify changes
shangyian Sep 25, 2024
ec13e47
Merge pull request #1177 from shangyian/inline-table2
shangyian Sep 25, 2024
6ef3a25
Bumping DJ to version 0.0.1a66
Sep 23, 2024
84c7da8
Merge pull request #1169 from DataJunction/releases/version-0.0.1a66
shangyian Sep 26, 2024
1fc3e1f
Add reference link API support
shangyian Sep 19, 2024
36e383d
Take reference links into account when building SQL
shangyian Sep 19, 2024
51a07cd
Add tests for reference links
shangyian Sep 19, 2024
c3cd71f
Fix dimension links tests after changing examples
shangyian Sep 24, 2024
3318d15
Separate out reference link into separate API endpoint
shangyian Sep 25, 2024
bca4b29
Add remove reference dimension link and tests
shangyian Sep 25, 2024
1d2b10d
Remove unused models
shangyian Sep 25, 2024
49d9937
Add test for error cases in reference dimension links
shangyian Sep 25, 2024
d5ac36b
The get dimensions function should support finding reference dimensio…
shangyian Sep 26, 2024
ebf8308
Add python client support for creating/updating/removing reference di…
shangyian Sep 26, 2024
92aa29e
Remove pydantic from DJ client.
agorajek Sep 27, 2024
9e49c9c
Remove pydantic from DJ client project compile and from PDM.
agorajek Sep 27, 2024
b79cf17
Address comments.
agorajek Sep 27, 2024
44da48a
Merge pull request #1181 from DataJunction/issue/1170
agorajek Sep 30, 2024
0b8b787
Bumping DJ to version 0.0.1a67
Sep 30, 2024
d5b506d
Merge pull request #1182 from DataJunction/releases/version-0.0.1a67
agorajek Sep 30, 2024
29023a6
Remove fastapi-cache2 from client deps.
agorajek Oct 2, 2024
3924c5f
Merge pull request #1186 from DataJunction/issue/1170
agorajek Oct 2, 2024
ef1e446
Make sure that we detect cycles in the recursive CTEs used to travers…
shangyian Oct 2, 2024
0dc8c68
Fix lint
shangyian Oct 2, 2024
7f2c32a
Add cycle detection to upstreams and downstreams as well
shangyian Oct 2, 2024
4be939f
Fix lint
shangyian Oct 2, 2024
61646b6
Add test for cycle detection in dimensions graph
shangyian Oct 3, 2024
4014e95
Fix tests
shangyian Oct 3, 2024
ec28355
Fix column attribution by making sure it only comes from the same parent
shangyian Oct 2, 2024
8cdee8b
Merge pull request #1187 from shangyian/fix-column-attribution
shangyian Oct 3, 2024
a4af8fd
Merge pull request #1189 from shangyian/infinite-loop-recursion
shangyian Oct 3, 2024
8ff4f55
Bumping DJ to version 0.0.1a68
Oct 3, 2024
f9c0969
Merge pull request #1190 from DataJunction/releases/version-0.0.1a68
shangyian Oct 3, 2024
fe96d0e
Merge pull request #1172 from shangyian/reference-links
shangyian Oct 4, 2024
8ee467d
Cleanup YAML project code.
agorajek Oct 4, 2024
a1ba24f
Upstream tables list for built SQL should only include source nodes
shangyian Oct 7, 2024
dd82365
The dimensions graph search should use BFS not DFS
shangyian Oct 7, 2024
cd15f0c
For the upstream tables list for built SQL, only include nodes that h…
shangyian Oct 7, 2024
aa1a291
Fix tests for dimension links
shangyian Oct 7, 2024
56d8927
Allow access to exsisting tags in YAML project.
agorajek Oct 7, 2024
8f0d0f4
Merge pull request #1195 from shangyian/fix-upstream-tables
shangyian Oct 7, 2024
1c613c8
Merge pull request #1193 from DataJunction/issue/1192
agorajek Oct 8, 2024
6386092
Unify the update_if_exists param in DJ client.
agorajek Oct 8, 2024
d3cc27b
Fix a bug in node update.
agorajek Oct 9, 2024
a3361ba
Merge pull request #1197 from DataJunction/issue/1192
agorajek Oct 9, 2024
68585da
Cleanup update_if_exists vs skip_if_exists.
agorajek Oct 9, 2024
05a85b9
Change create_tag to update_if_exists.
agorajek Oct 10, 2024
2e0cb9c
Merge pull request #1199 from DataJunction/issue/1192
agorajek Oct 10, 2024
28ed522
Bumping DJ to version 0.0.1a69
Oct 7, 2024
517d47d
Merge pull request #1194 from DataJunction/releases/version-0.0.1a69
agorajek Oct 10, 2024
741715d
Requesting metrics SQL should work for metrics that have different pa…
shangyian Oct 9, 2024
998bdbc
Handle merging of metrics across transforms after the aggregation tak…
shangyian Oct 10, 2024
267e983
Add additional tests for generating SQL for metrics across different …
shangyian Oct 10, 2024
506b447
Revert refresh
shangyian Oct 10, 2024
386b07b
Fix remaining tests
shangyian Oct 10, 2024
5d01cfe
Fix tests
shangyian Oct 10, 2024
5a5a2fd
Refactor into separate cube query builder
shangyian Oct 10, 2024
24a2ccd
Fix coroutine await
shangyian Oct 10, 2024
071cf3c
Fix issue with ignoring errors
shangyian Oct 10, 2024
ccc0135
Fix client tests
shangyian Oct 10, 2024
c490cef
Fix lint
shangyian Oct 10, 2024
8c7aad8
Fix client tests
shangyian Oct 10, 2024
20be7c4
Fix lint
shangyian Oct 10, 2024
81bc49a
Merge pull request #1198 from shangyian/metrics-sql-multiple-parents
shangyian Oct 10, 2024
ee0f033
Fix an issue where retrieving cube SQL fails because the node object …
shangyian Oct 11, 2024
e56e87c
Add refresh of cache for every metrics SQL request
shangyian Oct 11, 2024
c9be191
Fix pdm lock check
shangyian Oct 11, 2024
fd1f143
Merge pull request #1200 from shangyian/fix-greenlet-cube-sql
shangyian Oct 11, 2024
8f4956a
Bumping DJ to version 0.0.1a70
Oct 14, 2024
9ed081f
Merge pull request #1202 from DataJunction/releases/version-0.0.1a70
shangyian Oct 14, 2024
0df280b
Add lookback window to Materialization calls.
agorajek Oct 17, 2024
c845c8a
Merge pull request #1206 from DataJunction/DJ-108
agorajek Oct 17, 2024
44c139e
For metrics SQL generation, we should COALESCE dimensions after doing…
shangyian Oct 22, 2024
bc6a5bc
Fix test
shangyian Oct 22, 2024
a3ebc9a
Fix alias handling for order by clause with coalesce
shangyian Oct 22, 2024
63d2b1f
Fix lint
shangyian Oct 22, 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