id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33,400 | 005_import_old_accounts.py | nylas_sync-engine/migrations/versions/005_import_old_accounts.py | """Import old accounts
Revision ID: adc646e1f11
Revises: 41a7e825d108
Create Date: 2014-03-17 19:00:27.631221
"""
# revision identifiers, used by Alembic.
revision = 'adc646e1f11'
down_revision = '41a7e825d108'
from alembic import op
from sqlalchemy.ext.declarative import declarative_base
import os.path
SQL_DUMP_... | 3,452 | Python | .py | 80 | 31.7625 | 77 | 0.597969 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,401 | 144_update_calendar_index.py | nylas_sync-engine/migrations/versions/144_update_calendar_index.py | """Update Calendar index.
Revision ID: 1c73ca99c03b
Revises: 1d7a72222b7c
Create Date: 2015-02-26 00:50:52.322510
"""
# revision identifiers, used by Alembic.
revision = '1c73ca99c03b'
down_revision = '1d7a72222b7c'
from alembic import op
def upgrade():
op.drop_constraint('calendar_ibfk_1', 'calendar', type_=... | 1,080 | Python | .py | 25 | 34.84 | 82 | 0.60554 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,402 | 105_add_subject_indexes.py | nylas_sync-engine/migrations/versions/105_add_subject_indexes.py | """add subject indexes
Revision ID: 37cd05edd433
Revises: 569b9d365295
Create Date: 2014-09-30 01:37:18.468317
"""
# revision identifiers, used by Alembic.
revision = '37cd05edd433'
down_revision = '569b9d365295'
from alembic import op
def upgrade():
op.create_index('ix_message_subject', 'message', ['subject'... | 556 | Python | .py | 15 | 34.466667 | 79 | 0.741088 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,403 | 124_remove_soft_deleted_objects.py | nylas_sync-engine/migrations/versions/124_remove_soft_deleted_objects.py | """remove_soft_deleted_objects
Revision ID: 40ad73aa49df
Revises:3c743bd31ee2
Create Date: 2014-12-15 20:38:02.814619
"""
# revision identifiers, used by Alembic.
revision = '40ad73aa49df'
down_revision = '3c743bd31ee2'
from alembic import op
def upgrade():
conn = op.get_bind()
# In practice we only have ... | 527 | Python | .py | 16 | 30.1875 | 71 | 0.759443 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,404 | 183_change_event_sync_timestamp.py | nylas_sync-engine/migrations/versions/183_change_event_sync_timestamp.py | """change event sync timestamp
Revision ID: 3a58d466f61d
Revises: 3857f395fb1d
Create Date: 2015-07-01 22:26:22.425718
"""
# revision identifiers, used by Alembic.
revision = '3a58d466f61d'
down_revision = '3857f395fb1d'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('calendar', s... | 822 | Python | .py | 22 | 32.545455 | 69 | 0.724747 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,405 | 010_store_raw_contact_data.py | nylas_sync-engine/migrations/versions/010_store_raw_contact_data.py | """Store raw contact data.
Revision ID: 3b511977a01f
Revises: 169cac0cd87e
Create Date: 2014-04-16 15:36:22.188971
"""
# revision identifiers, used by Alembic.
revision = '3b511977a01f'
down_revision = '169cac0cd87e'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('contact', sa.Col... | 424 | Python | .py | 14 | 28.142857 | 77 | 0.756219 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,406 | 146_update_google_calendar_uids.py | nylas_sync-engine/migrations/versions/146_update_google_calendar_uids.py | """update_google_calendar_uids
Revision ID: c77a90d524
Revises: 557378226d9f
Create Date: 2015-03-12 17:58:50.477526
"""
# revision identifiers, used by Alembic.
revision = 'c77a90d524'
down_revision = '557378226d9f'
from alembic import op
def upgrade():
conn = op.get_bind()
conn.execute(
'''UPDAT... | 538 | Python | .py | 17 | 27.705882 | 79 | 0.74269 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,407 | 026_add_audit_timestamps_to_all_objects.py | nylas_sync-engine/migrations/versions/026_add_audit_timestamps_to_all_objects.py | """add audit timestamps to all objects
Revision ID: 146b1817e4a8
Revises: 59b42d0ac749
Create Date: 2014-05-09 22:16:00.387937
"""
# revision identifiers, used by Alembic.
revision = '146b1817e4a8'
down_revision = '59b42d0ac749'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column... | 3,002 | Python | .py | 65 | 34.846154 | 78 | 0.593354 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,408 | 226_add_queryable_value_column_to_metadata.py | nylas_sync-engine/migrations/versions/226_add_queryable_value_column_to_metadata.py | """Add queryable value column to Metadata
Revision ID: 2dbf6da0775b
Revises: 25129e0316d4
Create Date: 2016-07-18 23:33:52.050259
"""
# revision identifiers, used by Alembic.
revision = '2dbf6da0775b'
down_revision = '25129e0316d4'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('m... | 703 | Python | .py | 18 | 33.388889 | 77 | 0.691285 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,409 | 099_add_namespace_id_to_message.py | nylas_sync-engine/migrations/versions/099_add_namespace_id_to_message.py | """add_namespace_id_to_message
Revision ID: e27104acb25
Revises:40b533a6f3e1
Create Date: 2014-09-22 00:17:21.265052
"""
# revision identifiers, used by Alembic.
revision = 'e27104acb25'
down_revision = '40b533a6f3e1'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind()
... | 796 | Python | .py | 23 | 29.913043 | 71 | 0.704188 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,410 | 165_add_compacted_body.py | nylas_sync-engine/migrations/versions/165_add_compacted_body.py | """add compacted body
Revision ID: 29698176aa8d
Revises:17dcbd7754e0
Create Date: 2015-05-06 18:51:12.598129
"""
# revision identifiers, used by Alembic.
revision = '29698176aa8d'
down_revision = '17dcbd7754e0'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():
... | 519 | Python | .py | 16 | 27.9375 | 76 | 0.717172 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,411 | 156_drop_cancelled_column.py | nylas_sync-engine/migrations/versions/156_drop_cancelled_column.py | """drop cancelled column
Revision ID: 3c7f059a68ba
Revises: 7de8a6ce8cd
Create Date: 2015-04-01 12:24:16.391039
"""
# revision identifiers, used by Alembic.
revision = '3c7f059a68ba'
down_revision = '7de8a6ce8cd'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind()
co... | 647 | Python | .py | 19 | 29.263158 | 60 | 0.709677 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,412 | 057_consolidate_account_sync_status_columns.py | nylas_sync-engine/migrations/versions/057_consolidate_account_sync_status_columns.py | """Consolidate account sync status columns
Revision ID: 4f57260602c9
Revises: 5143154fb1a2
Create Date: 2014-07-17 06:07:08.339740
"""
# revision identifiers, used by Alembic.
revision = '4f57260602c9'
down_revision = '4b4c5579c083'
from alembic import op
import sqlalchemy as sa
from bson import json_util
def upg... | 1,396 | Python | .py | 35 | 33.4 | 75 | 0.684718 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,413 | 053_canonicalize_addresses.py | nylas_sync-engine/migrations/versions/053_canonicalize_addresses.py | """canonicalize addresses
Revision ID: 3795b2a97af1
Revises:358d0320397f
Create Date: 2014-07-15 22:11:38.037716
"""
# revision identifiers, used by Alembic.
revision = '3795b2a97af1'
down_revision = '358d0320397f'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():... | 4,752 | Python | .py | 98 | 37.979592 | 77 | 0.628183 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,414 | 100_make_message_namespace_id_nonnull.py | nylas_sync-engine/migrations/versions/100_make_message_namespace_id_nonnull.py | """make message.namespace_id nonnull
Revision ID: 5a68ac0e3e9
Revises: e27104acb25
Create Date: 2014-09-23 05:08:05.978933
"""
# revision identifiers, used by Alembic.
revision = '5a68ac0e3e9'
down_revision = 'e27104acb25'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column('message'... | 531 | Python | .py | 16 | 28.6875 | 74 | 0.714004 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,415 | 207_add_contact_search_index_service_cursor_.py | nylas_sync-engine/migrations/versions/207_add_contact_search_index_service_cursor_.py | """add contact search index service cursor pointer table
Revision ID: 4b225df49747
Revises: gu8eqpm6f2x1n0fg
Create Date: 2015-09-30 14:47:42.028763
"""
# revision identifiers, used by Alembic.
revision = '4b225df49747'
down_revision = 'gu8eqpm6f2x1n0fg'
from alembic import op
import sqlalchemy as sa
from sqlalchem... | 2,428 | Python | .py | 44 | 42.272727 | 119 | 0.617003 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,416 | 078_events.py | nylas_sync-engine/migrations/versions/078_events.py | """events
Revision ID: 1c2253a0e997
Revises: 3c02d8204335
Create Date: 2014-08-07 00:12:40.148311
"""
# revision identifiers, used by Alembic.
revision = '1c2253a0e997'
down_revision = '3c74cbe7882e'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'event',
sa.Col... | 2,027 | Python | .py | 43 | 39.372093 | 75 | 0.633097 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,417 | 172_update_easuid_schema_4.py | nylas_sync-engine/migrations/versions/172_update_easuid_schema_4.py | """update_easuid_schema_4
Revision ID: d0427f9f3d1
Revises: 584356bf23a3
Create Date: 2015-05-19 21:35:03.342221
"""
# revision identifiers, used by Alembic.
revision = 'd0427f9f3d1'
down_revision = '584356bf23a3'
from alembic import op
def upgrade():
from inbox.ignition import main_engine
engine = main_e... | 742 | Python | .py | 21 | 31.238095 | 106 | 0.724719 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,418 | 061_remove_easfoldersyncstatus_folder_rows_.py | nylas_sync-engine/migrations/versions/061_remove_easfoldersyncstatus_folder_rows_.py | # flake8: noqa: F401, F811
"""Remove EASFolderSyncStatus + Folder rows for folders we never sync
Revision ID: 2a748760ac63
Revises: 4af5952e8a5b
Create Date: 2014-07-19 00:28:08.258857
"""
# revision identifiers, used by Alembic.
revision = 'bb4f204f192'
down_revision = '2a748760ac63'
def upgrade():
if 'easfol... | 1,656 | Python | .py | 39 | 32.384615 | 76 | 0.644057 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,419 | 018_message_contact_association.py | nylas_sync-engine/migrations/versions/018_message_contact_association.py | """message contact association
Revision ID: 223041bb858b
Revises: 2c9f3a06de09
Create Date: 2014-04-28 23:52:05.449401
"""
# revision identifiers, used by Alembic.
revision = '223041bb858b'
down_revision = '2c9f3a06de09'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'... | 1,215 | Python | .py | 32 | 32.28125 | 73 | 0.674339 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,420 | 117_fix_easuid_delete_cascades.py | nylas_sync-engine/migrations/versions/117_fix_easuid_delete_cascades.py | """Fix EASUid delete cascades
Revision ID: 420bf3422c4f
Revises: 10ecf4841ac3
Create Date: 2014-10-23 11:02:58.010469
"""
# revision identifiers, used by Alembic.
revision = '420bf3422c4f'
down_revision = '10ecf4841ac3'
from alembic import op
def upgrade():
op.drop_constraint('easuid_ibfk_2', 'easuid', type_=... | 719 | Python | .py | 18 | 34.444444 | 69 | 0.660405 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,421 | 212_add_columns_for_smtp_imap_specific_auth.py | nylas_sync-engine/migrations/versions/212_add_columns_for_smtp_imap_specific_auth.py | """Add columns for smtp/imap-specific auth
Revision ID: 501f6b2fef28
Revises: 31aae1ecb374
Create Date: 2016-01-29 00:27:08.174534
"""
# revision identifiers, used by Alembic.
revision = '501f6b2fef28'
down_revision = '31aae1ecb374'
from alembic import op, context
from sqlalchemy.sql import text
def upgrade():
... | 1,963 | Python | .py | 38 | 38.210526 | 78 | 0.568372 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,422 | 193_calculate_receivedrecentdate_for_threads.py | nylas_sync-engine/migrations/versions/193_calculate_receivedrecentdate_for_threads.py | """calculate receivedrecentdate for threads
Revision ID: 691fa97024d
Revises: 2758cefad87d
Create Date: 2015-07-20 23:47:41.297327
"""
# revision identifiers, used by Alembic.
revision = '691fa97024d'
down_revision = '2758cefad87d'
# solution from http://stackoverflow.com/a/1217947
def page_query(q):
CHUNK_SIZ... | 1,234 | Python | .py | 36 | 27.111111 | 70 | 0.655434 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,423 | 035_add_columns_for_drafts_support_to_.py | nylas_sync-engine/migrations/versions/035_add_columns_for_drafts_support_to_.py | """Add columns for drafts support to SpoolMessage
Revision ID: 24e085e152c0
Revises: 350a08df27ee
Create Date: 2014-05-13 22:50:03.938446
"""
# revision identifiers, used by Alembic.
revision = '24e085e152c0'
down_revision = '350a08df27ee'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects impo... | 3,263 | Python | .py | 65 | 33.707692 | 122 | 0.520892 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,424 | 051_store_secrets_in_local_vault.py | nylas_sync-engine/migrations/versions/051_store_secrets_in_local_vault.py | """store secrets in local vault
Revision ID: 1925c535a52d
Revises: 29217fad3f46
Create Date: 2014-07-07 15:03:27.386981
"""
# revision identifiers, used by Alembic.
revision = '1925c535a52d'
down_revision = '29217fad3f46'
from alembic import op
import sqlalchemy as sa
from datetime import datetime
def upgrade():
... | 3,559 | Python | .py | 81 | 35.08642 | 82 | 0.640417 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,425 | 043_columns_for_sync_running_stopped_killed.py | nylas_sync-engine/migrations/versions/043_columns_for_sync_running_stopped_killed.py | """Columns for sync running/stopped/killed
Revision ID: 5a136610b50b
Revises: 29efe152cc00
Create Date: 2014-06-23 23:45:34.546823
"""
# revision identifiers, used by Alembic.
revision = '5a136610b50b'
down_revision = '459dbc29648'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('a... | 855 | Python | .py | 23 | 30 | 77 | 0.635922 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,426 | 087_fix_account_foreign_keys.py | nylas_sync-engine/migrations/versions/087_fix_account_foreign_keys.py | """fix account foreign keys
Revision ID: 565c7325c51d
Revises: 1ac03cab7a24
Create Date: 2014-08-29 20:24:38.952595
"""
# revision identifiers, used by Alembic.
revision = '565c7325c51d'
down_revision = '1ac03cab7a24'
from alembic import op
import sqlalchemy as sa
def upgrade():
from inbox.ignition import mai... | 856 | Python | .py | 22 | 31.636364 | 76 | 0.650121 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,427 | 114_eas_twodevices_pledge.py | nylas_sync-engine/migrations/versions/114_eas_twodevices_pledge.py | """EAS two-devices pledge
Revision ID: ad7b856bcc0
Revises: 22d076f48b88
Create Date: 2014-10-20 17:31:52.121360
"""
# revision identifiers, used by Alembic.
revision = 'ad7b856bcc0'
down_revision = '26bfb2e45c47'
from alembic import op
import sqlalchemy as sa
def upgrade():
from inbox.ignition import main_en... | 3,928 | Python | .py | 74 | 38.959459 | 79 | 0.561573 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,428 | 133_add_unique_account_constraint.py | nylas_sync-engine/migrations/versions/133_add_unique_account_constraint.py | """add unique account constraint
Revision ID: 13faec74da45
Revises: 1d93c9f9f506
Create Date: 2015-02-02 13:38:21.725739
"""
# revision identifiers, used by Alembic.
revision = '13faec74da45'
down_revision = '1d93c9f9f506'
from alembic import op
def upgrade():
op.create_unique_constraint('unique_account_addre... | 491 | Python | .py | 14 | 30.642857 | 75 | 0.720682 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,429 | 160_split_actionlog.py | nylas_sync-engine/migrations/versions/160_split_actionlog.py | """Split ActionLog.
Revision ID: 182f2b40fa36
Revises: 4e6eedda36af
Create Date: 2015-04-20 21:22:20.523261
"""
# revision identifiers, used by Alembic.
revision = '182f2b40fa36'
down_revision = '4e6eedda36af'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.orm import contains_eager
def upgrade():
... | 1,977 | Python | .py | 46 | 33.021739 | 75 | 0.618724 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,430 | 155_add_status_column.py | nylas_sync-engine/migrations/versions/155_add_status_column.py | """add status column
Revision ID: 7de8a6ce8cd
Revises: 1f06c15ae796
Create Date: 2015-03-30 12:48:15.317896
"""
# revision identifiers, used by Alembic.
revision = '7de8a6ce8cd'
down_revision = '1f06c15ae796'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind()
conn.e... | 996 | Python | .py | 24 | 35.166667 | 86 | 0.674274 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,431 | 009_multiple_contact_providers.py | nylas_sync-engine/migrations/versions/009_multiple_contact_providers.py | """multiple contact providers
Revision ID: 169cac0cd87e
Revises: 3c11391b5eb0
Create Date: 2014-03-28 19:16:15.450474
"""
# revision identifiers, used by Alembic.
revision = '169cac0cd87e'
down_revision = '3c11391b5eb0'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('contact', sa.... | 1,333 | Python | .py | 28 | 36.571429 | 79 | 0.592907 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,432 | 198_eas_foldersyncstatus_startstop_columns.py | nylas_sync-engine/migrations/versions/198_eas_foldersyncstatus_startstop_columns.py | """eas foldersyncstatus startstop columns
Revision ID: 301d22aa96b8
Revises: 3cf51fb0e76a
Create Date: 2015-08-12 10:16:11.628828
"""
# revision identifiers, used by Alembic.
revision = '301d22aa96b8'
down_revision = '3cf51fb0e76a'
from alembic import op
import sqlalchemy as sa
def upgrade():
from inbox.ignit... | 1,183 | Python | .py | 28 | 31.678571 | 72 | 0.621622 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,433 | 039_change_easfoldersync_unique_constraint.py | nylas_sync-engine/migrations/versions/039_change_easfoldersync_unique_constraint.py | """Change EASFolderSync unique constraint
Revision ID: 1c72d8a0120e
Revises: 1edbd63582c2
Create Date: 2014-06-12 22:44:31.934659
"""
# revision identifiers, used by Alembic.
revision = '1c72d8a0120e'
down_revision = '1edbd63582c2'
from alembic import op
from sqlalchemy.ext.declarative import declarative_base
def... | 1,322 | Python | .py | 31 | 33.483871 | 74 | 0.642467 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,434 | 178_add_reply_to_messagecontactassociation.py | nylas_sync-engine/migrations/versions/178_add_reply_to_messagecontactassociation.py | """Add reply_to to MessageContactAssociation
Revision ID: 41f957b595fc
Revises: 2b9dd6f7593a
Create Date: 2015-03-18 17:46:01.393708
"""
# revision identifiers, used by Alembic.
revision = '41f957b595fc'
down_revision = '2b9dd6f7593a'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_colu... | 958 | Python | .py | 22 | 31.272727 | 76 | 0.548491 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,435 | 149_add_emailed_events_calendar.py | nylas_sync-engine/migrations/versions/149_add_emailed_events_calendar.py | """add emailed events calendar
Revision ID: 2493281d621
Revises: 54dcea22a268
Create Date: 2015-03-17 00:41:28.987168
"""
# revision identifiers, used by Alembic.
revision = '2493281d621'
down_revision = '54dcea22a268'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind()
... | 1,583 | Python | .py | 31 | 45.032258 | 114 | 0.707902 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,436 | 204_remove_deleted_at_constraint.py | nylas_sync-engine/migrations/versions/204_remove_deleted_at_constraint.py | """
Removes deleted_at constraint from easfoldersyncstatus and category
Revision ID: 583e083d4512
Revises: 420ccbea2c5e
Create Date: 2015-09-09 17:43:11.191169
"""
# revision identifiers, used by Alembic.
revision = '583e083d4512'
down_revision = '420ccbea2c5e'
from alembic import op
from sqlalchemy.sql import text... | 1,919 | Python | .py | 41 | 38.487805 | 78 | 0.639722 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,437 | 027_imapuid_soft_deletes.py | nylas_sync-engine/migrations/versions/027_imapuid_soft_deletes.py | """remove erroneous soft-deleted imapuids
We are no longer using soft deletes on this table. All soft-deleted uids
should be hard-deleted instead.
Revision ID: 146b1817e4a8
Revises: 59b42d0ac749
Create Date: 2014-05-09 22:16:00.387937
"""
# revision identifiers, used by Alembic.
revision = '924ffd092832'
down_revis... | 641 | Python | .py | 19 | 31.368421 | 72 | 0.763072 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,438 | 012_move_google_userinfo_fields_to_.py | nylas_sync-engine/migrations/versions/012_move_google_userinfo_fields_to_.py | """Move Google UserInfo fields to ImapAccount table
Revision ID: 193802835c33
Revises: 169cac0cd87e
Create Date: 2014-04-15 02:21:13.398192
"""
# revision identifiers, used by Alembic.
revision = '193802835c33'
down_revision = '3237b6b1ee03'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import ... | 6,328 | Python | .py | 136 | 30.985294 | 82 | 0.506479 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,439 | 134_add_message_index.py | nylas_sync-engine/migrations/versions/134_add_message_index.py | """add message index
Revision ID: 4270a032b943
Revises:13faec74da45
Create Date: 2015-02-06 05:14:00.041485
"""
# revision identifiers, used by Alembic.
revision = '4270a032b943'
down_revision = '13faec74da45'
from alembic import op
def upgrade():
op.create_index('ix_message_namespace_id_deleted_at', 'message... | 486 | Python | .py | 14 | 31.142857 | 77 | 0.730603 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,440 | 072_recompute_snippets.py | nylas_sync-engine/migrations/versions/072_recompute_snippets.py | """recompute snippets
Revision ID: 4e93522b5b62
Revises: 2525c5245cc2
Create Date: 2014-07-31 09:37:48.099402
"""
# revision identifiers, used by Alembic.
revision = '4e93522b5b62'
down_revision = '3bb5d61c895c'
from sqlalchemy.ext.declarative import declarative_base
# solution from http://stackoverflow.com/a/121... | 1,587 | Python | .py | 46 | 28.130435 | 71 | 0.657929 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,441 | 196_create_outlook_account_column.py | nylas_sync-engine/migrations/versions/196_create_outlook_account_column.py | """create outlook_account column
Revision ID: 4fa0540482f8
Revises: 691fa97024d
Create Date: 2015-08-06 14:05:00.436949
"""
# revision identifiers, used by Alembic.
revision = '4fa0540482f8'
down_revision = '51ad0922ad8e'
from alembic import op
from sqlalchemy.sql import text
from sqlalchemy.ext.declarative import ... | 1,119 | Python | .py | 29 | 34.689655 | 85 | 0.74026 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,442 | 104_add_message_inbox_uid_index.py | nylas_sync-engine/migrations/versions/104_add_message_inbox_uid_index.py | """add message.inbox_uid index
Revision ID: 569b9d365295
Revises: 4015edc83ba
Create Date: 2014-09-29 21:28:35.135135
"""
# revision identifiers, used by Alembic.
revision = '569b9d365295'
down_revision = '4015edc83ba'
from alembic import op
def upgrade():
op.create_index('ix_message_inbox_uid', 'message', ['... | 450 | Python | .py | 14 | 28.571429 | 69 | 0.721963 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,443 | 106_add_more_indexes.py | nylas_sync-engine/migrations/versions/106_add_more_indexes.py | """add more indexes
Revision ID: 118b3cdd0185
Revises: 37cd05edd433
Create Date: 2014-10-01 18:39:45.375318
"""
# revision identifiers, used by Alembic.
revision = '118b3cdd0185'
down_revision = '37cd05edd433'
from alembic import op
def upgrade():
op.create_index('ix_thread_recentdate', 'thread', ['recentdate... | 790 | Python | .py | 20 | 33.9 | 77 | 0.683727 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,444 | 033_add_more_indexes.py | nylas_sync-engine/migrations/versions/033_add_more_indexes.py | """add more indexes
Revision ID: 1eab2619cc4f
Revises: 3f96e92953e1
Create Date: 2014-05-23 22:43:51.885795
"""
# revision identifiers, used by Alembic.
revision = '1eab2619cc4f'
down_revision = '3f96e92953e1'
from alembic import op
from sqlalchemy.ext.declarative import declarative_base
def upgrade():
from i... | 1,236 | Python | .py | 30 | 35.933333 | 79 | 0.701843 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,445 | 036_replace_usertag_by_generic_tag.py | nylas_sync-engine/migrations/versions/036_replace_usertag_by_generic_tag.py | """replace usertag by generic tag
Revision ID: 21878b1b3d4b
Revises: 24e085e152c0
Create Date: 2014-05-21 03:36:26.834916
"""
# revision identifiers, used by Alembic.
revision = '21878b1b3d4b'
down_revision = '24e085e152c0'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
... | 4,581 | Python | .py | 93 | 38.913978 | 77 | 0.610639 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,446 | 189_add_initial_sync_start_end_column.py | nylas_sync-engine/migrations/versions/189_add_initial_sync_start_end_column.py | """Add initial_sync_start/end to Folder
Revision ID: 3b093f2d7419
Revises: 606447e78e7
Create Date: 2015-07-14 10:06:58.545870
"""
# revision identifiers, used by Alembic.
revision = '3b093f2d7419'
down_revision = '606447e78e7'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('folde... | 671 | Python | .py | 18 | 30.722222 | 74 | 0.660465 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,447 | 086_event_date_times.py | nylas_sync-engine/migrations/versions/086_event_date_times.py | """event date times
Revision ID: 1ac03cab7a24
Revises: 294200d809c8
Create Date: 2014-08-26 22:43:40.150894
"""
# revision identifiers, used by Alembic.
revision = '1ac03cab7a24'
down_revision = '294200d809c8'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
d... | 886 | Python | .py | 25 | 31.84 | 75 | 0.734742 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,448 | 071_more_sync_states.py | nylas_sync-engine/migrations/versions/071_more_sync_states.py | """more sync states
Revision ID: 3bb5d61c895c
Revises: 2525c5245cc2
Create Date: 2014-07-31 12:44:39.338556
"""
# revision identifiers, used by Alembic.
revision = '3bb5d61c895c'
down_revision = '2525c5245cc2'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column('account', 'sync_state... | 959 | Python | .py | 24 | 26.958333 | 73 | 0.526429 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,449 | 199_save_imap_uidnext.py | nylas_sync-engine/migrations/versions/199_save_imap_uidnext.py | """save_imap_uidnext
Revision ID: 3583211a4838
Revises: 301d22aa96b8
Create Date: 2015-08-13 22:24:35.385260
"""
# revision identifiers, used by Alembic.
revision = '3583211a4838'
down_revision = '301d22aa96b8'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('imapfolderinfo', sa.Co... | 479 | Python | .py | 15 | 26.8 | 70 | 0.695175 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,450 | 014_contact_ranking_signals.py | nylas_sync-engine/migrations/versions/014_contact_ranking_signals.py | """contact ranking signals
Revision ID: 563d405d1f99
Revises: 169cac0cd87e
Create Date: 2014-04-17 19:32:37.715207
"""
# revision identifiers, used by Alembic.
revision = '563d405d1f99'
down_revision = 'f7dbd9bf4a6'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'search... | 899 | Python | .py | 25 | 30.32 | 77 | 0.665127 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,451 | 201_add_sync_email_bit_to_account.py | nylas_sync-engine/migrations/versions/201_add_sync_email_bit_to_account.py | """add sync_email bit to Account
Revision ID: 527bbdc2b0fa
Revises: dbf45fac873
Create Date: 2015-08-21 02:14:27.298023
"""
# revision identifiers, used by Alembic.
revision = '527bbdc2b0fa'
down_revision = 'dbf45fac873'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column(
'acc... | 517 | Python | .py | 18 | 24.722222 | 61 | 0.706721 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,452 | 202_drop_sync_raw_data_column.py | nylas_sync-engine/migrations/versions/202_drop_sync_raw_data_column.py | """drop_sync_raw_data_column
Revision ID: 2e515548043b
Revises: 527bbdc2b0fa
Create Date: 2015-09-01 23:37:44.203784
"""
# revision identifiers, used by Alembic.
revision = '2e515548043b'
down_revision = '527bbdc2b0fa'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrad... | 601 | Python | .py | 17 | 28.823529 | 74 | 0.673611 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,453 | 047_store_more_on_threads.py | nylas_sync-engine/migrations/versions/047_store_more_on_threads.py | """Store more on threads
Revision ID: 161b88c17615
Revises: 38d78543f8be
Create Date: 2014-06-27 01:46:28.773074
"""
# revision identifiers, used by Alembic.
revision = '161b88c17615'
down_revision = '38d78543f8be'
import itertools
from alembic import op
import sqlalchemy as sa
def upgrade():
from inbox.sqlal... | 2,065 | Python | .py | 47 | 32.021277 | 78 | 0.587649 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,454 | 170_update_easuid_schema_2.py | nylas_sync-engine/migrations/versions/170_update_easuid_schema_2.py | """update easuid schema 2
Revision ID: 3ee78a8b1ac6
Revises: 281b07fa75bb
Create Date: 2015-05-19 01:14:08.632291
"""
# revision identifiers, used by Alembic.
revision = '3ee78a8b1ac6'
down_revision = '281b07fa75bb'
import sqlalchemy as sa
def upgrade():
from sqlalchemy.ext.declarative import declarative_base... | 1,641 | Python | .py | 41 | 31.536585 | 75 | 0.657646 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,455 | 130_add_message_index.py | nylas_sync-engine/migrations/versions/130_add_message_index.py | """add message index
Revision ID: 2b288dc444f
Revises:5349c1a03fde
Create Date: 2015-01-25 02:41:29.572193
"""
# revision identifiers, used by Alembic.
revision = '2b288dc444f'
down_revision = '5349c1a03fde'
from alembic import op
def upgrade():
op.create_index('ix_message_ns_id_is_draft_received_date', 'mess... | 547 | Python | .py | 16 | 28.5625 | 73 | 0.674952 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,456 | 188_create_sequence_number_column.py | nylas_sync-engine/migrations/versions/188_create_sequence_number_column.py | """create sequence_number column
Revision ID: 606447e78e7
Revises: 41f957b595fc
Create Date: 2015-06-29 14:56:45.745668
"""
# revision identifiers, used by Alembic.
revision = '606447e78e7'
down_revision = '334b33f18b4f'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind(... | 707 | Python | .py | 19 | 32.421053 | 90 | 0.701471 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,457 | 085_add_attachment_tag.py | nylas_sync-engine/migrations/versions/085_add_attachment_tag.py | """add attachment tag
Revision ID: 294200d809c8
Revises:10db12da2005
Create Date: 2014-08-22 20:15:59.937498
"""
# revision identifiers, used by Alembic.
revision = '294200d809c8'
down_revision = '10db12da2005'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
from inbox.models.session imp... | 2,178 | Python | .py | 50 | 36.1 | 81 | 0.657521 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,458 | 083_calendars_event_owners.py | nylas_sync-engine/migrations/versions/083_calendars_event_owners.py | """calendars, event owners
Revision ID: 10a1129fe685
Revises: 1322d3787305
Create Date: 2014-08-18 21:50:52.175039
"""
# revision identifiers, used by Alembic.
revision = '10a1129fe685'
down_revision = '1322d3787305'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table
def upgrade():
... | 4,199 | Python | .py | 86 | 35.465116 | 78 | 0.544922 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,459 | 041_add_sync_status_columns_to_foldersync.py | nylas_sync-engine/migrations/versions/041_add_sync_status_columns_to_foldersync.py | """Add sync status columns to foldersync
Revision ID: 159609404baf
Revises: 1d7374c286c5
Create Date: 2014-06-10 19:50:59.005478
"""
# revision identifiers, used by Alembic.
revision = '159609404baf'
down_revision = '4085dd542739'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.ext.declarative import... | 1,280 | Python | .py | 32 | 33.375 | 79 | 0.690939 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,460 | 064_make_address_fields_non_null.py | nylas_sync-engine/migrations/versions/064_make_address_fields_non_null.py | """make address fields non-null.
Revision ID: 2d05e116bdb7
Revises: 5143154fb1a2
Create Date: 2014-07-17 22:13:41.792085
"""
# revision identifiers, used by Alembic.
revision = '2d05e116bdb7'
down_revision = '4fd3fcd46a3b'
from alembic import op
from sqlalchemy import func, or_
from sqlalchemy.dialects import mysql... | 2,332 | Python | .py | 53 | 34.301887 | 76 | 0.616233 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,461 | 093_add_folder_identifier.py | nylas_sync-engine/migrations/versions/093_add_folder_identifier.py | """Add Folder.identifier
Revision ID: 159607944f52
Revises: 4b07b67498e1
Create Date: 2014-09-14 08:43:59.410902
"""
# revision identifiers, used by Alembic.
revision = '159607944f52'
down_revision = '63dc7f205da'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
from inbox.models.constant... | 2,143 | Python | .py | 50 | 37.6 | 143 | 0.710983 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,462 | 032_tighten_easuid.py | nylas_sync-engine/migrations/versions/032_tighten_easuid.py | """Tighten EAS constraints and fix easfoldersync state enum.
Revision ID: 3f96e92953e1
Revises: 55f0ff54c776
Create Date: 2014-05-21 17:43:44.556716
"""
# revision identifiers, used by Alembic.
revision = '3f96e92953e1'
down_revision = '55f0ff54c776'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.ex... | 2,121 | Python | .py | 46 | 35.021739 | 75 | 0.609307 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,463 | 034_cascade_folder_deletes_to_imapuid.py | nylas_sync-engine/migrations/versions/034_cascade_folder_deletes_to_imapuid.py | """cascade folder deletes to imapuid
Otherwise, since this fk is NOT NULL, deleting a folder which has associated
imapuids still existing will cause a database IntegrityError. Only the mail
sync engine does such a thing. Nothing else should be deleting folders,
hard or soft.
This also fixes a problem where if e.g. so... | 4,899 | Python | .py | 82 | 50.036585 | 79 | 0.610984 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,464 | 098_add_throttling_support.py | nylas_sync-engine/migrations/versions/098_add_throttling_support.py | """add_throttling_support
Revision ID: 40b533a6f3e1
Revises: 248ec24a39f
Create Date: 2014-09-24 00:41:59.379523
"""
# revision identifiers, used by Alembic.
revision = '40b533a6f3e1'
down_revision = '248ec24a39f'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('account', sa.Column... | 485 | Python | .py | 15 | 27.666667 | 74 | 0.701299 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,465 | 210_drop_message_full_body_id_fk.py | nylas_sync-engine/migrations/versions/210_drop_message_full_body_id_fk.py | """Drop Message.full_body_id
Revision ID: 3613ca83ea40
Revises: 3618838f5bc6
Create Date: 2015-11-12 00:21:02.683861
"""
# revision identifiers, used by Alembic.
revision = '3613ca83ea40'
down_revision = '3618838f5bc6'
from alembic import op
def upgrade():
op.drop_constraint(u'full_body_id_fk', 'message', typ... | 365 | Python | .py | 13 | 25.846154 | 73 | 0.764535 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,466 | 127_remove_easeventuid.py | nylas_sync-engine/migrations/versions/127_remove_easeventuid.py | """remove easeventuid
Revision ID: 581e91bd7141
Revises: 262436681c4
Create Date: 2015-01-10 00:57:50.944460
"""
# revision identifiers, used by Alembic.
revision = '581e91bd7141'
down_revision = '262436681c4'
from alembic import op
def upgrade():
from inbox.ignition import main_engine
engine = main_engin... | 716 | Python | .py | 20 | 32.25 | 79 | 0.738686 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,467 | conftest.py | nylas_sync-engine/tests/conftest.py | """ Fixtures don't go here; see util/base.py and friends. """
# Monkeypatch first, to prevent "AttributeError: 'module' object has no
# attribute 'poll'" errors when tests import socket, then monkeypatch.
from gevent import monkey
monkey.patch_all(aggressive=False)
import gevent_openssl
gevent_openssl.monkey_patch()
... | 643 | Python | .py | 12 | 43.916667 | 71 | 0.605723 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,468 | conftest.py | nylas_sync-engine/tests/scheduling/conftest.py | # flake8: noqa: F401
from tests.util.base import dbloader, db, default_account
| 79 | Python | .py | 2 | 38.5 | 57 | 0.792208 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,469 | test_sync_start_logic.py | nylas_sync-engine/tests/scheduling/test_sync_start_logic.py | import json
import mockredis
import mock
import pytest
import platform
from inbox.ignition import engine_manager
from inbox.mailsync.frontend import HTTPFrontend
from inbox.mailsync.service import (SyncService, NOMINAL_THRESHOLD,
NUM_CPU_SAMPLES)
from inbox.models import Account
from... | 13,155 | Python | .py | 276 | 38.34058 | 80 | 0.649336 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,470 | test_syncback_logic.py | nylas_sync-engine/tests/scheduling/test_syncback_logic.py | import random
import pytest
import gevent
from inbox.ignition import engine_manager
from inbox.models.session import session_scope, session_scope_by_shard_id
from inbox.models.action_log import ActionLog, schedule_action
from inbox.transactions.actions import SyncbackService
from tests.util.base import add_generic_i... | 6,613 | Python | .py | 140 | 38.942857 | 107 | 0.66791 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,471 | test_thread_versioning.py | nylas_sync-engine/tests/transactions/test_thread_versioning.py | from tests.util.base import add_fake_message, add_fake_category
def test_adding_and_removing_message_on_thread_increments_version(
db, thread, default_namespace):
assert thread.version == 0
message = add_fake_message(db.session, default_namespace.id, thread)
assert thread.version == 1
thread.m... | 1,659 | Python | .py | 37 | 38.810811 | 78 | 0.719702 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,472 | test_transaction_creation.py | nylas_sync-engine/tests/transactions/test_transaction_creation.py | from datetime import datetime
from sqlalchemy import desc
from flanker import mime
from inbox.models import Transaction, AccountTransaction, Calendar
from inbox.models.mixins import HasRevisions
from inbox.models.util import transaction_objects
from tests.util.base import (add_fake_message, add_fake_thread, add_fake... | 14,941 | Python | .py | 278 | 41.917266 | 79 | 0.641389 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,473 | test_transaction_deletion.py | nylas_sync-engine/tests/transactions/test_transaction_deletion.py | import random
import uuid
from datetime import datetime, timedelta
from sqlalchemy import desc
from inbox.models import Transaction
from inbox.models.util import purge_transactions
def get_latest_transaction(db_session, namespace_id):
return db_session.query(Transaction).filter(
Transaction.namespace_id... | 3,162 | Python | .py | 61 | 43.885246 | 79 | 0.677367 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,474 | test_action_scheduling.py | nylas_sync-engine/tests/transactions/test_action_scheduling.py | from inbox.models.action_log import schedule_action, ActionLog
from tests.util.base import add_fake_event
def test_action_scheduling(db, default_account):
event = add_fake_event(db.session, default_account.namespace.id)
schedule_action('create_event', event, default_account.namespace.id,
... | 1,358 | Python | .py | 26 | 43.769231 | 72 | 0.684051 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,475 | test_delta_sync.py | nylas_sync-engine/tests/transactions/test_delta_sync.py | import datetime
import json
import time
from freezegun import freeze_time
from tests.util.base import add_fake_message
from tests.api.base import api_client
__all__ = ['api_client']
def add_account_with_different_namespace_id(db_session,
email_address='cypress@yahoo.com'):... | 8,489 | Python | .py | 175 | 40.794286 | 79 | 0.648276 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,476 | test_remote_sync.py | nylas_sync-engine/tests/contacts/test_remote_sync.py | import pytest
from tests.util.base import (contact_sync, contacts_provider,
ContactsProviderStub)
from inbox.models import Contact
__all__ = ['contact_sync', 'contacts_provider']
@pytest.fixture(scope='function')
def alternate_contacts_provider():
return ContactsProviderStub('alter... | 3,080 | Python | .py | 64 | 41.78125 | 78 | 0.710377 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,477 | test_process_mail.py | nylas_sync-engine/tests/contacts/test_process_mail.py | """Sanity-check our logic for updating contact data from message addressees
during a sync."""
from inbox.models import Contact
from tests.util.base import add_fake_message
def test_update_contacts_from_message(db, default_namespace, thread):
# Check that only one Contact is created for repeatedly-referenced
#... | 3,087 | Python | .py | 58 | 44.206897 | 79 | 0.649536 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,478 | test_ignition.py | nylas_sync-engine/tests/general/test_ignition.py | # flake8: noqa: F401
import pytest
from inbox.ignition import init_db, verify_db, reset_invalid_autoincrements
from inbox.util.sharding import get_shard_schemas
from inbox.models.session import session_scope_by_shard_id
from inbox.util.testutils import create_test_db, setup_test_db
@pytest.yield_fixture(scope='funct... | 1,993 | Python | .py | 48 | 31.395833 | 75 | 0.61419 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,479 | test_relationships.py | nylas_sync-engine/tests/general/test_relationships.py | import json
from inbox.models import Category, Message, MessageCategory, Thread
from tests.util.base import add_fake_message, add_fake_thread
from tests.api.base import new_api_client
def test_category_delete(db, gmail_account):
""" Ensure that all associated MessageCategories are deleted
when a Categor... | 3,748 | Python | .py | 74 | 39.702703 | 76 | 0.617429 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,480 | test_thread_creation.py | nylas_sync-engine/tests/general/test_thread_creation.py | # flake8: noqa: F401
# test that T441 doesn't reappear, ever.
import datetime
import pytest
from collections import namedtuple
from inbox.mailsync.backends.imap.generic import FolderSyncEngine
from inbox.models import Folder, Namespace
from inbox.models.backends.generic import GenericAccount
from inbox.models.backends.... | 3,338 | Python | .py | 72 | 37.013889 | 78 | 0.648325 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,481 | test_lock.py | nylas_sync-engine/tests/general/test_lock.py | """ Tests for file lock implementation. """
import tempfile
import pytest
from gevent import spawn, sleep
from inbox.util.file import Lock
def lock(block, filename=None):
if filename is None:
handle, filename = tempfile.mkstemp()
return Lock(filename, block=block)
@pytest.fixture
def b_lock():
... | 1,572 | Python | .py | 45 | 29.4 | 77 | 0.667108 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,482 | test_provider_export.py | nylas_sync-engine/tests/general/test_provider_export.py | from inbox.providers import providers
import json
def test_provider_export_as_json():
"""Provider dict should be exportable as json"""
assert json.dumps(dict(providers))
| 180 | Python | .py | 5 | 33 | 52 | 0.774566 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,483 | test_provider_resolution.py | nylas_sync-engine/tests/general/test_provider_resolution.py | import pytest
from inbox.util.url import provider_from_address
from inbox.util.url import InvalidEmailAddressError
from inbox.auth.base import handler_from_provider
from inbox.auth.generic import GenericAuthHandler
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import NotSupportedError
def test_pr... | 2,664 | Python | .py | 57 | 39.807018 | 91 | 0.662053 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,484 | test_threading.py | nylas_sync-engine/tests/general/test_threading.py | # -*- coding: utf-8 -*-
# flake8: noqa: F401
import pytest
from inbox.util.threading import fetch_corresponding_thread
from inbox.util.misc import cleanup_subject
from tests.util.base import (add_fake_message, add_fake_thread,
add_fake_imapuid)
def test_message_cleanup():
assert clean... | 3,696 | Python | .py | 63 | 46.222222 | 87 | 0.608864 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,485 | test_sync_engine_exit.py | nylas_sync-engine/tests/general/test_sync_engine_exit.py | # flake8: noqa: F401
# test that we correctly exit a sync engine instance if the folder we are
# trying to sync comes back as deleted while syncing
import pytest
from sqlalchemy.exc import IntegrityError
from inbox.mailsync.backends.imap.monitor import ImapSyncMonitor
from inbox.mailsync.backends.imap.generic import ... | 2,286 | Python | .py | 50 | 39.22 | 77 | 0.716472 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,486 | test_util.py | nylas_sync-engine/tests/general/test_util.py | # test_util.py --- test various utility functions.
import socket
from inbox.util.url import naked_domain, matching_subdomains
def test_naked_domain():
assert naked_domain(
'python.linux.com') == 'python.linux.com'
assert naked_domain(
'iplayer.forums.bbc.co.uk') == 'iplayer.forums.bbc.co.uk'
... | 2,149 | Python | .py | 43 | 44.023256 | 88 | 0.693263 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,487 | test_account.py | nylas_sync-engine/tests/general/test_account.py | import pytest
from tests.util.base import add_fake_gmail_account, add_generic_imap_account
def add_fake_imap_account(db_session, provider, email_address, password):
account = add_generic_imap_account(db_session)
account.provider = provider
account.email_address = email_address
account.imap_password =... | 1,138 | Python | .py | 27 | 35 | 79 | 0.680254 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,488 | test_mutable_json_type.py | nylas_sync-engine/tests/general/test_mutable_json_type.py | """ Tests for our mutable JSON column type. """
from datetime import datetime
def test_mutable_json_type(db, config, default_account, folder):
"""
Test that FolderSync._sync_status which is a mutable JSON column is
updated as expected.
"""
from inbox.models.backends.imap import ImapFolderSyncSta... | 1,231 | Python | .py | 29 | 35.206897 | 79 | 0.698319 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,489 | test_draft_creation.py | nylas_sync-engine/tests/general/test_draft_creation.py | from inbox.sendmail.base import create_message_from_json, update_draft
def test_headers_presence(default_namespace, db):
data = {'subject': 'test draft', 'to': [{'email': 'karim@nylas.com'}]}
draft = create_message_from_json(data, default_namespace, db.session,
False)
... | 672 | Python | .py | 13 | 43.307692 | 74 | 0.67075 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,490 | test_category.py | nylas_sync-engine/tests/general/test_category.py | # -*- coding: utf-8 -*-
from inbox.models import Folder, Label
from inbox.models.category import sanitize_name
from inbox.models.constants import MAX_INDEXABLE_LENGTH
from tests.util.base import (add_fake_folder, add_fake_label, generic_account,
gmail_account, db)
__all__ = ['db', 'generic... | 1,828 | Python | .py | 36 | 44.861111 | 78 | 0.673228 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,491 | test_message_parsing.py | nylas_sync-engine/tests/general/test_message_parsing.py | # flake8: noqa: F401, F811
# -*- coding: utf-8 -*-
"""Sanity-check our construction of a Message object from raw synced data."""
import datetime
import pytest
from flanker import mime
from inbox.models import Message, Block
from inbox.util.blockstore import get_from_blockstore
from inbox.util.addr import parse_mimep... | 20,424 | Python | .py | 422 | 40.478673 | 94 | 0.649857 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,492 | test_paths.py | nylas_sync-engine/tests/general/test_paths.py | # Test path conversion functions.
from inbox.util.misc import imap_folder_path, fs_folder_path
def test_imap_folder_path():
assert imap_folder_path('a/b') == 'a.b'
assert imap_folder_path('a/b', separator='?') == 'a?b'
assert imap_folder_path('/A/b') == 'A.b'
assert imap_folder_path('/INBOX/b') == 'I... | 1,361 | Python | .py | 22 | 57.227273 | 97 | 0.646882 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,493 | test_filename_truncation.py | nylas_sync-engine/tests/general/test_filename_truncation.py | from inbox.models.message import _trim_filename
def test_filename_truncation():
# Note: test both 3-byte and 4-byte UTF8 chars to make sure truncation
# follows UTF8 boundaries.
uname = u'\U0001f1fa\U0001f1f8\u2678\U0001f602.txt'
assert _trim_filename(uname, 'a', max_len=8) == uname
assert _trim_f... | 1,208 | Python | .py | 19 | 58.736842 | 89 | 0.688345 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,494 | test_namespace.py | nylas_sync-engine/tests/general/test_namespace.py | import random
import gevent
from requests import Response
from pytest import fixture
from freezegun import freeze_time
from tests.util.base import (add_generic_imap_account, add_fake_thread, add_fake_message,
add_fake_calendar, add_fake_event, add_fake_folder,
... | 13,946 | Python | .py | 303 | 39.155116 | 91 | 0.684374 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,495 | test_address_canonicalization.py | nylas_sync-engine/tests/general/test_address_canonicalization.py | def test_canonicalization(db):
from inbox.models import Namespace, Account
ns = Namespace()
account = Account(namespace=ns,
email_address='lambda.the.ultimate@gmail.com')
db.session.add(account)
db.session.add(ns)
db.session.commit()
assert account.email_address == 'lam... | 960 | Python | .py | 20 | 41.35 | 78 | 0.681964 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,496 | test_required_folders.py | nylas_sync-engine/tests/general/test_required_folders.py | """ Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = None
imap_e... | 1,439 | Python | .py | 41 | 28.804878 | 70 | 0.673188 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,497 | test_html_parsing.py | nylas_sync-engine/tests/general/test_html_parsing.py | # -*- coding: utf-8 -*-
"""Regression tests for HTML parsing."""
from inbox.util.html import strip_tags
def test_strip_tags():
text = ('<div><script> AAH JAVASCRIPT</script><style> AAH CSS AHH</style>'
'check out this <a href="http://example.com">link</a> yo!</div>')
assert strip_tags(text).strip(... | 769 | Python | .py | 16 | 43.3125 | 78 | 0.66443 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,498 | test_concurrency.py | nylas_sync-engine/tests/general/test_concurrency.py | import time
import pytest
from gevent import GreenletExit
from gevent import socket
from inbox.util.concurrency import retry_with_logging
class MockLogger(object):
def __init__(self):
self.call_count = 0
def error(self, *args, **kwargs):
self.call_count += 1
class FailingFunction(object)... | 2,275 | Python | .py | 56 | 34.75 | 73 | 0.71097 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,499 | test_actions.py | nylas_sync-engine/tests/imap/test_actions.py | # flake8: noqa: F401, F811
# -*- coding: utf-8 -*-
import mock
import pytest
from flanker import mime
from inbox.actions.base import (change_labels, save_draft, update_draft,
delete_draft, create_folder, update_folder,
delete_folder, create_label, update_l... | 6,646 | Python | .py | 123 | 42.756098 | 89 | 0.618395 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |