Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-lister
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Development
swh-lister
Commits
1984037f
Commit
1984037f
authored
1 year ago
by
Franck Bret
Browse files
Options
Downloads
Patches
Plain Diff
Replace obsolete comment, improve docstring
parent
3e414c53
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!489
Add Julia Lister for listing Julia Packages
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/lister/julia/__init__.py
+2
-2
2 additions, 2 deletions
swh/lister/julia/__init__.py
swh/lister/julia/lister.py
+8
-4
8 additions, 4 deletions
swh/lister/julia/lister.py
with
10 additions
and
6 deletions
swh/lister/julia/__init__.py
+
2
−
2
View file @
1984037f
...
...
@@ -24,8 +24,8 @@ packaged releases using the Github release system.
As of July 2023 `Julia General registry`_ list 9714 packages names.
Origins retriev
ing
strategy
--------------------------
-
Origins retriev
al
strategy
--------------------------
To build a list of origins we clone the `Julia General registry`_ Git repository, then
read the `Registry.toml`_ file to get the path to packages directories.
...
...
This diff is collapsed.
Click to expand it.
swh/lister/julia/lister.py
+
8
−
4
View file @
1984037f
...
...
@@ -64,9 +64,9 @@ class JuliaLister(StatelessLister[JuliaListerPage]):
def
get_pages
(
self
)
->
Iterator
[
JuliaListerPage
]:
"""
Yield an iterator which returns
'
page
'
It uses the api endpoint provided by `https://registry.julia.io/packages`
to get a list of package names with an origin url that corresponds to Git
repository
.
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.
"""
...
...
@@ -76,7 +76,11 @@ class JuliaLister(StatelessLister[JuliaListerPage]):
yield
registry
[
"
packages
"
].
items
()
def
get_origins_from_page
(
self
,
page
:
JuliaListerPage
)
->
Iterator
[
ListedOrigin
]:
"""
Iterate on all pages and yield ListedOrigin instances
"""
"""
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.
"""
assert
self
.
lister_obj
.
id
is
not
None
assert
self
.
REPO_PATH
.
exists
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment