Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/gpt4v (wip) #526

Closed
wants to merge 75 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
8c0a78d
Copy from closed PR magic wormhole working code and test cases
Mustaballer Jun 5, 2023
b4b7879
Merge branch 'main' into share-magic-wormhole
Mustaballer Jun 15, 2023
395fa00
Merge branch 'main' into share-magic-wormhole
Mustaballer Jun 16, 2023
5fbdc1a
Merge remote-tracking branch 'upstream/main' into share-magic-wormhole
Mustaballer Jun 23, 2023
0a0208e
Merge branch 'share-magic-wormhole' of https://github.com/Mustaballer…
Mustaballer Jun 23, 2023
9dc1850
modify export_sql to use paramerterized queries to prevent sql injection
Mustaballer Jun 23, 2023
53f11f5
try resolve merge conflict with poetry.lock
Mustaballer Jun 23, 2023
0977859
Merge branch 'main' into share-magic-wormhole
Mustaballer Jun 23, 2023
cbee5e8
fix merge conflict and use better approach for overwriting env
Mustaballer Jun 23, 2023
9819330
Remove unnecessary function and pass test cases
Mustaballer Jun 25, 2023
afd9810
reformat file and group constants together in config.py
Mustaballer Jun 25, 2023
2211f78
ran black
Mustaballer Jun 25, 2023
f58fd5f
ran black
Mustaballer Jun 25, 2023
dafca05
moved functions in crud.py to db.py
Mustaballer Jun 26, 2023
3434a00
use tempfile in test_share.py and address minor changes
Mustaballer Jun 26, 2023
b801caf
restore original db name instead of literal
Mustaballer Jun 26, 2023
4c59c10
ran black -l 60, and it used call chain
Mustaballer Jun 26, 2023
088f370
Merge branch 'main' into share-magic-wormhole
0dm Jun 29, 2023
1096a15
Merge branch 'main' into share-magic-wormhole
Mustaballer Jul 4, 2023
01eef24
Add exception handling when ctrl+c during sharing that deletes db and…
Mustaballer Jul 4, 2023
5e52b5c
ran black and update poetry.lock
Mustaballer Jul 4, 2023
8317634
Add missing docstring in db.py
Mustaballer Jul 5, 2023
e675227
delete temp .env if ctrl+c during sharing
Mustaballer Jul 5, 2023
04c69b8
merge with latest main
Mustaballer Jul 6, 2023
2d54e83
Add .env.example and generate env in config.py
Mustaballer Jul 10, 2023
3992d1c
use .env.example for creating .env and removed unnecessary exceptions
Mustaballer Jul 12, 2023
d4d3f1c
Merge branch 'main' into share-magic-wormhole
Mustaballer Jul 17, 2023
2f2c0dd
use new approach for copying db
Mustaballer Jul 19, 2023
7a67386
Merge branch 'share-magic-wormhole' of https://github.com/Mustaballer…
Mustaballer Jul 19, 2023
6196876
modify copy deb function to return recording data and remov comments …
Mustaballer Jul 19, 2023
5893b3e
modify env names and add asserts to share.py
Mustaballer Jul 20, 2023
2149adc
copy alembic migrations
Mustaballer Jul 20, 2023
2f1548d
Copy all data relating to recording_timestamp in all tables
Mustaballer Jul 20, 2023
625c192
extract db file upon receiving recording
Mustaballer Jul 21, 2023
18a4918
add command to visualize recording
Mustaballer Jul 22, 2023
9b7f7af
remove unnecessary function and todo comment
Mustaballer Jul 22, 2023
786e063
refactor copy_recording_data
Mustaballer Jul 22, 2023
644c83a
remove unittest class and fix failing test case for receiving recordi…
Mustaballer Jul 22, 2023
653e785
modify conftest.py and fixtures.sql to insert data to every table for…
Mustaballer Jul 22, 2023
76f14b0
update unit tests
Mustaballer Jul 24, 2023
ada2aad
Merge branch 'main' into share-magic-wormhole
Mustaballer Jul 25, 2023
2f66b8a
resolve merge conflicts
Mustaballer Jul 25, 2023
f29f199
address flake8 errors
Mustaballer Jul 25, 2023
1a10f8a
Merge branch 'main' into share-magic-wormhole
Mustaballer Jul 31, 2023
c3173f8
resolve merge issues
Mustaballer Aug 1, 2023
ea25b53
Update openadapt/share.py
Mustaballer Aug 1, 2023
0123aae
resolve https://github.com/OpenAdaptAI/OpenAdapt/issues/441
Mustaballer Aug 2, 2023
7d0d343
add type annotation
Mustaballer Aug 3, 2023
b6cce11
Merge branch 'share-magic-wormhole' of https://github.com/Mustaballer…
Mustaballer Aug 3, 2023
d9eefa0
run black --preview and modify main.yml to check black --preview
Mustaballer Aug 3, 2023
961130b
remove unused import
Mustaballer Aug 4, 2023
5fd9868
Add timestamp to exported recording db files and update unit tests
Mustaballer Aug 4, 2023
453d2c2
Merge branch 'main' into share-magic-wormhole
Mustaballer Aug 10, 2023
4d66584
update poetry.lock
Mustaballer Aug 10, 2023
75b324d
Merge branch 'main' into share-magic-wormhole
Mustaballer Aug 10, 2023
dc5f2b6
fix: enhance publish action and authors in pyproject.toml
Mustaballer Aug 11, 2023
ebea2cb
modify release-and-publish.yml
Mustaballer Aug 11, 2023
c77f339
change author name to OpenAdapt.AI Team
Mustaballer Aug 11, 2023
8b1299d
Merge remote-tracking branch 'upstream/enhance-publishing' into share…
Mustaballer Aug 14, 2023
09dd4d6
test publish to test pypi
Mustaballer Aug 14, 2023
8ea0ee4
fix poetry conflicts and conflicting files
Mustaballer Aug 14, 2023
1b2eef3
Merge branch 'main' into share-magic-wormhole
Mustaballer Aug 18, 2023
0e8d620
resolve merge conflicts and linting errors from recent merge
Mustaballer Aug 18, 2023
5b9bbe0
Merge branch 'main' into share-magic-wormhole
Mustaballer Aug 28, 2023
24a3e79
Merge branch 'main' into share-magic-wormhole
Mustaballer Aug 29, 2023
a03bd59
update poetry.lock file and some formatting
Mustaballer Aug 29, 2023
a94c303
fix wormhole sharing
Mustaballer Sep 8, 2023
ca04296
Merge remote-tracking branch 'upstream/main' into share-magic-wormhole
Mustaballer Sep 8, 2023
61553f0
poetry lock
abrichr Nov 18, 2023
22b5f0c
fix failing tests
abrichr Nov 19, 2023
00c79cf
Merge branch 'main' into share-magic-wormhole
abrichr Nov 19, 2023
21340b2
poetry lock
abrichr Nov 19, 2023
0edcd88
add spacy-curated-transformers
abrichr Nov 19, 2023
4b8b8b0
wip
abrichr Nov 21, 2023
d321ba7
wip
abrichr Nov 21, 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
22 changes: 21 additions & 1 deletion openadapt/db.py
Original file line number Diff line number Diff line change
@@ -117,6 +117,27 @@ def genericize_datatypes(inspector, tablename, column_dict):
tgt_insert = tgt_recording_table.insert().values(src_recording)
tgt_conn.execute(tgt_insert)

# Get the timestamp from the source recording
src_timestamp = src_recording["timestamp"]

# Copy data from tables with the same timestamp
for table in src_metadata.sorted_tables:
if (
table.name not in exclude_tables
and "recording_timestamp" in table.columns.keys()
):
# Select data from source table with the same timestamp
src_select = table.select().where(
table.c.recording_timestamp == src_timestamp
)
src_rows = src_conn.execute(src_select).fetchall()

# Insert data into target table
tgt_table = tgt_metadata.tables[table.name]
for row in src_rows:
tgt_insert = tgt_table.insert().values(**row._asdict())
tgt_conn.execute(tgt_insert)

# Copy data from alembic_version table
src_alembic_version_table = src_metadata.tables["alembic_version"]
tgt_alembic_version_table = tgt_metadata.tables["alembic_version"]
@@ -131,7 +152,6 @@ def genericize_datatypes(inspector, tablename, column_dict):
tgt_conn.commit()
src_conn.close()
tgt_conn.close()

except Exception as exc:
# Perform cleanup
tgt_conn.close()