Page MenuHomeSoftware Heritage

Delay import to allow proper debian packaging of the client code
ClosedPublic

Authored by ardumont on Aug 31 2021, 5:58 PM.

Details

Summary

The swh.graph.client and swh.graph.naive_client must be packaged separately to allow the
vault to use the optional graph dependency. We need the tests to run in the packaging
though. But the current conftest.py mixes both server and client code. Delaying
imports this way should allow the packaging to run accordingly [1].

[1]

pytest -k "not remote" swh/

Related to T3518

Test Plan

tox

Diff Detail

Repository
rDGRPH Compressed graph representation
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6167 (id=22339)

Rebasing onto 424e75a9d0...

Current branch diff-target is up to date.
Changes applied before test
commit 82e990fb8031e093236db529df1f143c9eeaacf1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:52:23 2021 +0200

    Change import to allow proper debian packaging
    
    The swh.graph.client and swh.graph.naive_client can be packaged separately. We need the
    test to run though and the current conftest mix everything. Delaying imports should
    allow the packaging.

commit a60b44f7326b1a29555aece8e00f544b602a84ab
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:54:39 2021 +0200

    Black formatting on java files

See https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/133/ for more details.

ardumont retitled this revision from wip: Change import to allow proper debian packaging to Delay import to allow proper debian packaging of the client code.Aug 31 2021, 6:08 PM
ardumont edited the summary of this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)

Rework commit message

Build is green

Patch application report for D6167 (id=22340)

Rebasing onto 424e75a9d0...

Current branch diff-target is up to date.
Changes applied before test
commit e314f9b93628c218a53cfa2a12df972a2737bcaa
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:54:39 2021 +0200

    Black formatting on java files

commit 8ee98828a0a7cfd6e5efb9472e46fcc412ecbb43
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:52:23 2021 +0200

    Delay import to allow proper debian packaging of the client code
    
    The swh.graph.client and swh.graph.naive_client must be packaged separately to allow the
    vault to use the optional graph dependency. We need the tests to run in the packaging
    though. But the the current conftest.py mixes both server and client code. Delaying
    imports this way should allow the packaging to run accordingly [1].
    
    [1]
pytest -k "not remote" swh/
```

Related to T3518
See https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/134/ for more details.
swh/graph/tests/conftest.py
40

the coverage report here lies, it's run locally (i know because i use some pdb stuff).

  • pre-commit java file formatting change (fix commit message)

Build is green

Patch application report for D6167 (id=22341)

Rebasing onto 424e75a9d0...

Current branch diff-target is up to date.
Changes applied before test
commit 3ac2fe2ac7b569101c2eb07d8b9ef705f22f4d92
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:54:39 2021 +0200

    pre-commit java file formatting change

commit 8ee98828a0a7cfd6e5efb9472e46fcc412ecbb43
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:52:23 2021 +0200

    Delay import to allow proper debian packaging of the client code
    
    The swh.graph.client and swh.graph.naive_client must be packaged separately to allow the
    vault to use the optional graph dependency. We need the tests to run in the packaging
    though. But the the current conftest.py mixes both server and client code. Delaying
    imports this way should allow the packaging to run accordingly [1].
    
    [1]
pytest -k "not remote" swh/
```

Related to T3518
See https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/135/ for more details.
This revision is now accepted and ready to land.Aug 31 2021, 6:25 PM

Rework commit message to fix typos and formulation.

Build is green

Patch application report for D6167 (id=22342)

Rebasing onto 424e75a9d0...

Current branch diff-target is up to date.
Changes applied before test
commit 2045e2c14672f4381e2f31d5a52518e8df862ec9
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:54:39 2021 +0200

    pre-commit java file formatting change

commit 4cc8f12f406e06cdb17b1929cbe1caed8b240d30
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Aug 31 17:52:23 2021 +0200

    Delay import to allow proper debian packaging of the client code
    
    The swh.graph.client and swh.graph.naive_client must be packaged separately to allow the
    vault to use the optional graph dependency. We need the tests to run in the packaging
    though. The current conftest.py mixes both server and client code though. Delaying
    imports this way will allow the packaging to run accordingly [1].
    
    [1]
pytest -k "not remote" swh/
```

Related to T3518
See https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/136/ for more details.