Skip to content
forked from JJ/raku-river

Raku::Ecosystem analyzes distributions in the Raku ecosystem assigning a "river" score depending on how "upstream" they are of other distributions.

License

Notifications You must be signed in to change notification settings

wolfsage/raku-river

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

NAME

Raku::Ecosystem - Obtains information from Raku modules in the ecosystem

SYNOPSIS

use Raku::Ecosystem;
my $eco = Raku::Ecosystem.new;

say $eco.modules;
say $eco.depended;
say $eco.depends-on;

And probably, the most interesting one:

say $eco.river-scores

These last give every distribution a score based on how far upstream they are from other distributions. A distribution depending on other will get a 1 score, for instance. A depends on B which depends on C will get a score of two, and so on.

DESCRIPTION

A tool to analyze the Raku ecosystem by downloading all modules and finding out how they depend on each other. Main objective is to find the chain of dependencies, but also find out the core distributions in the ecosystem.

METHODS

method new( )

Creates the object, downloading and filling it with information. Error output goes to /tmp/raku-eco-err.txt

method modules

Returns a hash with module names, dependencies and URLs.

method depended

Returns a hash with module names and the number of other modules it depends on.

method depends-on

Returns a hash with module names and its dependencies.

method river-scores --> Hash

Computes the "river-score" by looking at all dependency chains and giving a score according to the position. That is, if there's this dependency chain

Foo ← Bar ← Baz

Foo will have a 0 score for appearing in the first position (which is actually the module whose dependencies we're looking at), up to Baz which will have score equal to 2. The total score of every module is computed by adding up scores for every chain.

SEE ALSO

Raku module ecosystem.

KNOWN BUGS

It skips distributions if there's some error in META6.json. It also uses verbatim dependency specifications that are understood by zef but are somehow not standard, like Foo::Bar:ver(3).

AUTHOR

Alex Daniel, JJ Merelo [email protected]

COPYRIGHT AND LICENSE

Copyright 2018, 2020 Alex Daniel, JJ Merelo

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

About

Raku::Ecosystem analyzes distributions in the Raku ecosystem assigning a "river" score depending on how "upstream" they are of other distributions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 96.9%
  • Raku 3.0%
  • R 0.1%