Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1483 commits
Select commit Hold shift + click to select a range
d4e530e
Add history model changes and more tests
shangyian Jul 12, 2023
a78dde0
Add UI changes so that history tracking table isn't displayed horizon…
shangyian Jul 12, 2023
e1c23bc
Adding more history tracking
shangyian Jul 12, 2023
bdca759
Modify history entities to more accurately represent the data models …
shangyian Jul 14, 2023
f6789b1
Add tests for history of nodes, attributes, and namespaces
shangyian Jul 14, 2023
44a0819
Add alembic migration for context node in history
shangyian Jul 14, 2023
20e34f4
Add tests for history tracking while deleting nodes, restoring nodes,…
shangyian Jul 14, 2023
74d72a3
More tests
shangyian Jul 14, 2023
6b85b2d
Add tests for tag history
shangyian Jul 14, 2023
721dee3
Changing name of history context_node to node
shangyian Jul 15, 2023
6d5bf1e
Updating DJ demo db
shangyian Jul 15, 2023
a0cba55
Adding details to history view in UI
shangyian Jul 15, 2023
71fb519
Fix tags test
shangyian Jul 15, 2023
0aa57a4
Merge pull request #626 from shangyian/more-history
shangyian Jul 15, 2023
9c1220e
Making errors check include a null-check (#636)
samredai Jul 16, 2023
2157bbf
Just show text for status (#637)
samredai Jul 16, 2023
f0fec4f
Add datajunction.io to readme
shangyian Jul 17, 2023
a3de2a1
Merge pull request #642 from shangyian/add-datajunction-io
shangyian Jul 17, 2023
2466166
Fix bug where reactivating a node that gets referenced by a downstrea…
shangyian Jul 18, 2023
4fcebd7
Fix lint
shangyian Jul 18, 2023
371c568
Update so that we recheck type inference on all existing columns. Min…
shangyian Jul 19, 2023
10da79b
Merge pull request #644 from shangyian/fix-activate-downstream-cube
shangyian Jul 19, 2023
358dfaa
Add history for node status changes and dimension link removal
shangyian Jul 19, 2023
2c6ce2c
Add tests for history tracking of unlinking dimensions
shangyian Jul 19, 2023
79e4fec
Modifying the UI to display node status changes
shangyian Jul 19, 2023
3177348
Add some additional info when an upstream delete/restore action chang…
shangyian Jul 19, 2023
e64b293
Fix test for deactivation
shangyian Jul 19, 2023
b4d945c
Merge pull request #646 from shangyian/history-statuses
shangyian Jul 19, 2023
c2fb576
Start by splitting the base _DJClient class.
agorajek Jul 14, 2023
0eb3868
global setting for source_node_namespace and /register/table/... endp…
samredai Jul 19, 2023
fbb0e7f
Add methods to DJReader.
agorajek Jul 20, 2023
f28d9d8
Merge pull request #635 from DataJunction/issue-630
agorajek Jul 20, 2023
c2c0e08
Add more context from column's parent when type inference for a colum…
shangyian Jul 20, 2023
b8376c1
Fix test
shangyian Jul 20, 2023
531af1e
Adding additional functions
shangyian Jul 20, 2023
db9ab81
Adding tests for functions
shangyian Jul 20, 2023
e9db809
Fix test for round
shangyian Jul 20, 2023
11e1a68
Add no parent node check
shangyian Jul 20, 2023
986020c
Coverage
shangyian Jul 20, 2023
d47cb3e
Merge pull request #653 from shangyian/type-inference-context
shangyian Jul 20, 2023
167dcc5
Account for both identifiers of the filter function's lambda and rais…
shangyian Jul 21, 2023
7ea0471
Merge pull request #650 from shangyian/various-functions
shangyian Jul 21, 2023
2fec3f0
Fix namespace display in ui after changing namespaces endpoint
shangyian Jul 21, 2023
7d65529
Merge pull request #656 from shangyian/fix-namespace-ui
shangyian Jul 21, 2023
54de971
Add functionality to get nodes with common dimensions
shangyian Jul 21, 2023
e212f47
Add additional test for filtering nodes with common dims by type
shangyian Jul 21, 2023
7dfb379
Fixing typing compatibility across python versions
shangyian Jul 21, 2023
a49bd4b
Add early break for common dimensions checks
shangyian Jul 21, 2023
3696fe6
Merge pull request #657 from shangyian/add-nodes-with-common-dims
shangyian Jul 21, 2023
9f7c5bc
Add common_metrics() to Python client.
agorajek Jul 22, 2023
d2013a2
Add refresh endpoint for source nodes
shangyian Jul 22, 2023
b1b1e53
Add tests for source node refresh endpoint
shangyian Jul 22, 2023
fc15c57
Update reflection service to call the source node refresh endpoint. M…
shangyian Jul 22, 2023
dfc5376
Update docker compose with new reflection service module
shangyian Jul 22, 2023
8a8a1a3
Split common_m|d into regular and with_details.
agorajek Jul 22, 2023
d3502b4
Fixing pdm lock check and changing /nodes/ endpoint to return list of…
shangyian Jul 23, 2023
1d58fef
Update pdm lockfile for reflection service
shangyian Jul 23, 2023
c818191
Fix pdm lock version
shangyian Jul 23, 2023
f4a71c5
Merge pull request #659 from shangyian/refresh-sources
shangyian Jul 23, 2023
7f39423
Add server sent event /stream/ endpoint and use in UI (#649)
samredai Jul 23, 2023
202493a
Merge pull request #658 from DataJunction/issue-630
agorajek Jul 24, 2023
884f6c7
Add back dj.demo.db
agorajek Jul 24, 2023
f01159a
adding java client folder structure (#660)
Geo881 Jul 25, 2023
97bfe71
Merge pull request #662 from DataJunction/issue-630
shangyian Jul 25, 2023
6acf6a0
remove integration test data from demo db (#663)
samredai Jul 25, 2023
b73c2d7
Add gradle validation and build github action (#664)
samredai Jul 25, 2023
57f8bd6
Add dj_current_timestamp function
shangyian Jul 22, 2023
031ef3e
Add function for date_format. Add tests for dj_current_timestamp setup
shangyian Jul 24, 2023
e257c06
Change function name and add runtime replacement with substitution pa…
shangyian Jul 25, 2023
81eb8c3
Python Client cleanup part 2
agorajek Jul 26, 2023
4ba084e
Remove custom check for dj_logical_timestamp in build
shangyian Jul 26, 2023
8602cfa
Update documentation on dj_logical_timestamp
shangyian Jul 26, 2023
08268c8
Merge pull request #665 from DataJunction/issue-630
agorajek Jul 26, 2023
452d1fb
Remove import from examples (#666)
samredai Jul 26, 2023
1596aab
Merge pull request #661 from shangyian/dj-current-timestamp
shangyian Jul 26, 2023
a108152
Add register_table functionality to the DJ python client
shangyian Jul 26, 2023
b60fd44
When registering table, check if source with the name already exists …
shangyian Jul 26, 2023
7a9049e
Adding debug mode to client, which hides the traceback when using the…
shangyian Jul 26, 2023
050a7f5
Merge pull request #667 from shangyian/register-table-python-client
shangyian Jul 27, 2023
2304e9f
Improve the error returned when node creation fails due to type infer…
shangyian Jul 27, 2023
6f18b9e
On large queries with many columns and subqueries, table compilation …
shangyian Jul 27, 2023
a919630
Merge pull request #668 from shangyian/better-type-inference-errors
shangyian Jul 27, 2023
a9bfe97
Fix lint
shangyian Jul 27, 2023
40e4e58
Merge pull request #669 from shangyian/compile-speed
shangyian Jul 27, 2023
2d64645
Rename client to datajunction-client.
agorajek Jul 27, 2023
c5fa762
remove djopenapi and update pdm
agorajek Jul 27, 2023
50d7e75
make datajunction-client plural
agorajek Jul 27, 2023
496726c
replace code references
agorajek Jul 27, 2023
0b6c0f2
final make check
agorajek Jul 27, 2023
db05863
Missed few spots.
agorajek Jul 27, 2023
6d592ec
remove pyyaml and update pdm
samredai Jul 28, 2023
2227344
Update pycln in linter config
samredai Jul 28, 2023
84fcde5
Merge pull request #670 from DataJunction/issue-630
agorajek Jul 28, 2023
58a8ef8
Fixing bug around sql-formatter
shangyian Jul 28, 2023
e9be8aa
Add memoization to build so that we don't recompile and rebuild the s…
shangyian Jul 28, 2023
c19552f
Remove extraneous logging
shangyian Jul 28, 2023
8a63f28
Remove extraneous parts for pickling
shangyian Jul 28, 2023
4e15fb2
Merge pull request #672 from shangyian/sql-format-bugfix
shangyian Jul 28, 2023
74e5aae
Make logging configurable from file
shangyian Jul 28, 2023
5222395
Update pattern for argument default
shangyian Jul 28, 2023
dc36c8f
Merge pull request #671 from shangyian/build-speed
shangyian Jul 28, 2023
5496390
Add list_dimensions() w/ namespace to api and python client.
agorajek Jul 28, 2023
891af46
Merge pull request #673 from DataJunction/issue-630
agorajek Jul 28, 2023
283e43c
notebook fixes and dj.demo.db (#675)
samredai Jul 29, 2023
6a24a6c
Modify the API-generated python client code based on the new client s…
shangyian Jul 30, 2023
9a257f2
Add the following SparkSQL functions:
shangyian Jul 30, 2023
49aa4bb
Add the following functions:
shangyian Jul 30, 2023
90a3fda
Add the following functions:
shangyian Jul 30, 2023
0bf2905
Add the following functions:
shangyian Jul 30, 2023
1824b66
Added the following functions:
shangyian Jul 30, 2023
4b17a05
Added the following functions:
shangyian Jul 30, 2023
244721d
Add the following functions:
shangyian Jul 30, 2023
3891ed6
Adding the following functions:
shangyian Jul 30, 2023
9d79fd7
Added the following functions:
shangyian Jul 30, 2023
3561863
Add function: get
shangyian Jul 30, 2023
587af40
Add the following functions:
shangyian Jul 30, 2023
b328e26
Added the following functions:
shangyian Jul 30, 2023
f91ec70
Added the following functions:
shangyian Jul 30, 2023
c1b340b
Added the following functions:
shangyian Jul 31, 2023
79a885c
Added the following functions:
shangyian Jul 31, 2023
fe8289c
Added the following functions:
shangyian Jul 31, 2023
2eecc68
Added the following functions:
shangyian Jul 31, 2023
6595931
Added the following functions:
shangyian Jul 31, 2023
539693a
Added the following functions
shangyian Jul 31, 2023
5312643
Add the following functions:
shangyian Jul 31, 2023
34a7abc
Add the following functions:
shangyian Jul 31, 2023
7fe3d9b
Added the following functions:
shangyian Jul 31, 2023
1d0fc89
Added the following functions:
shangyian Jul 31, 2023
504d9d9
Added the following functions:
shangyian Jul 31, 2023
208456a
Merge pull request #676 from shangyian/new-client-code
shangyian Jul 31, 2023
c787eea
Fix tests
shangyian Jul 31, 2023
a320157
v0.0.1-rc.11
shangyian Jul 31, 2023
f3558b5
v0.0.1-rc.12
shangyian Jul 31, 2023
e9743a5
v0.0.1-rc.13
shangyian Jul 31, 2023
09afaf8
Bump versions of datajunction server and client
shangyian Jul 31, 2023
8f7cf8a
Remove dependency on itertools' pairwise, which isn't there for pytho…
shangyian Jul 31, 2023
f2cacf6
Fix coverage for functions
shangyian Jul 31, 2023
87620e8
Rename duplicate test name
shangyian Jul 31, 2023
447579f
Merge pull request #677 from shangyian/more-spark-funcs
shangyian Jul 31, 2023
d97ee66
Add ability to delete (aka deactivate) a materialization
shangyian Jul 31, 2023
0e4f53b
Add tests and fix lint
shangyian Jul 31, 2023
66da4db
Add history tracking for deleting materialization
shangyian Jul 31, 2023
00b5346
Allow creating a new node whether it used to exist or not.
agorajek Aug 1, 2023
a126929
Merge pull request #678 from shangyian/release-datajunction-server-cl…
shangyian Aug 1, 2023
57006d3
Add check for deactivated materializations when upserting a materiali…
shangyian Aug 1, 2023
a21d74d
Add history tracking for restoring materialization
shangyian Aug 1, 2023
949a5da
Merge pull request #679 from shangyian/allow-delete-materialization
shangyian Aug 1, 2023
90341e8
Don't fail validate_node_data, only report errors.
agorajek Aug 1, 2023
d961d51
Update dj.demo.db (#681)
samredai Aug 1, 2023
f84e913
Fix a bug where overriding showtraceback (for IPython interfaces) doe…
shangyian Aug 1, 2023
3efdacb
Merge pull request #683 from shangyian/fix-showtraceback-bug-jupyter
shangyian Aug 2, 2023
de3d33c
Add _create_node_from_inactive and use it in all node making calls.
agorajek Aug 1, 2023
dee297e
Merge branch 'main' into issue-674
agorajek Aug 2, 2023
b1ada6a
Merge pull request #680 from DataJunction/issue-674
agorajek Aug 2, 2023
1c74b61
Add deactivate and restore namespace endpoints
shangyian Aug 2, 2023
f3c6f6e
Add tests for namespace deactivation + restoration
shangyian Aug 2, 2023
bb57a68
Fix py38 compatibility
shangyian Aug 2, 2023
1924498
Adding more history details for propagation on the actioned namespace…
shangyian Aug 2, 2023
472ba70
Moving helper methods to a separate module
shangyian Aug 2, 2023
300e7cb
Remove
shangyian Aug 2, 2023
aed8181
Fix minor changes after rebase
shangyian Aug 2, 2023
7c32324
Renaming some parameters based on review
shangyian Aug 2, 2023
01996cb
Adding dj demo db
shangyian Aug 2, 2023
76b2386
Merge pull request #685 from shangyian/restore-deactivate-namespaces
shangyian Aug 2, 2023
922ea14
Add tags to endpoints. Restructure api/nodes.py so that we have one f…
shangyian Aug 2, 2023
732e69d
Fix lint
shangyian Aug 2, 2023
b7d49c5
Lint
shangyian Aug 2, 2023
5f1d108
Switch to not capitalizing prepositions and articles in endpoint names
shangyian Aug 2, 2023
01a1010
Merge pull request #687 from shangyian/tag-endpoints-restructure-nodes
shangyian Aug 2, 2023
6d3a98a
Add deactivating materialization to the Python client
shangyian Aug 3, 2023
4f0f881
Merge pull request #689 from shangyian/add-deactivate-materialization…
shangyian Aug 3, 2023
b2b1cee
hard delete nodes (#686)
samredai Aug 4, 2023
8980031
Python client cleanup: namespaces and test separtation.
agorajek Aug 4, 2023
335475d
Move to Doks theme and change landing image
shangyian Aug 4, 2023
46bc0de
Fix some styling
shangyian Aug 6, 2023
f67c77f
djql queries (#684)
CircArgs Aug 6, 2023
e099d75
Removing extraneous overrides
shangyian Aug 6, 2023
068f4ea
Remove
shangyian Aug 6, 2023
45b6b21
Add excalidraw shortcode
shangyian Aug 6, 2023
d00d6bf
Add back tabs
shangyian Aug 6, 2023
86b94e0
Remove extraneous styles
shangyian Aug 6, 2023
7eace1c
Move styling to _custom.scss
shangyian Aug 6, 2023
080292d
Switch back to separate styling files
shangyian Aug 7, 2023
55853c9
Switch back to separate styling files
shangyian Aug 7, 2023
9a1c725
Switch back to separate styling files
shangyian Aug 7, 2023
f9308e1
Remove extraneous assets
shangyian Aug 7, 2023
bed20f4
Remove extraneous assets
shangyian Aug 7, 2023
c79692a
Add netlify config
shangyian Aug 7, 2023
0c7d0dd
Add netlify config
shangyian Aug 7, 2023
3084b66
Fix theme choice
shangyian Aug 7, 2023
4906a23
Change deployment settings
shangyian Aug 7, 2023
3f41535
Tweak params
shangyian Aug 7, 2023
2050a8c
Disable postcss
shangyian Aug 7, 2023
cf80a00
Change collapsible sidebar
shangyian Aug 7, 2023
564ae11
Switch to svg file
shangyian Aug 7, 2023
27ac8be
Revert
shangyian Aug 7, 2023
f27153a
Fix image from svg file
shangyian Aug 7, 2023
e82dbef
Merge pull request #695 from DataJunction/issue-630
agorajek Aug 7, 2023
ba072ff
Override css
shangyian Aug 7, 2023
6796c69
Rename shortcodes to custom
shangyian Aug 7, 2023
a672863
Merge pull request #694 from shangyian/docs-updates
shangyian Aug 8, 2023
a1feb58
Adjust Python client README.
agorajek Aug 8, 2023
472b44b
Merge pull request #700 from DataJunction/issue-630
agorajek Aug 9, 2023
46532c8
Fix a bug with updating nodes.
agorajek Aug 9, 2023
3ffff1d
Fix bug where updating a metric node's query doesn't automatically ad…
shangyian Aug 9, 2023
ad72275
Merge pull request #705 from DataJunction/issue-702
agorajek Aug 10, 2023
bd9cc5b
Merge pull request #707 from shangyian/update-query-alias-bug
shangyian Aug 10, 2023
ac90a62
Support for Basic and GitHub OAuth (#698)
samredai Aug 10, 2023
4cbaa94
Fix our Python integration test.
agorajek Aug 10, 2023
ccf02fa
Merge pull request #709 from DataJunction/issue-701
agorajek Aug 10, 2023
d5d250e
Add get_data_by_query_id to server.
agorajek Aug 10, 2023
1b19001
Authentication docs (#711)
samredai Aug 11, 2023
4f1cd47
Add column-level lineage endpoint for a node
shangyian Aug 11, 2023
eb2dd3b
Fix
shangyian Aug 11, 2023
bac7d33
Merge pull request #710 from DataJunction/get_data_by_query_id
agorajek Aug 11, 2023
0ab676e
Add caching for column-level lineage
shangyian Aug 11, 2023
ff2ede3
Merge pull request #712 from shangyian/column-level-lineage
shangyian Aug 11, 2023
87d9c2c
Adding column-level lineage UI
shangyian Aug 11, 2023
8fdc2c9
Fix column displays
shangyian Aug 11, 2023
5b4ae4f
Update with unique columns
shangyian Aug 11, 2023
48d7c58
Updating docs based on new client changes
shangyian Aug 11, 2023
542b6e0
Add missing client list_* methods.
agorajek Aug 11, 2023
1371290
adding base java client with listMetrics (#703)
Geo881 Aug 12, 2023
dadc450
Add tests with more complex transforms and metrics (i.e., nested subq…
shangyian Aug 13, 2023
a50aaba
Adding the more complex transforms + metrics to the Roads notebook
shangyian Aug 13, 2023
07a2b84
Change the node lineage tab UI to work for the modified backend
shangyian Aug 13, 2023
ad283dd
Adding test for concat function
shangyian Aug 13, 2023
458c123
Add comment for creating nodes in draft mode
shangyian Aug 13, 2023
691781d
Add docs for query service
shangyian Aug 13, 2023
39cddc8
Merge pull request #714 from shangyian/update-docs-new-client
shangyian Aug 13, 2023
024ee7e
Merge pull request #715 from DataJunction/issue-630
agorajek Aug 14, 2023
2df8446
Cleanup
shangyian Aug 14, 2023
a8647e4
Merge pull request #713 from shangyian/column-level-lineage-ui
shangyian Aug 14, 2023
943e2e3
Allow for dimensions and transforms to be created without a catalog
shangyian Aug 15, 2023
429e181
Merge pull request #722 from shangyian/allow-no-catalog-nodes
shangyian Aug 15, 2023
8f6cd6e
Fix bug with building queries with struct-type columns
shangyian Aug 15, 2023
72d2bc6
Add remaining methiods for Dj admin Python client.
agorajek Aug 15, 2023
81a308a
Use columns and change struct check
shangyian Aug 15, 2023
dbe5e4b
Fix caching for lineage
shangyian Aug 16, 2023
9f4baf0
Lint
shangyian Aug 16, 2023
92e5ef9
graphql start (#723)
CircArgs Aug 16, 2023
d6f4299
Merge pull request #721 from shangyian/fix-struct-bug
shangyian Aug 16, 2023
8dc74c1
Merge pull request #719 from DataJunction/issue-630
agorajek Aug 16, 2023
66b9337
v0.0.1-rc.14
shangyian Aug 16, 2023
a46b620
Remove compile SQL for the time being
shangyian Aug 16, 2023
ad3f77f
v0.0.1-rc.15
shangyian Aug 16, 2023
edfb967
Make compiled SQL request only when user toggles the button
shangyian Aug 16, 2023
38d4463
Merge pull request #726 from shangyian/remove-compile-sql
shangyian Aug 16, 2023
d542a28
serde
CircArgs Aug 18, 2023
4ad644a
test serde
CircArgs Aug 18, 2023
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? -->
83 changes: 83 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Bump Version
on:
workflow_dispatch:
inputs:
library:
type: choice
description: Which library to bump
required: true
options:
- server
- client
- djrs
- djqs
bump:
type: choice
description: Hatch version bump rule
required: true
options:
- release
- major
- minor
- patch
- alpha
- beta
- rc
- post
- dev

jobs:
publish:
env:
PDM_DEPS: 'urllib3<2'
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
runs-on: 'ubuntu-latest'
defaults:
run:
working-directory: ${{ github.event.inputs.library == 'server' && '.' || github.event.inputs.library == 'client' && './datajunction-clients/python' || github.event.inputs.library == 'djrs' && './djrs' || github.event.inputs.library == 'djqs' && './djqs' }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: |
python -m pip install --upgrade pip
pip install hatch

- uses: pdm-project/setup-pdm@v3
name: Setup PDM
with:
python-version: ${{ matrix.python-version }}
architecture: x64
prerelease: true
enable-pep582: true

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

- name: Bump release version with hatch and commit
run: |
hatch version ${{ github.event.inputs.bump }}
export NEW_VERSION=v$(hatch version)
export LIBRARY=${{ github.event.inputs.library }}
git commit -am "Bumping $LIBRARY to version $NEW_VERSION"
git checkout -b releases/$LIBRARY-$NEW_VERSION
git push --set-upstream origin releases/$LIBRARY-$NEW_VERSION -f
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}

- name: Open a PR with the version bump
run: |
export NEW_VERSION=v$(hatch version)
export LIBRARY=${{ github.event.inputs.library }}
gh pr create -B main -H "releases/$LIBRARY-$NEW_VERSION" --title "Bumping $LIBRARY to version $NEW_VERSION" --body "This is an automated PR triggered by the Bump Version action. Merging this PR will bump the DataJunction $LIBRARY to version $NEW_VERSION"
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/client-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 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.8', '3.9', '3.10']
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
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: 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: 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: 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.8', '3.9', '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