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

NXDRIVE-2276: [Direct Transfer] Introduce the notion of sessions #1944

Merged
merged 1 commit into from Sep 4, 2020

Conversation

rom1win
Copy link
Contributor

@rom1win rom1win commented Aug 20, 2020

When doing a Direct Transfer, the files/folders should to be
tight to a session.
A new migration has been added to handle the Sessions.

A test for the migration has been added.

An old_functionnal test has been added to check the session
creation/update system.

@nuxeojenkins
Copy link
Contributor

View issue in JIRA: NXDRIVE-2276: [Direct Transfer] Introduce the notion of sessions

@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch from 26b230d to 70ecdca Compare August 21, 2020 13:16
@BoboTiG BoboTiG added this to the 4.4.6 milestone Aug 25, 2020
@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch 3 times, most recently from 9a9188e to fd25507 Compare September 2, 2020 13:35
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/objects.py Outdated Show resolved Hide resolved
tests/old_functional/test_direct_transfer.py Outdated Show resolved Hide resolved
tests/old_functional/test_direct_transfer.py Show resolved Hide resolved
@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch 4 times, most recently from 5e55911 to fabf1e5 Compare September 3, 2020 14:50
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/engine.py Outdated Show resolved Hide resolved
nxdrive/objects.py Outdated Show resolved Hide resolved
@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch from fabf1e5 to 1b4d3b3 Compare September 3, 2020 16:13
nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
nxdrive/engine/dao/sqlite.py Show resolved Hide resolved
@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch from 1b4d3b3 to 2d97f83 Compare September 4, 2020 09:09
Copy link
Contributor

@BoboTiG BoboTiG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems good 👍

nxdrive/engine/dao/sqlite.py Outdated Show resolved Hide resolved
@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch from 2d97f83 to 14bf5f4 Compare September 4, 2020 09:33
@BoboTiG BoboTiG modified the milestones: 4.4.6, 4.4.5 Sep 4, 2020
@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch from 14bf5f4 to 64a10c8 Compare September 4, 2020 13:02
When doing a Direct Transfer, the files/folders should to be
tight to a session.
A new migration has been added to handle the Sessions.

A test for the migration has been added.

An old_functionnal test has been added to check the session
creation/update system.
@rom1win rom1win force-pushed the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch from 64a10c8 to 771b33c Compare September 4, 2020 13:23
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 4, 2020

Sourcery Code Quality Report (beta)

❌  Merging this PR will decrease code quality in the affected files by 0.01 out of 10.

Quality metrics Before After Change
Complexity 2.67 2.65 -0.02 🔵
Method Length 62.22 62.65 0.43 🔴
Quality 8.48 8.47 -0.01 🔴
Other metrics Before After Change
Lines 6486 6658 172
Changed files Quality Before Quality After Quality Change
nxdrive/objects.py 8.09 8.07 -0.02 🔴
nxdrive/engine/engine.py 8.47 8.47 0.00
nxdrive/engine/processor.py 7.23 7.23 0.00
nxdrive/engine/dao/sqlite.py 8.80 8.80 0.00
tests/old_functional/test_direct_transfer.py 8.71 8.66 -0.05 🔴
tests/unit/test_engine_dao.py 8.23 8.22 -0.01 🔴

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Overall Recommendation
nxdrive/engine/processor.py Processor._execute 134 1036.03 0.05 Reduce complexity. Split out functionality
nxdrive/engine/processor.py Processor._synchronize_locally_created 98 887.25 0.20 Reduce complexity. Split out functionality
nxdrive/engine/dao/sqlite.py EngineDAO._migrate_db 31 521.83 2.30 Split out functionality
nxdrive/engine/processor.py Processor._synchronize_remotely_modified 33 322.78 2.49 Split out functionality
nxdrive/engine/processor.py Processor._synchronize_remotely_created 27 282.81 3.09 Split out functionality

Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@BoboTiG BoboTiG merged commit 06a3dc2 into master Sep 4, 2020
@BoboTiG BoboTiG deleted the wip-NXDRIVE-2276-dt-introduce-notion-of-sessions branch September 4, 2020 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants