Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2826 commits
Select commit Hold shift + click to select a range
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
242a06b
Run UI linters (prettier + lint)
shangyian Oct 22, 2024
6bbd5c2
Update browserslist
shangyian Oct 22, 2024
8730803
Add lint and prettier to the commands run as a part of CI
shangyian Oct 22, 2024
094300d
Merge pull request #1211 from shangyian/ui-lint-update
shangyian Oct 25, 2024
cdcd5c9
Add a dictionary of links to AvailabilityState.
agorajek Oct 24, 2024
4b68b40
Merge pull request #1214 from DataJunction/DJ-41
agorajek Oct 25, 2024
ad08c10
Add indexes on history and node tables
shangyian Oct 10, 2024
48330b3
Rename database migration
shangyian Oct 10, 2024
4985b5e
Add separate GQL query for paginated findNode
shangyian Oct 10, 2024
a5a5ed5
Add database setup for searching by cursor
shangyian Oct 10, 2024
4ba2709
Add graphql pagination support
shangyian Oct 11, 2024
43412a6
Set up pagination according to relay spec, with reusable classes for …
shangyian Oct 12, 2024
78d8683
Fix lint
shangyian Oct 12, 2024
f4e12ec
Move Connection, Edge etc to graphql scalars
shangyian Oct 12, 2024
8980deb
Cleanup
shangyian Oct 12, 2024
7cc9064
Migrate DJ UI to use paginated GQL endpoint
shangyian Oct 12, 2024
df3296e
Remove comments
shangyian Oct 16, 2024
78024e9
Add tests
shangyian Oct 16, 2024
9c65eda
Update GQL pagination logic
shangyian Oct 19, 2024
9cf4465
Add additional tests
shangyian Oct 21, 2024
aaf0752
Update UI for forward and backward pagination
shangyian Oct 21, 2024
348115a
Fix lint
shangyian Oct 21, 2024
bbf7b6a
Add new test for node cursor
shangyian Oct 21, 2024
208b03d
Fix ui tests
shangyian Oct 22, 2024
11ad915
Default to no selection in edited by
shangyian Oct 22, 2024
3f7e90e
Add tests for UI changes
shangyian Oct 22, 2024
016da62
Add coverage
shangyian Oct 22, 2024
4201bde
v0.0.1-a70.dev1
shangyian Oct 23, 2024
45e9f33
Set the default graphql url to depend on the primary server
shangyian Oct 26, 2024
ec6ff8d
Run prettier
shangyian Oct 26, 2024
e80752b
Reset version
shangyian Oct 26, 2024
2138192
Add support for dimension join links that use cross join as the join …
shangyian Sep 26, 2024
29903e9
Add test for cross join dimension link
shangyian Sep 26, 2024
880103c
Add test for sql for cross join dims
shangyian Oct 26, 2024
fa82853
Update alembic migration to be after last change
shangyian Oct 26, 2024
64356e8
Merge pull request #1179 from shangyian/cross-join-dim-links
shangyian Oct 26, 2024
5238e3d
Merge pull request #1203 from shangyian/pagination
shangyian Oct 26, 2024
bbb810a
Bumping DJ to version 0.0.1a71
Oct 21, 2024
e735551
Merge pull request #1207 from DataJunction/releases/version-0.0.1a71
shangyian Oct 26, 2024
6c368eb
Fix bug when pagination logic processes an empty list
shangyian Oct 26, 2024
370e63a
Merge pull request #1215 from shangyian/pagination-empty-list
shangyian Oct 30, 2024
90794c7
Allow both create and edit node pages to have a namespace navigation …
shangyian Oct 28, 2024
4788962
Fix tests
shangyian Oct 30, 2024
e7a1e21
Fix lint
shangyian Oct 30, 2024
af7fc4e
Remove obsolete snapshots
shangyian Oct 30, 2024
bbaa8f0
Merge pull request #1217 from shangyian/add-edit-namespace-nav
shangyian Oct 30, 2024
e01aa5d
Bumping DJ to version 0.0.1a72
Oct 28, 2024
9509556
Merge pull request #1216 from DataJunction/releases/version-0.0.1a72
shangyian Oct 31, 2024
b91915f
Fix a bug with updating existing materialization.
agorajek Oct 31, 2024
4b91d47
Merge pull request #1218 from DataJunction/DJ-41
agorajek Nov 1, 2024
e27d40f
Bumping DJ to version 0.0.1a73
Nov 4, 2024
42ac867
Merge pull request #1219 from DataJunction/releases/version-0.0.1a73
agorajek Nov 4, 2024
f5d7921
Python client dataclasses should be hydrated properly when converting…
shangyian Nov 6, 2024
77cea50
Add additional tests for client model dataclass hydration
shangyian Nov 6, 2024
f99b98b
Fix tests
shangyian Nov 6, 2024
40d3492
Clean
shangyian Nov 6, 2024
dbe2706
Cleanup
shangyian Nov 6, 2024
7137f6c
Add additional tests for serializable mixin
shangyian Nov 6, 2024
eeec300
Fix lint
shangyian Nov 6, 2024
62a9068
Fix tests
shangyian Nov 6, 2024
510b1b7
Merge pull request #1221 from shangyian/client-dataclass
shangyian Nov 6, 2024
b4ebfe8
Bumping DJ to version 0.0.1a74
Nov 6, 2024
318f79d
Merge pull request #1222 from DataJunction/releases/version-0.0.1a74
shangyian Nov 6, 2024
8eccb9e
Add get_notifier dependency
samredai Nov 14, 2024
52baafc
Fix a typo in the notification docs
samredai Nov 18, 2024
d5dbe40
Add dependency override example
samredai Nov 18, 2024
bda2249
Change notify dependency to use History instances
samredai Nov 18, 2024
66aa808
Merge pull request #1225 from samredai/notifications
samredai Nov 18, 2024
f2786ab
Notify when an availability is posted
samredai Nov 21, 2024
f520042
Better input validation on get_sql_for_metrics().
agorajek Nov 22, 2024
e564894
Merge pull request #1228 from samredai/notify-availability
samredai Nov 22, 2024
047dd3d
Merge pull request #1227 from DataJunction/issue/1226
agorajek Nov 25, 2024
ac01077
Add support for different types of dimension links via YAML.
shangyian Nov 27, 2024
dc12796
Add tests for reference links and complex dim links
shangyian Nov 27, 2024
0290981
Add tests for metric metadata and required dimensions
shangyian Nov 27, 2024
eef0f23
Clean up
shangyian Nov 28, 2024
ae455b9
Fix
shangyian Nov 28, 2024
961b193
Add docs on YAML definitions
shangyian Nov 28, 2024
a97474c
Add additional docs
shangyian Nov 28, 2024
95daca1
Cleanup
shangyian Nov 28, 2024
ad5ffe6
Remove query from cube nodes
shangyian Nov 28, 2024
ed2d8c1
Merge pull request #1230 from shangyian/yaml-dimension-links
shangyian Dec 2, 2024
2d56990
When requesting metrics SQL, respect the desired engine
shangyian Nov 28, 2024
8d1b618
Fix tests
shangyian Nov 28, 2024
05adbe6
Cleanup
shangyian Nov 28, 2024
2ec0f08
Fix the node history UI when it displays certain event types
shangyian Nov 28, 2024
a09d826
Fix revision diffs for columns
shangyian Nov 28, 2024
e9c0ad7
Fix tests
shangyian Nov 28, 2024
690a289
Merge pull request #1232 from shangyian/fix-history-ui
shangyian Dec 2, 2024
65bb2fe
Merge pull request #1231 from shangyian/respect-engine
shangyian Dec 2, 2024
6e7b6cc
Bumping DJ to version 0.0.1a75
Dec 3, 2024
9c43133
Add build skip for __about__.py version changes
shangyian Dec 3, 2024
66adfa4
Merge pull request #1236 from DataJunction/releases/version-0.0.1a75
shangyian Dec 3, 2024
f24e578
Add the ability to extract measures from a metric definition and gene…
shangyian Nov 29, 2024
1489c5f
Add tests for measure extraction and derived sql generation
shangyian Nov 29, 2024
c0603ac
Add aggregation rule metadata to measures
shangyian Dec 2, 2024
d31116b
Use enum values for all set quantifiers
shangyian Dec 3, 2024
5d72f51
Add clearer comments on the limited aggregability type
shangyian Dec 3, 2024
cb83827
Add check to make sure the decomposed functions are only aggregate fu…
shangyian Dec 3, 2024
4860eef
Fix coverage
shangyian Dec 3, 2024
08a1a42
Fix
shangyian Dec 3, 2024
95e607a
Merge pull request #1234 from shangyian/decompose-metrics
shangyian Dec 3, 2024
3836afa
Bumping DJ to version 0.0.1a76
Dec 4, 2024
56f0508
Merge pull request #1237 from DataJunction/releases/version-0.0.1a76
shangyian Dec 4, 2024
68d4652
Only refresh SQLAlchemy ORM objects when needed
shangyian Dec 4, 2024
3c385e1
Fix access
shangyian Dec 4, 2024
167d630
Fix ordering
shangyian Dec 4, 2024
9ccb208
Revert
shangyian Dec 4, 2024
06f4645
Add caching for antlr parser calls of the same query
shangyian Dec 4, 2024
aadd189
Fix parser
shangyian Dec 4, 2024
c19b3a5
Merge pull request #1238 from shangyian/lazy-orm-refresh
shangyian Dec 5, 2024
76adaa3
Bumping DJ to version 0.0.1a77
Dec 5, 2024
3b69e5f
Merge pull request #1239 from DataJunction/releases/version-0.0.1a77
shangyian Dec 5, 2024
c5d1d0e
Add 'hidden' as a column attribute type
anhl-svg Dec 6, 2024
6a81fc7
Merge pull request #1240 from DataJunction/add-hidden-attribute
shangyian Dec 6, 2024
68d15cc
Add measures metadata for metrics to GraphQL
shangyian Dec 6, 2024
57aa514
Fix linters
shangyian Dec 6, 2024
d749487
Use automatic pydantic model to strawberry type converter instead of …
shangyian Dec 6, 2024
54043a0
Use automatic pydantic model to strawberry type converter instead of …
shangyian Dec 6, 2024
743a4f5
Add test for measures in GQL
shangyian Dec 6, 2024
affbcb1
Fix lint
shangyian Dec 6, 2024
a497913
Coverage
shangyian Dec 6, 2024
b29b502
Populate separate derived_query and derived_expression fields
shangyian Dec 7, 2024
d7ce96f
Merge pull request #1241 from shangyian/gql-measures
shangyian Dec 7, 2024
88b5ce2
generate measures sql with derived aggregable measures
shangyian Dec 6, 2024
9f9df77
Refactor slightly to only support when preagg requested
shangyian Dec 6, 2024
1fa1c7a
Fix
shangyian Dec 6, 2024
e5940c4
Remove unnecessary param cast_timestamp_to_ms
shangyian Dec 8, 2024
6251caa
Refactor measures extractor to operate with initialized query and cac…
shangyian Dec 9, 2024
744e3ad
Add support for generating measures SQL pre-aggregated to the request…
shangyian Dec 9, 2024
31c1676
Cleanup
shangyian Dec 9, 2024
d0f340a
Fix lint
shangyian Dec 9, 2024
a0fd4ce
Fix tests
shangyian Dec 10, 2024
431041c
Fix coverage
shangyian Dec 10, 2024
539bd9a
Fix coverage
shangyian Dec 10, 2024
d4c94fd
YAML deploy needs to handle dimension link deletion for all links not…
shangyian Dec 10, 2024
a0c0f3a
Fix tests
shangyian Dec 11, 2024
18cff7b
Merge pull request #1249 from shangyian/yaml-dim-link-deletion
shangyian Dec 11, 2024
c73f83a
Merge pull request #1242 from shangyian/measures-sql-from-derived
shangyian Dec 12, 2024
c521970
Add tests for yaml ref and join link deletion
shangyian Dec 12, 2024
64f1b54
Fix YAML export to use new dimension link structure
shangyian Dec 12, 2024
1c7e253
Fix pulling
shangyian Dec 12, 2024
35d966e
Merge pull request #1250 from shangyian/yaml-dim-link-deletion
shangyian Dec 12, 2024
3522e15
Bumping DJ to version 0.0.1a78
Dec 9, 2024
86d4326
Merge pull request #1245 from DataJunction/releases/version-0.0.1a78
shangyian Dec 12, 2024
b87b17e
support using reference links on dimension nodes in sql building
shangyian Dec 10, 2024
313b9d5
Fix
shangyian Dec 10, 2024
1f1d0c8
Remove dimensions validation check for sql building
shangyian Dec 10, 2024
b9f2d2a
Remove dimensions validation check for sql building
shangyian Dec 10, 2024
8c93e95
Remove print
shangyian Dec 10, 2024
43a1b98
Add test and fix issues with handling reference dim links
shangyian Dec 10, 2024
9a04642
Add reference link detection to dimensions dag
shangyian Dec 13, 2024
4b5245d
Add comments
shangyian Dec 13, 2024
b1b6fb4
Add comments lint
shangyian Dec 13, 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