Page MenuHomeSoftware Heritage

Create swh-perfecthash module
Closed, ResolvedPublic

Description

Event Timeline

olasd triaged this task as Normal priority.Oct 6 2021, 3:38 PM
olasd created this task.
olasd changed the task status from Open to Work in Progress.Oct 6 2021, 3:52 PM
olasd updated the task description. (Show Details)

@olasd these are the failed dependencies you told me to expect, right? The missing package is ... libcmph-dev.

16:26:08    In file included from build/temp.linux-x86_64-3.7/_hash_cffi.c:570:
16:26:08    ./swh/perfecthash/hash.h:1:10: fatal error: cmph.h: No such file or directory
16:26:08     #include <cmph.h>
16:26:08              ^~~~~~~~
16:26:08    compilation terminated.
16:26:08    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@olasd I'd like to add dependencies to the CI job running swh-perfecthash (valgrind) so that it can verify the C implementation is clean. Would you be so kind as to point me in the right direction? I looked in https://forge.softwareheritage.org/source/swh-jenkins-jobs but could not find the keyword cmph and concluded it must be in another repository.

@olasd thanks for adding the dependencies 🎉 D6545

Now there is a need to run tox -e c for this job only. I think it means doing something similar to running mypy but not for all jobs, just this one. I'd be grateful if you could point me in the right direction.

For the record, the documentation is disabled for now (see 1 and 2). I'll try to get it to build.

I pushed https://forge.softwareheritage.org/D6700 for inclusion in the documentation and from the output of

cd swh-docs
SPHINXOPTCOLOR='--no-color' tox -e sphinx
firefox docs/_build/html/

It looks ok.

Except for one thing (which is the main thing really 😓 ): the API reference is missing. I don't see an error that would explain why and I see swh-environment/swh-perfecthash/docs/apidoc/swh.perfecthash.rst exists and should be taken into account. Any idea as to why this is happening?

I've read https://docs.softwareheritage.org/sysadm/deployment/howto-debian-packaging.html to figure out what should be done to complete the "Bootstrap Debian packaging" part which does not show in the pool https://debian.softwareheritage.org/pool/main/s/ . I think to understand this is done by a job in https://forge.softwareheritage.org/source/swh-jenkins-jobs/, presumably https://forge.softwareheritage.org/source/swh-jenkins-jobs/browse/master/jobs/swh-packages.yaml$196 but... it's not happening

Update: according to @olasd there is no immediate need to complete this step as the initial deployment will not need debian packages.

The documentation now shows as expected. The previous problems in rendering it were probably because the package was not published.

@olasd I split the debian packaging in its own task at T3797 so that this task can be closed. I'll let you revert this if you think it is not appropriate. My rationale is that it would be easier to figure out what's left to be done with this one other task. Rather than coming back to this rather overloaded ticket. But it's just a matter of personal taste :-)