swh.lister.julia.lister module#

class swh.lister.julia.lister.JuliaLister(scheduler: SchedulerInterface, url: str = 'https://github.com/JuliaRegistries/General.git', instance: str = 'julia', credentials: Dict[str, Dict[str, List[Dict[str, str]]]] | None = None, max_origins_per_page: int | None = None, max_pages: int | None = None, enable_origins: bool = True)[source]#

Bases: StatelessLister[List[Tuple[str, Any]]]

List Julia packages origins

LISTER_NAME: str = 'julia'#
VISIT_TYPE = 'git'#
INSTANCE = 'julia'#
REPO_URL = 'https://github.com/JuliaRegistries/General.git'#
REPO_PATH = PosixPath('/tmp/tmp_z_u8ho_/General')#
REGISTRY_PATH = PosixPath('/tmp/tmp_z_u8ho_/General/Registry.toml')#
get_registry_repository() None[source]#

Get Julia General Registry Git repository up to date on disk

get_pages() Iterator[List[Tuple[str, Any]]][source]#

Yield an iterator which returns ‘page’

To build a list of origins the Julia General registry Git repository is cloned to get a Registry.toml file, an index file of packages directories.

There is only one page that list all origins urls.

get_origins_from_page(page: List[Tuple[str, Any]]) Iterator[ListedOrigin][source]#

Iterate on all pages and yield ListedOrigin instances

Each directory of the Git repository have a Package.toml file from where we get the Git repository url for each package.

finalize() None[source]#

Custom hook to finalize the lister state before returning from the main loop.

This method must set updated if the lister has done some work.

If relevant, this method can use :meth`get_state_from_scheduler` to merge the current lister state with the one from the scheduler backend, reducing the risk of race conditions if we’re running concurrent listings.

This method is called in a finally block, which means it will also run when the lister fails.