Skip to content

Commit cce9879

Browse files
committed
Improve CSS
Also streamline documentation index. Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
1 parent 28da568 commit cce9879

9 files changed

Lines changed: 143 additions & 45 deletions

File tree

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/conf.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
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

@@ -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": "abouctde-org",
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
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
:orphan:
2+
3+
Introduction
4+
=============
5+
6+
What can you do with PurlDB?
7+
------------------------------
8+
9+
- Build a comprehensive open source software packages knowledge base. This includes the extensive
10+
scan of the code of packages for origin, dependencies, embedded packages and licenses.
11+
12+
- Create advanced analysis for open source packages by collecting
13+
:ref:`symbols_and_strings`.
14+
15+
- Detect software supply chain issues by mapping package binaries to their corresponding source code
16+
and determining if there are possible discrepancies between sources and binaries (such as with the
17+
XZ utils attack, or sources and binaries, where package may not report the exact source code
18+
used to build binaries with the :ref:`deploy_to_devel` mapping analysis.
19+
20+
- Access multiple services keyed by PURL, such as metadata, package versions, packages URLs, or
21+
dependencies.
22+
23+
24+
What tools are available in PurlDB?
25+
-------------------------------------
26+
27+
The PurlDB project consists of these main tools:
28+
29+
- PackageDB that is the database and reference model (based on ScanCode toolkit)
30+
that contains package data with PURL (Package URLs) being a first class citizen and the primaty
31+
key to access information.
32+
33+
- MineCode that contains utilities to mine package repositories and populate the PackageDB
34+
35+
- MatchCode that contains utilities to index package metadata and resources for
36+
matching
37+
38+
- MatchCode.io that provides code package and files matching functionalities for codebases
39+
40+
- purldb-toolkit with its "purlcli" command line (CLI) utility and library to use the PurlDB, its
41+
API and various related libraries.
42+
43+
- ClearCode that contains utilities to mine Clearlydefined for package data.
44+
45+

docs/source/how-to-guides/index.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
:orphan:
2-
3-
How-To-Guides
1+
Tutorials
42
=============
53

6-
Here are the various how-to guides for various purldb modules designed to guide you
4+
Here are the various how-to guides for various PurlDB modules designed to guide you
75
through specific use cases:
86

97
.. toctree::

docs/source/index.rst

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ PurlDB Documentation
44
PurlDB provides tools to create and update a database of package metadata keyed by
55
PURL (Package URL) and an API for the PURL data. PurlDB is an `AboutCode project <https://aboutcode.org>`_.
66

7-
Details of the Package URL specification are available `here <https://github.com/package-url>`_.
8-
97
PurlDB offers:
108

119
- An active, continuously updated reference for FOSS packages origin, information and licensing,
@@ -15,6 +13,10 @@ PurlDB offers:
1513
- Additional utilities to help assess the quality and integrity of software packages as used in the
1614
software supply chain.
1715

16+
Details of the Package URL specification are available `here <https://github.com/package-url>`_.
17+
18+
PURL is the `official ECMA-427 standard <https://tc54.org/purl/>`_.
19+
1820

1921
Documentation overview
2022
~~~~~~~~~~~~~~~~~~~~~~
@@ -26,32 +28,40 @@ to help you know where to look for certain things.
2628

2729
.. rst-class:: column column2 top-left
2830

29-
3031
Getting started
3132
~~~~~~~~~~~~~~~~~~~~~~
3233

3334
Start here if you are new to PurlDB.
3435

35-
- :doc:`getting-started/index`
36+
- :doc:`getting-started/introduction`
37+
- :doc:`getting-started/install`
38+
- :doc:`getting-started/install-with-scio`
39+
- :doc:`getting-started/tasks`
40+
- :doc:`getting-started/usage`
3641

3742
.. rst-class:: column column2 top-right
3843

39-
40-
How-To
44+
Tutorials
4145
~~~~~~~~~~~~~~~~~~~~~~
4246

4347
Learn via practical step-by-step guides.
4448

4549
- :doc:`how-to-guides/index`
50+
- :doc:`how-to-guides/installation`
51+
- :doc:`how-to-guides/matchcode`
52+
- :doc:`how-to-guides/deploy_to_devel`
53+
- :doc:`how-to-guides/purl_watch_how_to`
54+
- :doc:`how-to-guides/symbols_and_strings`
4655

4756
.. rst-class:: column column2 bottom-left
4857

49-
Reference Docs
50-
~~~~~~~~~~~~~~~~~~
58+
Code Matching Reference
59+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5160

52-
Reference documentation for PurlDB features and customizations.
61+
Reference documentation for MatchCode features and customizations.
5362

5463
- :doc:`matchcode/index`
64+
- :doc:`matchcode/matchcode-pipeline`
5565

5666
.. rst-class:: column column2 bottom-right
5767

@@ -60,7 +70,9 @@ Explanations
6070

6171
Consult the reference to understand PurlDB concepts.
6272

63-
- :doc:`purldb/index`
73+
- :doc:`purldb/purl_watch`
74+
- :doc:`purldb/rest_api`
75+
- :doc:`purldb/symbol_and_string_collection`
6476

6577
.. rst-class:: row clearfix
6678

@@ -86,3 +98,13 @@ Indices and tables
8698
:maxdepth: 2
8799
:hidden:
88100

101+
getting-started/index
102+
matchcode/index
103+
how-to-guides/index
104+
purldb/index
105+
contributing
106+
changelog
107+
license
108+
testing
109+
110+

docs/source/matchcode/index.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
:orphan:
22

3-
===========
4-
Matchcode
5-
===========
3+
===============================
4+
Code Matching Reference
5+
===============================
66

77
MatchCode.io
88
------------
@@ -11,14 +11,11 @@ MatchCode.io is a Django app, based off of ScanCode.io, that exposes one API
1111
endpoint, ``api/matching``, which takes a ScanCode.io codebase scan, and
1212
performs Package matching on it.
1313

14-
Currently, it performs three matching steps, using the PackageDB indices:
14+
MatchCode performs three matching steps, using the PackageDB indices:
1515

1616
* Match codebase files against whole Packages archives
1717
* Match exactly codebase files against files
1818
* Match codebase directories exactly and approximately against directory indices
19-
20-
Upcoming features include:
21-
2219
* Match codebase files approximately
2320
* Match codebase file fragments (aka. snippets) including attempting to match AI-generated code
2421

@@ -48,8 +45,8 @@ endpoint are routed to the MatchCode.io service.
4845
To run PurlDB and Matchcode.io with Docker:
4946
::
5047

51-
docker compose -f docker-compose.yml up -d
52-
docker compose -f docker-compose.matchcodeio.yml up -d
48+
docker compose -f docker-compose.yml up -d
49+
docker compose -f docker-compose.matchcodeio.yml up -d
5350

5451

5552
Scancode.io pipeline

docs/source/purldb/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:orphan:
22

3-
PURLdb
4-
======
3+
Explanations
4+
======================
55

66
.. toctree::
77
:maxdepth: 2

docs/source/purldb/rest_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _rest_api:
22

3-
REST API
4-
========
3+
Understanding the PurlDB REST API
4+
====================================
55

66
To get started with the REST API, visit the **PurlDB API endpoints** at
77
http://localhost/api/ or http://localhost:8001/api/ if you run on a

docs/source/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Here is how to run the tests for each PurlDB modules.
1010
PurlDB tests
1111
-------------
1212

13-
Run all PURLdb tests
13+
Run all PurlDB tests
1414
~~~~~~~~~~~~~~~~~~~~
1515

1616
.. code-block:: console

0 commit comments

Comments
 (0)