Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2229 commits
Select commit Hold shift + click to select a range
2df3427
Merge pull request #898 from shangyian/fix-missing-table-alembic
shangyian Jan 24, 2024
1245f28
Remove the mixture of async endpoints with a sync db connection. This…
shangyian Jan 26, 2024
c79b275
Merge pull request #901 from shangyian/remove-sync-async-mix
shangyian Jan 26, 2024
d05a232
Bumping DJ to version 0.0.1a41
Jan 26, 2024
db87fa1
Merge pull request #902 from DataJunction/releases/version-0.0.1a41
shangyian Jan 26, 2024
3b5da09
Add section in the node columns tab to display complex dimension links
shangyian Jan 24, 2024
dc1e773
Add a new 'Dimensions' tab for the node page that displays all availa…
shangyian Jan 24, 2024
15eda21
Add tests for both the new tab and the complex dimension links display
shangyian Jan 24, 2024
c19fd41
Change graph layout so that nodes default to showing the PK and FK co…
shangyian Jan 25, 2024
aab8825
Merge pull request #899 from shangyian/dims-ui
shangyian Jan 26, 2024
ee6c9bd
Fix UI tags bug + speed up node DAG (#903)
shangyian Jan 28, 2024
0ae0239
Bumping DJ to version 0.0.1a42
Jan 29, 2024
fca2c0f
Merge pull request #904 from DataJunction/releases/version-0.0.1a42
shangyian Jan 29, 2024
185d388
Switch the primary key input in the node editor UI to use a select (w…
shangyian Jan 28, 2024
0268667
Merge pull request #906 from shangyian/primary-key-better-ui
shangyian Jan 31, 2024
8a0aec3
Fix issue with search failing when it hits a null node description (#…
shangyian Jan 31, 2024
a237e6f
In the DJ server's metrics endpoint, return additional information li…
shangyian Feb 3, 2024
2f02ea7
- Modify the metrics create/edit UI to take an upstream node and an a…
shangyian Feb 3, 2024
2ade0d5
Add support for required dimensions configuration in the metrics crea…
shangyian Feb 4, 2024
d2d2ed1
Merge pull request #914 from shangyian/redesign-metrics-ui
shangyian Feb 5, 2024
bacb57e
Introduce more restrictions when populating the full name field durin…
shangyian Feb 5, 2024
8c59a1f
Merge pull request #915 from shangyian/required-dims-ui
shangyian Feb 6, 2024
d6b7181
Bumping DJ to version 0.0.1a43
Feb 6, 2024
683dd14
Merge pull request #916 from DataJunction/releases/version-0.0.1a43
shangyian Feb 6, 2024
d745086
Switch to 'published' as the default in the UI, since the user experi…
shangyian Feb 8, 2024
60611f0
Merge pull request #917 from shangyian/published-as-default
shangyian Feb 8, 2024
be946c4
Add api endpoint for copying nodes to a new node
shangyian Feb 8, 2024
de0698d
Support copying over deactivated nodes and reorganize tests
shangyian Feb 9, 2024
a022876
Merge pull request #919 from shangyian/copy-node
shangyian Feb 9, 2024
fd4cdf1
v0.0.1-a43.dev0
shangyian Feb 8, 2024
5438d16
Fix bug where deactivated nodes show up when listing nodes for a tag
shangyian Feb 9, 2024
d1c5fa8
Fix metric aggregation check
shangyian Feb 9, 2024
a15ba94
Merge pull request #920 from shangyian/tags-list-nodes-bug
shangyian Feb 9, 2024
b3e1c73
Fix bug where editing cubes does not retain information on tags and n…
shangyian Feb 14, 2024
296aab4
Merge pull request #923 from shangyian/fix-cubes-edit
shangyian Feb 14, 2024
126d3e3
Remove unused attributes to not clutter the column attributes space
shangyian Feb 16, 2024
4df14ba
Temp commit for switching to node-level dimension links
shangyian Feb 4, 2024
f574ee2
Switch to node-level dimension links
shangyian Feb 22, 2024
9ea6f7d
Refactoring and more tests
shangyian Feb 23, 2024
e2e97a3
Fix client tests
shangyian Feb 24, 2024
09fbe46
Bumping DJ to version 0.0.1a44
Feb 26, 2024
b338da0
Merge pull request #928 from DataJunction/releases/version-0.0.1a44
shangyian Feb 26, 2024
1b64757
On the cube node edit page, enable editing of metrics
shangyian Feb 26, 2024
f993d22
Add an output for dimension links that shows the foreign key to prima…
shangyian Feb 27, 2024
04fc0e2
Fix tests
shangyian Feb 27, 2024
082c67d
Merge pull request #929 from shangyian/enable-edit-cube-metrics
shangyian Feb 27, 2024
6bb0970
Merge pull request #924 from shangyian/remove-unused-attributes
shangyian Feb 27, 2024
451923b
Fix failure on wildcards in node info API
shangyian Mar 1, 2024
16fc8ce
Merge pull request #926 from shangyian/use-node-level-links
shangyian Mar 1, 2024
1984c98
Switch all column-level dimension link API calls to use node-level di…
shangyian Mar 1, 2024
90680dd
Modify UI to display node-level dimension links
shangyian Mar 1, 2024
f4f3e81
Merge pull request #931 from shangyian/fix-wildcard-failure
shangyian Mar 5, 2024
a1a873e
Fix server, client, and UI tests
shangyian Mar 2, 2024
3d04e91
Merge pull request #932 from shangyian/switch-to-node-level
shangyian Mar 5, 2024
88e2cfa
Support aggregated cube materialization
shangyian Mar 6, 2024
a634f0e
Add test for druid agg materialization
shangyian Mar 6, 2024
4b8c0f7
Add better Spark config editor in the UI
shangyian Mar 6, 2024
aeb1525
Rename jobs to druid_measures_cube and druid_metrics_cube for clarity
shangyian Mar 6, 2024
3896026
Fix the node graph UI for node-level dimension links
shangyian Mar 6, 2024
cf202ae
Fix tests
shangyian Mar 6, 2024
68fb740
Fix
shangyian Mar 6, 2024
bcf7430
Merge pull request #935 from shangyian/materialize-agg-cubes
shangyian Mar 7, 2024
6f8ecc6
Fix bugs with full materialization
shangyian Mar 6, 2024
46f24f4
Fix additional materialization bugs. Add more comprehensive tests.
shangyian Mar 10, 2024
e50a194
Fix availability posting
shangyian Mar 10, 2024
2542e89
Merge pull request #936 from shangyian/fix-full-materialization
shangyian Mar 12, 2024
32dc0d4
Add a placeholder query in Transform editor to guide users
anhl-svg Mar 12, 2024
41023a3
Merge pull request #939 from anhqle/placeholder_in_transform_editor
shangyian Mar 12, 2024
21f9164
Increase database connection limit
shangyian Mar 14, 2024
b2f179b
Make database settings configurable
shangyian Mar 14, 2024
4fb4c9a
Fix mypy lint failure
shangyian Mar 14, 2024
9eb4684
Fix client pre-commit
shangyian Mar 14, 2024
1a827e2
Fix get_engine unit test
shangyian Mar 14, 2024
55df66c
Fix measures sql building
shangyian Mar 13, 2024
f9bc842
Fix
shangyian Mar 14, 2024
4ef6044
Fix
shangyian Mar 14, 2024
cffc0fa
Merge pull request #941 from shangyian/increase-database-pool
shangyian Mar 14, 2024
0f62226
Fix deadlock issue where using Depends() for a database session cause…
shangyian Mar 15, 2024
77102aa
Upgrade fastapi to the latest version by pinning it to >=0.110.0
shangyian Mar 18, 2024
3a2d628
Merge pull request #943 from shangyian/upgrade-fastapi
shangyian Mar 19, 2024
ea0bf19
Add a loading ticker for form submission so that it's clear when the …
shangyian Mar 10, 2024
2efb993
Fix json parsing
shangyian Mar 10, 2024
16e7ad8
Merge pull request #938 from shangyian/ui-wait
shangyian Apr 3, 2024
74e5e79
Updating OpenAPI Spec
Apr 3, 2024
c889a39
Merge pull request #946 from DataJunction/ci-pr/python-client-16e7ad8
shangyian Apr 3, 2024
d950974
Add listing nodes with tags to Python client.
agorajek Apr 4, 2024
9f71e93
FEAT Add support for the complex dimension endpoints to DJService (#945)
anhqle Apr 4, 2024
f247f5b
Merge pull request #942 from shangyian/fix-deadlock
shangyian Apr 4, 2024
e4301aa
Handle gracefully registering an table that already exists.
agorajek Apr 5, 2024
27acf34
Add basic user and login to DJ python client.
agorajek Apr 5, 2024
5abde72
Merge pull request #947 from DataJunction/issue-891
agorajek Apr 5, 2024
a82952f
Add replace() udf signature.
agorajek Apr 10, 2024
a6df751
Merge pull request #950 from DataJunction/add_udf_replace
agorajek Apr 10, 2024
f91ac91
Switch DJ to support Python 3.10 and up only.
agorajek Apr 10, 2024
20b04e0
Merge pull request #952 from DataJunction/py310-and-up
agorajek Apr 10, 2024
fa22a8d
Bumping DJ to version 0.0.1a45
Apr 10, 2024
843be91
Attempt to fix the mypy tests on Github.
agorajek Apr 10, 2024
c6b7175
Merge pull request #954 from DataJunction/fix-tests
agorajek Apr 10, 2024
5f9d32b
Merge branch 'main' into releases/version-0.0.1a45
agorajek Apr 10, 2024
f03ec57
Merge pull request #953 from DataJunction/releases/version-0.0.1a45
shangyian Apr 10, 2024
f818a2c
Fix explode function query assembly
shangyian Apr 11, 2024
67a0c80
Merge pull request #955 from shangyian/fix-explode-func
shangyian Apr 11, 2024
336f861
Hide delete button after deleting a node.
agorajek Apr 11, 2024
f2b71f7
Fix subscript dereferencing bug. The field's namespace can only be ex…
shangyian Apr 12, 2024
9e1796d
Add tests for subscript deref and concat_ws
shangyian Apr 12, 2024
798ac52
Fix tests
shangyian Apr 12, 2024
5b45c5c
Merge pull request #957 from shangyian/fix-subscript-bug
shangyian Apr 12, 2024
447ba64
Add dense_rank() and add additional type inference for rank()
shangyian Apr 13, 2024
31d865f
Merge pull request #956 from DataJunction/node-deletion-fixes
agorajek Apr 13, 2024
75d9a3e
Merge pull request #958 from shangyian/add-dense-rank
shangyian Apr 13, 2024
2ce3770
Add documentation on Dimension Linking and reorganize docs to make it…
shangyian Apr 14, 2024
3d95f95
Fix links
shangyian Apr 14, 2024
86f5e10
Fix links
shangyian Apr 15, 2024
238d6b8
Fix styling
shangyian Apr 15, 2024
ab7cfc9
Remove repeated section
shangyian Apr 15, 2024
b13bd8e
Add styling
shangyian Apr 15, 2024
712b0e8
Adding more details about DJ deployment
shangyian Apr 15, 2024
46f3405
Fix link
shangyian Apr 15, 2024
29c07cb
Merge pull request #960 from shangyian/dim-link-docs
shangyian Apr 16, 2024
ff4d18f
Improve node history UI and provide the ability to diff node revisions
shangyian Apr 16, 2024
fc9337b
Add better test coverage
shangyian Apr 16, 2024
da92bce
Fix tests
shangyian Apr 16, 2024
d5bda70
Merge pull request #961 from shangyian/better-node-history
shangyian Apr 18, 2024
d730a76
Switch to an async database connection
shangyian Apr 10, 2024
9a8c126
Get tests running on top of postgres instead of sqlite
shangyian Apr 11, 2024
fc1869a
Use AsyncAdaptedQueue
shangyian Apr 18, 2024
503311e
Fix tests for py310
shangyian Apr 18, 2024
58034e4
Speed up measures sql endpoint by consolidating validate_cube into a …
shangyian Apr 18, 2024
127db4f
Speed up endpoints. Remove unneeded requirement asyncpg
shangyian Apr 19, 2024
7310c35
Merge pull request #951 from shangyian/async-again
shangyian Apr 20, 2024
bfc0169
Fix bug when displaying client code for creating materialization
shangyian Apr 20, 2024
151c799
Fix intermittent bug when database connection dies
shangyian Apr 20, 2024
4b415a2
Raise better error messages
shangyian Apr 20, 2024
fc488f2
Fix attributes test
shangyian Apr 20, 2024
605b482
Merge pull request #964 from shangyian/fix-intermittent-bugs
shangyian Apr 21, 2024
9b56770
Add cache-control headers to all APIs that use the DJQS's submit_query
shangyian Apr 23, 2024
a6fc633
Add better error exposure from query service calls
shangyian Apr 23, 2024
293e459
Merge pull request #966 from shangyian/pass-cache-control-headers
shangyian Apr 24, 2024
b2b79a3
Fix bug where updating nodes that have deactivated children fail
shangyian Apr 26, 2024
db92629
Update wording to use deactivated and not deleted
shangyian Apr 26, 2024
153b728
Merge pull request #970 from shangyian/fix-update-propagate-status
shangyian Apr 26, 2024
2bd0ffe
Sort history events in descending order
shangyian Apr 26, 2024
40b8989
Fix
shangyian Apr 26, 2024
8a571b9
Add extra validation for cubes with non-existent metrics or cubes wit…
shangyian Apr 27, 2024
0b52d57
Fix
shangyian Apr 27, 2024
7d7b7e3
Merge pull request #971 from shangyian/sort-history-desc
shangyian Apr 27, 2024
81ff598
Add support for determining the dialect for a SQL function and return…
shangyian Apr 30, 2024
4edb8d6
Add a warning about Druid-compatibility of metric SQL to the UI
shangyian Apr 30, 2024
62dd273
Added tests for Druid functions
shangyian Apr 30, 2024
6a67093
Merge pull request #974 from shangyian/druid-functions
shangyian Apr 30, 2024
d819e64
Save built queries to database to speed up requesting SQL and data
shangyian Apr 29, 2024
4ec6727
Add tests for different types of query build saving
shangyian Apr 29, 2024
6fdbdf8
Fix issues supporting dimension roles in filter and dimension inputs
shangyian Apr 29, 2024
825339e
Merge pull request #973 from shangyian/save-query-build
shangyian May 1, 2024
cac6e43
Fix an issue where pushing down filters should use the column names a…
shangyian Apr 21, 2024
e10c926
Propagating updates downstream should copy over dimension links durin…
shangyian Apr 21, 2024
0f05019
Merge pull request #965 from shangyian/fix-intermittent-bugs
shangyian May 1, 2024
c7d34fc
Bumping DJ to version 0.0.1a46
May 1, 2024
694d905
Merge pull request #977 from DataJunction/releases/version-0.0.1a46
shangyian May 1, 2024
c00f314
Move some of the node-related functions to the internal/nodes module …
shangyian May 5, 2024
0042778
Merge pull request #980 from shangyian/refactor-node-func
shangyian May 5, 2024
aac526f
Disable status check for measures SQL generation until we get to the …
shangyian May 2, 2024
b98c5fb
Merge pull request #978 from shangyian/disable-status-check
shangyian May 5, 2024
4294078
Fix node update status propagation bug (due to downstreams not being …
shangyian May 5, 2024
45a972f
Display more detailed status info in the UI
shangyian May 5, 2024
0ef51e1
Merge pull request #981 from shangyian/improve-node-status
shangyian May 6, 2024
8228c3d
Use the queryrequest cache where possible to serve /data requests whe…
shangyian May 8, 2024
a3d839b
Fix lint
shangyian May 8, 2024
30a369e
FIX python client error not propagating
anhl-svg May 8, 2024
ce7537b
lint
anhl-svg May 8, 2024
204413c
Merge pull request #985 from DataJunction/fix-error-not-propagate
shangyian May 8, 2024
2175d2e
fix basic login demanding json body
anhl-svg May 8, 2024
df5e360
Merge branch 'main' into use-cached-query-data
shangyian May 9, 2024
eaa9758
Merge pull request #986 from DataJunction/05-08-fix_basic_login_deman…
anhqle May 9, 2024
0bcab05
Merge branch 'main' into use-cached-query-data
shangyian May 9, 2024
71b58ed
Merge pull request #984 from shangyian/use-cached-query-data
shangyian May 9, 2024
0b1e674
Fix issue with cube tags always getting reset
shangyian May 9, 2024
b85d21f
Merge pull request #990 from shangyian/fix-cube-tags
shangyian May 9, 2024
af8f8ce
Add regexp_extract and regexp_replace.
agorajek May 10, 2024
ca1b8f1
Make the node list alligned to the top.
agorajek May 10, 2024
f17a975
Missed a unit test.
agorajek May 10, 2024
abff754
chore remove try/except in client methods (#987)
anhqle May 10, 2024
9a02546
Merge pull request #992 from DataJunction/more_udfs
agorajek May 10, 2024
881f7d9
Add support for categorical materialization
shangyian May 7, 2024
97b313f
Add support for setting categorical partitions in the DJ UI
shangyian May 7, 2024
efa3881
Remove fetching client code for creating materialization
shangyian May 9, 2024
ebbc8ee
Add a loading / wait loop for the Run Backfill form
shangyian May 9, 2024
bd39d44
Add database migration for updated backfill spec
shangyian May 9, 2024
897787f
Fix cube materialization refreshes upon cube update
shangyian May 9, 2024
644ff3d
Merge pull request #983 from shangyian/categorical-mat
shangyian May 11, 2024
8d34a4d
make description optional (#991)
anhqle May 13, 2024
a9b5693
Allow deletion of materializations and fix few bugs.
agorajek May 13, 2024
647765e
Merge pull request #994 from DataJunction/mater_cleanup
agorajek May 14, 2024
3cd5bc1
Bumping DJ to version 0.0.1a47
May 15, 2024
f588270
Merge pull request #995 from DataJunction/releases/version-0.0.1a47
agorajek May 15, 2024
0d8a10e
show the full errror message (#998)
anhqle May 17, 2024
4c880d1
Don't use materialized tables in the materialization jobs.
agorajek May 17, 2024
e697daf
Add the following Spark functions: transform_keys, transform_values, …
shangyian May 17, 2024
61204e8
Merge pull request #1000 from shangyian/additional-functions
shangyian May 20, 2024
f11696a
Merge pull request #999 from DataJunction/issue-997
agorajek May 20, 2024
cd18a84
Bumping DJ to version 0.0.1a48
May 20, 2024
3f8269c
Merge pull request #1005 from DataJunction/releases/version-0.0.1a48
shangyian May 21, 2024
fc3ebe1
Add node query generation with filters
shangyian May 8, 2024
e3ab2dc
Add the ability to save an external query id for a query request
shangyian May 21, 2024
0a017cd
Add an SSE stream endpoint for node data
shangyian May 21, 2024
760af60
Make the UI support SSE streams for node data and generally improve t…
shangyian May 21, 2024
f14bdf5
Merge pull request #1006 from shangyian/query-runner
shangyian May 21, 2024
68757bf
Bumping DJ to version 0.0.1a49
May 21, 2024
b29a9a4
Merge pull request #1007 from DataJunction/releases/version-0.0.1a49
agorajek May 21, 2024
7911d05
Fix various links in the docs
shangyian May 22, 2024
c47c804
Merge pull request #1008 from shangyian/fix-docs
shangyian May 22, 2024
3a5149f
Attempt to fix the comparison for struct types.
agorajek May 22, 2024
bbc862a
Fix issue with node SQL using its own availability state during query…
shangyian May 22, 2024
1e3db70
Merge pull request #1009 from DataJunction/struct-fix
agorajek May 22, 2024
f240d03
Merge pull request #1010 from shangyian/fix-query-runner-sql
shangyian May 22, 2024
9f7b4c3
Add weekly schedule to version bump workflow.
agorajek May 22, 2024
27c284c
Merge pull request #1011 from DataJunction/weekly-version-bump
agorajek May 22, 2024
7928c44
Enable dimension values dropdown so that users know what values to in…
shangyian May 23, 2024
ebb3b8b
Merge pull request #1012 from shangyian/enable-dimension-value-dropdowns
shangyian May 23, 2024
8a37d6b
Show source node refreshes in the node history tab
shangyian May 24, 2024
ea5221c
Merge pull request #1016 from shangyian/ui-show-refresh-in-history
shangyian May 24, 2024
9107b0b
Fix bug where filters were not being pushed down correctly
shangyian May 24, 2024
0db6bb2
Fix a bug with source node refreshes dropping dimension links
shangyian May 24, 2024
25143ef
Fix handling of column and table aliases during filter pushdown
shangyian May 24, 2024
3402c6b
Merge pull request #1017 from shangyian/fix-filters-bug
shangyian May 26, 2024
9765f0a
Fix an issue where removing dimension links was taking a long time be…
shangyian May 26, 2024
91f8dd3
Add loading stage to dimensions linking and node validation so that u…
shangyian May 27, 2024
9cabfab
Merge pull request #1020 from shangyian/fix-remove-dimensionlink
shangyian May 27, 2024
c9de961
Merge pull request #1023 from shangyian/ui-updates
shangyian May 27, 2024
216508c
Sort dimensions by order of usage when displaying them in the link di…
shangyian May 26, 2024
6339abb
add update functionality to create_ methods (#1001)
anhqle May 28, 2024
f8f81a6
Merge pull request #1022 from shangyian/sort-dimensions
shangyian May 29, 2024
efeb2bd
Add a node dependencies tab that displays the node graph in list form
shangyian May 27, 2024
b4a9fa1
Merge pull request #1024 from shangyian/node-dag-list
shangyian May 29, 2024
304ffa5
fix-source-updatenode (#1025)
anhqle May 29, 2024
c6170a8
Bumping DJ to version 0.0.1a50
May 29, 2024
8d285bb
Merge pull request #1028 from shangyian/releases/version-0.0.1a50
shangyian May 29, 2024
c05d55d
Fix cube element (specifically metrics) ordering bug
shangyian May 30, 2024
d5b6f32
Merge pull request #1029 from shangyian/fix-cube-element-order
shangyian May 30, 2024
033341b
Speed up sql building by short-circuiting the compilation for Cast ex…
shangyian May 31, 2024
e3453ba
Fix tests
shangyian Jun 1, 2024
91da7c3
Merge pull request #1030 from shangyian/speed-up-sql-build
shangyian Jun 1, 2024
8e8dd58
Bumping DJ to version 0.0.1a51
Jun 3, 2024
2e75ac1
Merge pull request #1031 from DataJunction/releases/version-0.0.1a51
shangyian Jun 3, 2024
19fdc91
Update Spark ANTLR grammars with the latest versions
shangyian Jun 3, 2024
8034203
Regenerate the ANTLR parser based on the modified grammar
shangyian Jun 3, 2024
1089d5b
Modify generated grammar to support hints by manually converting the …
shangyian Jun 3, 2024
20bb573
Add support for parsing Spark hints to the AST by adding visitors for…
shangyian Jun 3, 2024
6e37fbc
Merge pull request #1033 from shangyian/sql-hints
shangyian Jun 4, 2024
0734396
Support selecting wildcards in node queries
shangyian May 10, 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