Skip to content

Commit f078a86

Browse files
committed
Merge branch 'main' into minecode-pipeline-fixes
2 parents 8c90e97 + d95abb1 commit f078a86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+415
-356
lines changed

README.rst

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1-
==========
2-
The purldb
3-
==========
1+
======
2+
PurlDB
3+
======
44

5-
This purldb consists of these main tools:
5+
PurlDB provides tools to create and update a database of package metadata keyed by PURL (Package URL) and an API for the PURL data. PurlDB is an `AboutCode project <https://aboutcode.org>`_.
66

7-
- PackageDB that is the reference model (based on ScanCode toolkit) that contains package data with
8-
PURL (Package URLs) being a first class citizen.
9-
- MineCode that contains utilities to mine package repositories
10-
- MatchCode that contains utilities to index package metadata and resources for matching
11-
- MatchCode.io that provides package matching functionalities for codebases
12-
- ClearCode that contains utilities to mine Clearlydefined for package data
13-
- purldb-toolkit CLI utility and library to use the PurlDB, its API and various related libraries.
147

15-
These are designed to be used first for reference such that one can query for packages by purl and
16-
validate purl existence.
8+
Why Use PurlDB?
9+
===============
1710

18-
In the future, the collected packages will be used as reference for dependency resolution, as a
19-
reference knowledge base for all package data, as a reference for vulnerable range resolution and
20-
more.
11+
Take advantage of PurlDB to get fast pre-scanned metadata for popular software
12+
packages, integrated with other AboutCode projects.
2113

22-
Documentation
23-
-------------
14+
Getting Started
15+
===============
2416

25-
See https://aboutcode.readthedocs.io/projects/PURLdb/en/latest/ for PurlDB
26-
documentation.
17+
Instructions to get you up and running on your local machine are at `Getting Started <https://purldb.readthedocs.io/en/latest/>`_ .
2718

19+
The PurlDB documentation also provides:
20+
21+
- prerequisites for installing the software.
22+
- identification of the various tools that contribute to the PurlDB project, including `PackageDB <https://github.com/aboutcode-org/purldb/tree/main/packagedb>`_ , `MineCode <https://github.com/aboutcode-org/purldb/tree/main/minecode>`_, `MatchCode <https://github.com/aboutcode-org/purldb/tree/main/matchcode>`_, `purldb-toolkit <https://github.com/aboutcode-org/purldb-toolkit>`_ and others.
23+
- guidelines for contributing to code development.
24+
- how to get started with the REST API.
25+
- guidelines for contributing to code development.
2826

2927
Acknowledgements, Funding, Support and Sponsoring
30-
--------------------------------------------------------
28+
=================================================
3129

3230
This project is funded, supported and sponsored by:
3331

clearcode/cdutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from packageurl import PackageURL
3535

3636
"""
37-
ClearlyDefined utlities.
37+
ClearlyDefined utilities.
3838
"""
3939

4040
TRACE_FETCH = False
@@ -532,7 +532,7 @@ def str2coord(s):
532532
segments = s.strip(splitter).split(splitter)
533533
if is_urn or is_url:
534534
segments = segments[1:]
535-
# ignore extra segments for now beyond the 5 fisrt (such as the PR of a curation)
535+
# ignore extra segments for now beyond the 5 first (such as the PR of a curation)
536536
segments = segments[:5]
537537

