Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
266 commits
Select commit Hold shift + click to select a range
bfc1a5a
fixed error with frame
yousefh409 Sep 8, 2022
2aad210
add mapping algorithm
YongmingFrankGe Sep 15, 2022
128c452
Ck/generate video (#163)
chanwutk Sep 14, 2022
51a7d30
Merge branch 'dev' into optimized_ingestion
chanwutk Sep 16, 2022
56de6db
update poetry.lock
chanwutk Sep 16, 2022
6be3c01
In View Filter Updated (#168)
yousefh409 Sep 21, 2022
4d8e4bc
Rework Pipeline (#161)
chanwutk Sep 21, 2022
72bc953
update monodepth
chanwutk Sep 21, 2022
6ca83e8
style: [CI] format
Sep 21, 2022
741bf52
update in_view: execute a single db query
chanwutk Sep 22, 2022
859f795
style: [CI] format
Sep 22, 2022
e7d0a39
Stopped Filter (#169)
yousefh409 Sep 22, 2022
eda4d0c
Fix 2d detection (#170)
chanwutk Sep 23, 2022
b0ac3df
Merge branch 'dev' into optimized_ingestion
chanwutk Sep 24, 2022
5cc6a3e
remove mono_depth_estimator
chanwutk Sep 24, 2022
ed0345b
Merge branch 'dev' into optimized_ingestion
chanwutk Sep 24, 2022
9b6c68a
update generate video
chanwutk Sep 24, 2022
11c403a
fix stop filter
chanwutk Sep 24, 2022
92de63a
fix test (#173)
chanwutk Sep 26, 2022
646d2f1
column metadata (#174)
chanwutk Sep 27, 2022
1dfed92
fixed problem with in view filter (#176)
yousefh409 Sep 27, 2022
aa6135e
fix inview (#177)
chanwutk Sep 27, 2022
6956adb
Update README.md
chanwutk Sep 27, 2022
c095b77
add segment mapping
YongmingFrankGe Oct 2, 2022
8c35aa6
add typing
YongmingFrankGe Oct 2, 2022
982ff61
add file doc string
YongmingFrankGe Oct 2, 2022
040aaa1
ignore output
chanwutk Oct 3, 2022
a6a76ff
fix generate video
chanwutk Oct 3, 2022
f5b874c
style: [CI] cleanup python notebooks
Oct 3, 2022
136ebf2
remove unused notebooks
chanwutk Oct 5, 2022
4ecc88e
Merge branch 'dev' into optimized_ingestion
chanwutk Oct 5, 2022
1795e74
add segment heading in the returned segment info
YongmingFrankGe Oct 6, 2022
7a71003
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
YongmingFrankGe Oct 6, 2022
8e366c7
Calculate Depth from geo-spatial information (#181)
chanwutk Oct 21, 2022
dba87dc
Estimate objects' depth with geo-spatial metadata (#183)
chanwutk Nov 15, 2022
db71a42
add conda environment
chanwutk Jan 12, 2023
feae478
Merge Detection Estimation module (#185)
YongmingFrankGe Feb 21, 2023
89a31b2
Segment Trajectory with and without DetectionInfo (#205) (#209)
chanwutk Feb 22, 2023
9975b79
fix lint error
chanwutk Feb 22, 2023
c3b10e0
Ingest road network with location (#210)
chanwutk Feb 26, 2023
e7dfbbb
allow empty segmentline (#211)
chanwutk Feb 26, 2023
e74841c
Ingest road with city name (#212)
chanwutk Feb 27, 2023
74de3d7
fix query bug
chanwutk Feb 27, 2023
11db400
style: [CI] cleanup python notebooks
Feb 27, 2023
2f5ee74
Add segmenttype to mapping (#213)
YongmingFrankGe Mar 5, 2023
8090d42
creating both versions of the headingAtTimestamp function (#214)
yousefh409 Mar 12, 2023
75beda6
update road ingest
chanwutk Mar 12, 2023
9e6ba27
style: [CI] cleanup python notebooks
Mar 12, 2023
c233e12
update segment-tracking-results
chanwutk Mar 12, 2023
8f97536
style: [CI] cleanup python notebooks
Mar 12, 2023
79066c6
Fig13 end to end (#216)
YongmingFrankGe Mar 14, 2023
39e3a88
Fix query analyzer (#217)
YongmingFrankGe Mar 14, 2023
ae29b0e
Benchmark Baseline (#215)
chanwutk Mar 31, 2023
9bd2aee
fix tests
chanwutk Apr 2, 2023
2d6d574
Fix detection estimation (#222)
YongmingFrankGe Apr 4, 2023
1749755
Rewrite InView filter (#223)
chanwutk Apr 4, 2023
67bb46e
benchmark In-View filter
chanwutk Apr 5, 2023
e95d482
style: [CI] format
Apr 5, 2023
851eb30
style: [CI] cleanup python notebooks
Apr 5, 2023
b57025c
Ablation Benchmark (#224)
chanwutk Apr 6, 2023
6a2fd33
add video sampling order for evaluation
chanwutk Apr 10, 2023
2c950b9
Loosen segment mapping constraint (#226)
YongmingFrankGe Apr 19, 2023
9650c67
Speed-up Segment Mapping (#227)
chanwutk Apr 24, 2023
2394988
Ck/ablation benchmark 2 (#225)
chanwutk Apr 24, 2023
295ca10
use pre-commit
chanwutk Apr 27, 2023
41dcc7f
use profile for isort
chanwutk Apr 27, 2023
6c85122
fix isort config
chanwutk Apr 27, 2023
37db4f3
style: [CI] format
Apr 27, 2023
9c635c2
Ck/lint (#230)
chanwutk Apr 27, 2023
c53463b
Ablation #car (#231)
chanwutk Apr 28, 2023
f3c552a
Benchmark StrongSORT on # of frame skipped (#232)
chanwutk May 1, 2023
4eb2317
Benchmark StrongSORT skipping (#234)
chanwutk May 5, 2023
4becb30
update yolo_tracker
chanwutk May 5, 2023
06a621e
update strongsort
chanwutk May 5, 2023
204f46f
update strongsort
chanwutk May 9, 2023
a678016
strongsort update: tracks remember detection ids
chanwutk May 10, 2023
f112403
update notebooks
chanwutk May 13, 2023
9d6dfc3
update flake8
chanwutk May 13, 2023
36935fb
Fix bugs with improvement of segment mapping (#233)
YongmingFrankGe May 13, 2023
4b34f6c
update report_progress
chanwutk May 16, 2023
9900c31
remove run
chanwutk May 16, 2023
bf83870
Fix tracking_2d.strongsort (#235)
chanwutk May 25, 2023
73ae9bf
optimize mapping
chanwutk Jun 4, 2023
70e5b78
fix strongsort benchmark result
chanwutk Jun 4, 2023
37d431d
update ingest_road cli
chanwutk Jun 4, 2023
7017763
style: [CI] format
Jun 4, 2023
99962c8
update dependencies
chanwutk Jun 15, 2023
e575404
fix 3D estimator (#236)
chanwutk Jun 15, 2023
fcb68b7
Update README.md
chanwutk Jun 15, 2023
f9dff6c
Validate Tracking (#237)
chanwutk Jun 17, 2023
c8d767a
constraint on the objects we support (#238)
YongmingFrankGe Jun 18, 2023
548d931
Query Analyzer for InView (#239)
chanwutk Jun 26, 2023
3464aae
Road network object (#240)
chanwutk Jun 26, 2023
15a037a
run-all
chanwutk Jul 5, 2023
69b2028
update run-ablation
chanwutk Jul 11, 2023
318c3f4
update eval
chanwutk Jul 11, 2023
0ede0c3
update eval
chanwutk Jul 11, 2023
d1be79c
update ablation
chanwutk Jul 11, 2023
56be0a5
update ablation
chanwutk Jul 11, 2023
f3e9509
style: [CI] cleanup python notebooks
Jul 11, 2023
547254b
update ablation
chanwutk Jul 11, 2023
99638bb
prevent shutdown
chanwutk Jul 11, 2023
3145550
update ablation
chanwutk Jul 11, 2023
86ee454
runablation
chanwutk Jul 11, 2023
d474c76
run-ablation
chanwutk Jul 11, 2023
f4bb95f
fix query
chanwutk Jul 12, 2023
acdbe4c
update run-ablation
chanwutk Jul 12, 2023
f751a95
style: [CI] generate video examples
Jul 12, 2023
60bd2a8
style: [CI] generate video examples
Jul 12, 2023
97eddb4
style: [CI] generate video examples
Jul 12, 2023
70f7a08
style: [CI] generate video examples
Jul 12, 2023
06ee9fe
update run-ablation
chanwutk Jul 12, 2023
d15d356
run-ablation
chanwutk Jul 12, 2023
0284080
random test list
chanwutk Jul 12, 2023
0949cee
create folder
chanwutk Jul 12, 2023
a1034ad
update
chanwutk Jul 12, 2023
c551189
update ablation
chanwutk Jul 13, 2023
33a6d3d
run ablation
chanwutk Jul 13, 2023
6a6c6b2
update ablation
chanwutk Jul 13, 2023
22b1c19
only de
chanwutk Jul 14, 2023
72e0644
adjust threshold
chanwutk Jul 14, 2023
422fd14
fix bugs
chanwutk Jul 14, 2023
1036dd2
fix bug
chanwutk Jul 14, 2023
efd5414
include scenes from mini in the beginning of samples
chanwutk Jul 15, 2023
1efcdfa
style: [CI] generate video examples
Jul 15, 2023
6495d98
style: [CI] generate video examples
Jul 15, 2023
f8612f0
update ablation
chanwutk Jul 15, 2023
2cc55c3
fix inview
chanwutk Jul 16, 2023
6271c42
fix get segment lines (#241)
YongmingFrankGe Jul 16, 2023
84dfd40
fix callnode
chanwutk Jul 16, 2023
24ad2a2
fix test
chanwutk Jul 16, 2023
8538950
fix test
chanwutk Jul 16, 2023
6954a3d
update ip
chanwutk Jul 17, 2023
3aa2634
optimize segment mapping query
chanwutk Jul 18, 2023
ffd3711
fix
chanwutk Jul 18, 2023
135b04c
update run ablation
chanwutk Jul 18, 2023
4bbacfd
fix
chanwutk Jul 18, 2023
8b0157c
fix
chanwutk Jul 18, 2023
e1efff1
fix
chanwutk Jul 18, 2023
f104bab
fix
chanwutk Jul 18, 2023
682357d
style: [CI] generate video examples
Jul 18, 2023
7f5efd5
style: [CI] generate video examples
Jul 18, 2023
8e356b3
fix
chanwutk Jul 18, 2023
c2e4206
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 18, 2023
a041a1c
fix
chanwutk Jul 18, 2023
7bedb5f
test ss
chanwutk Jul 18, 2023
0816075
update ablation
chanwutk Jul 19, 2023
421b904
style: [CI] generate video examples
Jul 19, 2023
b9a99a2
update ablation
chanwutk Jul 19, 2023
6136128
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 19, 2023
cf04dff
style: [CI] generate video examples
Jul 19, 2023
b97d4dc
add predicate
chanwutk Jul 20, 2023
d1f4d5b
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 20, 2023
b5f7c26
style: [CI] format
Jul 20, 2023
747075f
update
chanwutk Jul 20, 2023
7d121b0
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 20, 2023
72b01e3
style: [CI] generate video examples
Jul 20, 2023
e24b992
style: [CI] generate video examples
Jul 20, 2023
a770535
update
chanwutk Jul 20, 2023
d404f87
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 20, 2023
7cb0d2b
style: [CI] generate video examples
Jul 20, 2023
fb46059
add view to de
chanwutk Jul 20, 2023
475235b
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 20, 2023
2e77620
style: [CI] generate video examples
Jul 20, 2023
399ed02
fix
chanwutk Jul 20, 2023
53ea1b2
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 20, 2023
836390e
update query
chanwutk Jul 20, 2023
ae8c342
style: [CI] generate video examples
Jul 20, 2023
ac9326c
style: [CI] generate video examples
Jul 20, 2023
38e00e4
style: [CI] generate video examples
Jul 20, 2023
540fc37
update
chanwutk Jul 21, 2023
6ae6f0e
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 21, 2023
64486b1
.
chanwutk Jul 21, 2023
43f57ad
fix de
chanwutk Jul 21, 2023
15fdacc
revert to original sampling list
chanwutk Jul 21, 2023
2db851e
style: [CI] generate video examples
Jul 21, 2023
6091782
style: [CI] generate video examples
Jul 21, 2023
089ca9f
style: [CI] generate video examples
Jul 21, 2023
b1c2281
fix inview bug
chanwutk Jul 21, 2023
39c2d61
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Jul 21, 2023
18e8507
runall
chanwutk Jul 21, 2023
8b0689d
fix
chanwutk Jul 21, 2023
ae8033d
style: [CI] generate video examples
Jul 21, 2023
f42b25e
style: [CI] generate video examples
Jul 21, 2023
07ac7a1
dont use segment mapping
chanwutk Jul 25, 2023
69826dd
New implementation for sample plans (#243)
YongmingFrankGe Jul 25, 2023
0dd19bc
Merge branch 'optimized_ingestion' into ck/ablation-query
chanwutk Jul 25, 2023
364535e
style: [CI] generate video examples
Jul 25, 2023
f23f54f
style: [CI] generate video examples
Jul 25, 2023
7ca8e74
Understand the new Detection Estimation (#244)
chanwutk Jul 26, 2023
598e7d6
Merge branch 'optimized_ingestion' into ck/ablation-query
chanwutk Jul 26, 2023
6cb7229
style: [CI] generate video examples
Jul 26, 2023
ee92856
style: [CI] generate video examples
Jul 26, 2023
ba30d5b
style: [CI] generate video examples
Jul 26, 2023
83b9030
print warning
chanwutk Jul 26, 2023
b1bee65
update run-ablation
chanwutk Jul 26, 2023
688e890
filter warning
chanwutk Jul 26, 2023
4f29f39
style: [CI] generate video examples
Jul 26, 2023
853701e
fix when segment line's lenght is 0 for prjection
chanwutk Jul 26, 2023
e25e0f3
style: [CI] generate video examples
Jul 26, 2023
1778360
Merge branch 'ck/ablation-query' of github.com:apperception-db/apperc…
chanwutk Jul 26, 2023
0263f59
update ablation
chanwutk Jul 26, 2023
a924f77
update ablation
chanwutk Jul 26, 2023
8c1158b
update
chanwutk Jul 26, 2023
9f2f5a6
Merge branch 'ck/ablation-query' into optimized_ingestion
chanwutk Jul 26, 2023
8fb1418
style: [CI] generate video examples
Jul 26, 2023
e9a232a
update max skip
chanwutk Jul 27, 2023
f889c9e
Objects show up or disappear based on change of # of detections (#245)
YongmingFrankGe Jul 27, 2023
e45c9d2
update
chanwutk Jul 27, 2023
396f3b1
Merge branch 'optimized_ingestion' into ck/ablation-query
chanwutk Jul 27, 2023
337aac1
optimize de
chanwutk Jul 27, 2023
75f964d
.
chanwutk Jul 27, 2023
df043e9
convert
chanwutk Jul 27, 2023
b09d1b7
fix
chanwutk Jul 27, 2023
3f2edf6
update ablation
chanwutk Jul 27, 2023
2b1f8fb
convert
chanwutk Jul 27, 2023
8dcbb2b
update
chanwutk Jul 28, 2023
a302bf5
dont shutdown
chanwutk Jul 28, 2023
c672ff2
update
chanwutk Jul 28, 2023
7c8dfb0
fix redundant segment mapping
chanwutk Jul 28, 2023
e5f2ed8
fix
chanwutk Jul 28, 2023
67c295a
front camera
chanwutk Jul 28, 2023
66b005c
fix sql
chanwutk Jul 28, 2023
ffcc063
fix sql
chanwutk Jul 28, 2023
3c3bbc9
update benchmark
chanwutk Jul 28, 2023
903a404
style: [CI] generate video examples
Jul 28, 2023
1adad6e
style: [CI] generate video examples
Jul 28, 2023
1b50587
benchmark segment mapping time
chanwutk Jul 29, 2023
4b357e5
Merge branch 'ck/ablation-query' of github.com:apperception-db/apperc…
chanwutk Jul 29, 2023
4a56355
.
chanwutk Jul 29, 2023
b18dc55
fix
chanwutk Jul 29, 2023
0491ad0
fix
chanwutk Jul 29, 2023
60fc9c9
fix
chanwutk Jul 29, 2023
2093cd8
.
chanwutk Jul 29, 2023
9c88399
Skip if exits intersection (#246)
YongmingFrankGe Jul 29, 2023
dd38061
Merge branch 'optimized_ingestion' into ck/ablation-query
chanwutk Jul 29, 2023
9c007d3
update
chanwutk Jul 29, 2023
195c172
style: [CI] generate video examples
Jul 29, 2023
7c08c9a
style: [CI] generate video examples
Jul 29, 2023
f4b885f
convert
chanwutk Jul 29, 2023
69d10db
Merge branch 'ck/ablation-query' of github.com:apperception-db/apperc…
chanwutk Jul 29, 2023
aaacd02
run everything
chanwutk Jul 30, 2023
4c24335
run all
chanwutk Jul 30, 2023
2cd3f17
run small
chanwutk Jul 30, 2023
744e833
update
chanwutk Jul 30, 2023
04b6688
update
chanwutk Jul 30, 2023
5d67ed1
style: [CI] generate video examples
Jul 30, 2023
f9c50dd
style: [CI] generate video examples
Jul 30, 2023
19e731d
Ck/ablation query (#249)
chanwutk Aug 6, 2023
2673817
Merge branch 'optimized_ingestion' of github.com:apperception-db/appe…
chanwutk Aug 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mamba activate apperception
1 change: 1 addition & 0 deletions .env.leave
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mamba deactivate
11 changes: 6 additions & 5 deletions .github/workflows/clean-up-and-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
pip install --upgrade pip
pip install nbconvert
python -m jupyter nbconvert --clear-output --inplace benchmarks/**/*.ipynb benchmarks/*.ipynb
python -m jupyter nbconvert --clear-output --inplace nb-scripts/**/*.ipynb nb-scripts/*.ipynb
python -m jupyter nbconvert --clear-output --inplace scripts/**/*.ipynb scripts/*.ipynb
python -m jupyter nbconvert --clear-output --inplace playground/**/*.ipynb playground/*.ipynb

- name: Commit clean up changes
run: ./scripts/commit-and-push.sh "[CI] cleanup python notebooks"
Expand All @@ -48,20 +49,20 @@ jobs:
pip install autoflake autopep8 black isort flake8

- name: Fix lint with autoflake
run: python -m autoflake --recursive --in-place --remove-all-unused-imports --ignore-init-module-imports --expand-star-imports apperception
run: python -m autoflake apperception optimized_ingestion

- name: Fix lint with autopep8
run: python -m autopep8 --verbose --recursive --in-place --aggressive --aggressive apperception
run: python -m autopep8 apperception optimized_ingestion

- name: Format with black
run: python -m black --config pyproject.toml apperception

- name: Sort imports with isort
run: python -m isort apperception
run: python -m isort apperception optimized_ingestion

- name: Commit formatted changes
run: ./scripts/commit-and-push.sh "[CI] format"

- name: Analyze the code with flake8
if: always()
run: python -m flake8 apperception
run: python -m flake8 apperception optimized_ingestion --statistics
82 changes: 82 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Generate Videos
on:
push:

jobs:
generate-videos:
name: Generate Videos
runs-on: ubuntu-latest
services:
mobilitydb:
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}
submodules: recursive

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
init-shell: none
cache-downloads: true

- name: Check Python Versions
shell: micromamba-shell {0}
run: |
python --version
python3 --version
which python
which python3
which pip
which pip3
which poetry

- name: Install Dependencies
shell: micromamba-shell {0}
run: poetry install --no-interaction --without dev --with test

- name: Install lap (Hack)
shell: micromamba-shell {0}
run: |
pip install --upgrade pip
pip install lap

- name: Check Installed Packages
shell: micromamba-shell {0}
run: pip list

- name: Extend MobilityDB with User-Defined functions
shell: micromamba-shell {0}
run: |
pushd pg_extender
mv install.sql install.sql.bak
python ../scripts/generate_pg_extender.py
cat install.sql
psql -h localhost -p 25432 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;"
mv install.sql.bak install.sql
popd
env:
PGPASSWORD: docker

- name: Ingest data
shell: micromamba-shell {0}
run: python ./scripts/ingest_road.py
env:
AP_PORT: 25432

- name: Generate Image data
shell: micromamba-shell {0}
run: python examples/inference_pipeline.py

- name: Commit generated examples
run: ./scripts/commit-and-push-if-latest.sh "[CI] generate video examples"
84 changes: 84 additions & 0 deletions .github/workflows/test-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Test Pipeline
on:
push:

jobs:
test-pipeline:
name: Test Pipeline
runs-on: ubuntu-latest
services:
mobilitydb:
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25440:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}
submodules: recursive

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
init-shell: none
cache-downloads: true

- name: Check Python Versions
shell: micromamba-shell {0}
run: |
python --version
python3 --version
which python
which python3
which pip
which pip3
which poetry

- name: Install Dependencies
shell: micromamba-shell {0}
run: poetry install --no-interaction --without dev --with test

- name: Install lap (Hack)
shell: micromamba-shell {0}
run: |
pip install --upgrade pip
pip install lap

- name: Check Installed Packages
shell: micromamba-shell {0}
run: pip list

- name: Extend MobilityDB with User-Defined functions
shell: micromamba-shell {0}
run: |
pushd pg_extender
python ../scripts/generate_pg_extender.py
cat install.sql
psql -h localhost -p 25440 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;"
popd
env:
PGPASSWORD: docker

- name: Ingest data
shell: micromamba-shell {0}
run: |
python ./scripts/ingest_road.py
env:
AP_PORT: 25440

- name: Generate Image data
shell: micromamba-shell {0}
run: python scripts/fake-images.py

- name: Unit Test
shell: micromamba-shell {0}
run: pytest tests-pipeline
env:
AP_PORT: 25440
119 changes: 64 additions & 55 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,122 +6,131 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
services:
mobilitydb:
image: mobilitydb/mobilitydb:latest
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25432:5432
- 25440:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mobilitydb-road:
image: mobilitydb/mobilitydb:latest
mobilitydb-road-1:
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25433:5432
- 25441:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mobilitydb-road-2:
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25442:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mobilitydb-reset:
image: mobilitydb/mobilitydb:latest
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25434:5432
- 25443:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mobilitydb-import:
image: mobilitydb/mobilitydb:latest
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25435:5432
- 25444:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mobilitydb-sql:
image: mobilitydb/mobilitydb:latest
image: mobilitydb/mobilitydb:14-3.2-1
ports:
- 25436:5432
- 25445:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
init-shell: none
cache-downloads: true

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

# - name: Cache Poetry virtualenv
# uses: actions/cache@v3
# id: cached-poetry-dependencies
# with:
# path: .venv
# key: poetry-venv-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Check Python Versions
shell: micromamba-shell {0}
run: |
python --version
python3 --version
which python
which python3
which pip
which pip3
which poetry

- name: Install Dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction

- name: Check Python Version
run: poetry run python --version
shell: micromamba-shell {0}
run: poetry install --no-interaction --without dev,cv --with test

- name: Check Installed Packages
run: poetry run pip list
shell: micromamba-shell {0}
run: pip list

- name: Extend MobilityDB with User-Defined functions
shell: micromamba-shell {0}
run: |
pushd pg_extender
psql -h localhost -p 25432 -d mobilitydb -U docker -c "\i install.sql;"
psql -h localhost -p 25433 -d mobilitydb -U docker -c "\i install.sql;"
psql -h localhost -p 25434 -d mobilitydb -U docker -c "\i install.sql;"
psql -h localhost -p 25435 -d mobilitydb -U docker -c "\i install.sql;"
psql -h localhost -p 25436 -d mobilitydb -U docker -c "\i install.sql;"
python ../scripts/generate_pg_extender.py
cat install.sql
psql -h localhost -p 25440 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;"
psql -h localhost -p 25441 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;"
psql -h localhost -p 25442 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;"
psql -h localhost -p 25443 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;"
psql -h localhost -p 25444 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;"
popd
env:
PGPASSWORD: docker

- name: Ingest data
shell: micromamba-shell {0}
run: |
poetry run python -c "from apperception.utils import import_tables; from apperception.database import database; import_tables(database, './data/scenic/database')"
poetry run python -c "from apperception.utils import ingest_road; from apperception.database import database; ingest_road(database, './data/scenic/road_network_boston')"
poetry run jupyter nbconvert --execute --to notebook ./nb-scripts/optimized-scenic/add_attributes.ipynb
poetry run jupyter nbconvert --execute --to notebook ./nb-scripts/optimized-scenic/index_segment.ipynb
python ./scripts/ingest_road.py
python ./scripts/import_tables.py
jupyter nbconvert --execute --to notebook ./scripts/optimized-scenic/add_attributes.ipynb
env:
AP_PORT: 25432
AP_PORT: 25440

- name: Generate Image data
run: |
poetry run python scripts/fake-images.py
shell: micromamba-shell {0}
run: python scripts/fake-images.py

- name: Unit Test
run: poetry run pytest --cov=apperception --cov-report=xml tests tests-scenic
shell: micromamba-shell {0}
run: pytest --cov=apperception --cov-report=xml tests
env:
AP_PORT: 25432
AP_PORT_ROAD: 25433
AP_PORT_RESET: 25434
AP_PORT_IMPORT: 25435
AP_PORT_SQL: 25436
AP_PORT: 25440
AP_PORT_ROAD_1: 25441
AP_PORT_ROAD_2: 25442
AP_PORT_RESET: 25443
AP_PORT_IMPORT: 25444
AP_PORT_SQL: 25445

- name: Upload coverage reports to Codecov
run: |
Expand Down
Loading