swh.lister.julia package#

Submodules#

Module contents#

Julia lister#

Julia is a dynamic language for scientific computing applications. It comes with an ecosystem of packages managed with its internal package manager Pkg.

A list of all officially registered packages can be found in the Julia General Registry on GitHub, but it’s easier to search for packages using the JuliaHub and Julia Packages sites.

The Julia lister lists origins from a Git repository, the Julia General registry. The main Registry.toml file list available Julia packages. Each directory match a package name and have Toml files to describe the package and its versions.

Julia origins are Git repositories hosted on Github. Each repository must provide its packaged releases using the Github release system.

As of July 2023 Julia General registry list 9714 packages names.

Origins retrieval strategy#

To build a list of origins we clone the Julia General registry Git repository, then walk through commits with the help of Dulwich to detect commit related to a new package or a new version of a package. For each of those commits we get the path to Package.toml file from where we get the Git repository url for a package.

Page listing#

There is only one page listing all origins url.

Origins from page#

The lister yields all origins url from one page.

Each time the lister is executed, the HEAD commit id of Julia General registry is stored as state.last_seen_commit and used on next run to retrieve new origins since the last commit.

Each url corresponds to the Git url of the package repository.

Running tests#

Activate the virtualenv and run from within swh-lister directory:

pytest -s -vv --log-cli-level=DEBUG swh/lister/julia/tests

Testing with Docker#

Change directory to swh/docker then launch the docker environment:

docker compose up -d

Then schedule a julia listing task:

docker compose exec swh-scheduler swh scheduler task add -p oneshot list-julia

You can follow lister execution by displaying logs of swh-lister service:

docker compose logs -f swh-lister
swh.lister.julia.register()[source]#