538538
fields = (

clearcode/store_scans.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
"""
3636
The input is a bunch of scans from ClearlyDefined and
37-
the output is a bunch of git repositories with commited and
38-
pushed scans such that we balance the scans roughly evenly accross
37+
the output is a bunch of git repositories with committed and
38+
pushed scans such that we balance the scans roughly evenly across
3939
different repositories.
4040
4141
The primary reason for multiple repositories is size of a single
@@ -127,7 +127,7 @@ def get_cd_item_by_purl_hash(cd_items):
127127
def add_scancode_scan(repo, purl, scancode_scan):
128128
"""
129129
Save and commit scancode scan for purl to git repo.
130-
Return true if we commited else false
130+
Return true if we committed else false
131131
"""
132132
purl_data_dir = get_or_create_dir_for_purl(purl=purl, repo=repo)
133133
scancode_scan_path = purl_data_dir / "scancode-toolkit-scan.json"

clearindex/management/commands/run_clearindex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def handle(self, *args, **options):
161161
def map_definition(cditem):
162162
"""
163163
Map a CD definition. Return the Package created from a mapped CD definition
164-
or None if a Package could not be created or an Exception has occured.
164+
or None if a Package could not be created or an Exception has occurred.
165165
"""
166166
try:
167167
with transaction.atomic():
@@ -328,7 +328,7 @@ def str2coord(s):
328328
segments = s.strip(splitter).split(splitter)
329329
if is_urn or is_url:
330330
segments = segments[1:]
331-
# ignore extra segments for now beyond the 5 fisrt (such as the PR of a curation)
331+
# ignore extra segments for now beyond the 5 first (such as the PR of a curation)
332332
segments = segments[:5]
333333

334334
fields = (

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
restart: always
2020

2121
traefik:
22-
image: "traefik:v2.10"
22+
image: "traefik:v3.6.8"
2323
container_name: "traefik"
2424
hostname: "traefik"
2525
ports:

docs/source/_static/theme_overrides.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,50 @@ div.rst-content {
2424
margin-left: 0px;
2525
}
2626
}
27+
28+
.row {
29+
clear: both;
30+
}
31+
32+
.column img {
33+
border: 1px solid gray;
34+
}
35+
36+
@media only screen and (min-width: 1000px),
37+
only screen and (min-width: 500px) and (max-width: 768px) {
38+
39+
.column {
40+
padding-left: 5px;
41+
padding-right: 5px;
42+
float: left;
43+
}
44+
45+
.column3 {
46+
width: calc(33.3% - 10px);
47+
}
48+
49+
.column2 {
50+
width: calc(50% - 11px);
51+
position: relative;
52+
}
53+
54+
.column2:before {
55+
padding-top: 61.8%;
56+
content: "";
57+
display: block;
58+
float: left;
59+
}
60+
61+
.top-left {
62+
border-right: 1px solid var(--color-background-border);
63+
border-bottom: 1px solid var(--color-background-border);
64+
}
65+
66+
.top-right {
67+
border-bottom: 1px solid var(--color-background-border);
68+
}
69+
70+
.bottom-left {
71+
border-right: 1px solid var(--color-background-border);
72+
}
73+
}

docs/source/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
:orphan:
2+
13
.. include:: ../../CHANGELOG.rst

docs/source/conf.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
# If extensions (or modules to document with autodoc) are in another directory,
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
12-
#
13-
# import os
14-
# import sys
15-
# sys.path.insert(0, os.path.abspath('.'))
12+
import os
13+
import sys
1614

15+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "purldb_project.settings")
16+
sys.path.insert(0, os.path.abspath("../../."))
1717

1818
# -- Project information -----------------------------------------------------
1919

2020
project = "PurlDB"
21-
copyright = "nexB Inc. and others."
21+
copyright = "AboutCode, nexB Inc. and others."
2222
author = "AboutCode.org authors and contributors"
2323

2424

@@ -31,28 +31,18 @@
3131
"sphinx.ext.intersphinx",
3232
"sphinx_reredirects",
3333
"sphinx_rtd_theme",
34-
"sphinx_rtd_dark_mode",
3534
"sphinx.ext.extlinks",
3635
"sphinx_copybutton",
3736
"sphinx.ext.autodoc",
3837
"sphinx_rtd_dark_mode", # For the Dark Mode
3938
]
4039

4140

42-
# Redirects for olds pages
43-
# See https://documatt.gitlab.io/sphinx-reredirects/usage.html
44-
redirects = {}
45-
4641
# This points to aboutcode.readthedocs.io
4742
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
4843
# Link was created at commit - https://github.com/aboutcode-org/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
4944

5045
intersphinx_mapping = {
51-
"aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
52-
"scancode-workbench": (
53-
"https://scancode-workbench.readthedocs.io/en/develop/",
54-
None,
55-
),
5646
"scancode.io": (
5747
"https://scancodeio.readthedocs.io/en/latest/",
5848
None,
@@ -66,14 +56,13 @@
6656
# List of patterns, relative to source directory, that match files and
6757
# directories to ignore when looking for source files.
6858
# This pattern also affects html_static_path and html_extra_path.
69-
exclude_patterns = []
59+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7060

7161

7262
# -- Options for HTML output -------------------------------------------------
7363

7464
# The theme to use for HTML and HTML Help pages. See the documentation for
7565
# a list of builtin themes.
76-
#
7766
html_theme = "sphinx_rtd_theme"
7867

7968
# Add any paths that contain custom static files (such as style sheets) here,
@@ -85,7 +74,7 @@
8574

8675
html_context = {
8776
"display_github": True,
88-
"github_user": "nexB",
77+
"github_user": "aboutcode-org",
8978
"github_repo": "purldb",
9079
"github_version": "main", # branch
9180
"conf_py_path": "/docs/source/", # path in the checkout to the docs root

docs/source/contributing.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. _contributing:
24

35
Contributing to PurlDB
@@ -106,7 +108,7 @@ See also :ref:`testing` for module-specific testing commands.
106108

107109
**You must include a "Signed-off-by" to your commit messages**::
108110

109-
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
111+
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
110112

111113
4. **Your code is now ready to be pushed as a PR**
112114

@@ -124,7 +126,7 @@ overlooked. We value any suggestions to improve
124126

125127
.. tip::
126128
Our documentation is treated like code. Make sure to check our
127-
`writing guidelines <https://scancode-toolkit.readthedocs.io/en/stable/contribute/contrib_doc.html>`_
129+
`writing guidelines <https://scancode-toolkit.readthedocs.io/en/stable/getting-started/contribute/contributing-docs.html>`_
128130
to help guide new users.
129131

130132
Other Ways
@@ -140,7 +142,7 @@ questions, and interact with us and other community members on
140142
Helpful Resources
141143
-----------------
142144

143-
- Review our `comprehensive guide <https://scancode-toolkit.readthedocs.io/en/stable/contribute/index.html>`_
145+
- Review our `comprehensive guide <https://scancode-toolkit.readthedocs.io/en/stable/getting-started/contribute/index.html>`_
144146
for more details on how to add quality contributions to our codebase and documentation
145147
- Check this free resource on `how to contribute to an open source project on github <https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github>`_
146148
- Follow `this wiki page <https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>`_

docs/source/funding.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Funding
24
=======
35

0 commit comments

Comments
 (0)