Page MenuHomeSoftware Heritage

Migrate from vcversioner to setuptools-scm
ClosedPublic

Authored by ardumont on Jul 8 2020, 10:24 AM.

Details

Summary

It's started at "(while i'm in the repository ¯\_(ツ)_/¯)"...

In the process, some more stuff needed to be done:

  • drop the symbolic links on the tests data resource folder which would not agree with setuptools-scm otherwise [1]
  • add mypy stanza to ignore tenacity stuff (so i could commit)

[1] https://forge.softwareheritage.org/D3458#84993

Related to T2105

Test Plan

tox

Diff Detail

Repository
rDDEP Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D3458 (id=12235)

Could not rebase; Attempt merge onto c586ff1740...

Updating c586ff17..96b850e5
Fast-forward
 requirements-swh-server.txt                        |  2 +-
 setup.py                                           |  4 ++--
 swh/deposit/api/private/deposit_read.py            |  8 +++----
 swh/deposit/api/private/deposit_update_status.py   | 10 ++++----
 swh/deposit/migrations/0018_migrate_swhids.py      | 28 +++++++++++-----------
 .../api/test_deposit_private_update_status.py      |  8 +++----
 swh/deposit/tests/conftest.py                      | 10 ++++----
 7 files changed, 34 insertions(+), 36 deletions(-)
Changes applied before test
commit 96b850e5db1dde310dc0dec9dec24c8feb5595d1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 8 10:24:21 2020 +0200

    Migrate from vcversioner to setuptools-scm
    
    Related to T2105

commit 724100409e02940bcdfd29cfe120a812388d50ee
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 8 10:08:20 2020 +0200

    Migrate to new swhid naming
    
    It is deprecated since model 0.3.8.
    
    Related to D3419

Link to build: https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/42/
See console output for more information: https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/42/console

Build has failed

ah, apparently:

creating build/lib/swh/deposit/tests/cli/data
10:24:59    error: can't copy 'swh/deposit/tests/cli/data/atom': doesn't exist or not a regular file
10:24:59    ----------------------------------------
10:24:59    ERROR: Failed building wheel for swh.deposit
10:24:59  Failed to build swh.deposit
10:24:59  ERROR: Could not build wheels for swh.deposit which use PEP 517 and cannot be installed directly

"data" symbolic link is not supported out of the box:

ls -lah swh/deposit/tests/cli/data
total 8.0K
drwxr-xr-x 2 tony tony 4.0K May  7 15:04 .
drwxr-xr-x 3 tony tony 4.0K Jul  2 14:22 ..
lrwxrwxrwx 1 tony tony   15 May  7 15:04 atom -> ../../data/atom

There is at least 2 to avoid duplication in there.
I'll adapt.

Make deposit tests and setuptools-scm agree

(drop symbolic links and use datadir pytest fixture override to allow tests to
find their data resources).

ardumont edited the summary of this revision. (Show Details)

Build is green

Patch application report for D3458 (id=12236)

Could not rebase; Attempt merge onto c586ff1740...

Updating c586ff17..063110d1
Fast-forward
 mypy.ini                                           |  3 +++
 requirements-swh-server.txt                        |  2 +-
 setup.py                                           |  4 ++--
 swh/deposit/api/private/deposit_read.py            |  8 +++----
 swh/deposit/api/private/deposit_update_status.py   | 10 ++++----
 swh/deposit/migrations/0018_migrate_swhids.py      | 28 +++++++++++-----------
 swh/deposit/tests/api/conftest.py                  |  9 ++++++-
 swh/deposit/tests/api/data/atom                    |  1 -
 .../api/test_deposit_private_update_status.py      |  8 +++----
 swh/deposit/tests/cli/data/atom                    |  1 -
 swh/deposit/tests/cli/test_client.py               |  6 +++++
 swh/deposit/tests/conftest.py                      | 10 ++++----
 12 files changed, 51 insertions(+), 39 deletions(-)
 delete mode 120000 swh/deposit/tests/api/data/atom
 delete mode 120000 swh/deposit/tests/cli/data/atom
Changes applied before test
commit 063110d1d4cdef5b2b39994eaa3a8f1ad65d3f60
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 8 10:24:21 2020 +0200

    Migrate from vcversioner to setuptools-scm
    
    Related to T2105

commit 724100409e02940bcdfd29cfe120a812388d50ee
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 8 10:08:20 2020 +0200

    Migrate to new swhid naming
    
    It is deprecated since model 0.3.8.
    
    Related to D3419

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

This revision is now accepted and ready to land.Jul 8 2020, 11:17 AM