Skip to content

Commit 0925599

Browse files
committed
Move files to proper location #1
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 4852137 commit 0925599

File tree

10 files changed

+63
-172
lines changed

10 files changed

+63
-172
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Changelog
2-
=========
2+
=============
33

44

5-
v0.0.0
6-
------
5+
v0.1.0 (October 20, 2025)
6+
---------------------------
77

8-
*xxxx-xx-xx* -- Initial release.
8+
- Initial release of the ``aboutcode.federated`` library based on
9+
original work in the ``aboutcode.hashid`` library.

README.rst

Lines changed: 44 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,69 @@
1-
A Simple Python Project Skeleton
2-
================================
1+
aboutcode.federated
2+
===================
33

4-
This repo attempts to standardize the structure of the Python-based project's
5-
repositories using modern Python packaging and configuration techniques.
6-
Using this `blog post`_ as inspiration, this repository serves as the base for
7-
all new Python projects and is mergeable in existing repositories as well.
4+
This is a library of utilities to compute ids and file paths for AboutCode
5+
federated data based on Package URL
86

9-
.. _blog post: https://blog.jaraco.com/a-project-skeleton-for-python-projects/
107

8+
Federated data utilities goal is to handle content-defined and hash-addressable
9+
Package data keyed by PURL stored in many Git repositories. This approach to
10+
federate decentralized data is called FederatedCode.
1111

12-
Usage
13-
=====
1412

15-
A brand new project
16-
-------------------
13+
Overview
14+
========
1715

18-
.. code-block:: bash
16+
The main design elements for these utilities are:
1917

20-
git init my-new-repo
21-
cd my-new-repo
22-
git pull git@github.com:nexB/skeleton
18+
1. **Data Federation**: A Data Federation is a database, representing a consistent,
19+
non-overlapping set of data kind clusters (like scans, vulnerabilities or SBOMs)
20+
across many package ecosystems, aka. PURL types.
21+
A Federation is similar to a traditional database.
2322

24-
# Create the new repo on GitHub, then update your remote
25-
git remote set-url origin git@github.com:nexB/your-new-repo.git
23+
2. **Data Cluster**: A Data Federation contains Data Clusters, where a Data Cluster
24+
purpose is to store the data of a single kind (like scans) across multiple PURL
25+
types. The cluster name is the data kind name and is used as the prefix for
26+
repository names. A Data Cluster is akin to a table in a traditional database.
2627

27-
From here, you can make the appropriate changes to the files for your specific project.
28+
3. **Data Repository**: A DataCluster contains of one or more Git Data Repository,
29+
each storing datafiles of the cluster data kind and a one PURL type, spreading
30+
the datafiles in multiple Data Directories. The name is data-kind +PURL-
31+
type+hashid. A Repository is similar to a shard or tablespace in a traditionale
32+
database.
2833

29-
Update an existing project
30-
---------------------------
34+
4. **Data Directory**: In a Repository, a Data Directory contains the datafiles for
35+
PURLs. The directory name PURL-type+hashid
3136

32-
.. code-block:: bash
37+
5. **Data File**: This is a Data File of the DataCluster's Data Kind that is
38+
stored in subdirectories structured after the PURL components::
3339

34-
cd my-existing-project
35-
git remote add skeleton git@github.com:nexB/skeleton
36-
git fetch skeleton
37-
git merge skeleton/main --allow-unrelated-histories
40+
namespace/name/version/qualifiers/subpath:
3841

39-
This is also the workflow to use when updating the skeleton files in any given repository.
42+
- Either at the level of a PURL name: namespace/name,
43+
- Or at the PURL version level namespace/name/version,
44+
- Or at the PURL qualifiers+PURL subpath level.
4045

41-
More usage instructions can be found in ``docs/skeleton-usage.rst``.
46+
A Data File can be for instance a JSON scan results file, or a list of PURLs in
47+
YAML.
4248

49+
For example, a list of PURLs as a Data Kind would stored at the name
50+
subdirectory level::
4351

44-
Release Notes
45-
=============
52+
gem-0107/gem/random_password_generator/purls.yml
4653

47-
- 2025-03-31:
54+
Or a ScanCode scan as a Data Kind at the version subdirectory level::
4855

49-
- Use ruff as the main code formatting tool, add ruff rules to pyproject.toml
56+
gem-0107/npm/file/3.24.3/scancode.yml
5057

51-
- 2025-03-29:
5258

53-
- Add support for beta macOS-15
54-
- Add support for beta windows-2025
5559

56-
- 2025-02-14:
60+
License
61+
-------
5762

58-
- Drop support for Python 3.8, add support in CI for Python 3.13, use Python 3.12 as default
59-
version.
63+
Copyright (c) AboutCode and others. All rights reserved.
6064

61-
- 2025-01-17:
65+
SPDX-License-Identifier: Apache-2.0
6266

63-
- Drop support for macOS-12, add support for macOS-14
64-
- Add support in CI for ubuntu-24.04
65-
- Add support in CI for Python 3.12
67+
See https://github.com/aboutcode-org/vulnerablecode for support or download.
6668

67-
- 2024-08-20:
68-
69-
- Update references of ownership from nexB to aboutcode-org
70-
71-
- 2024-07-01:
72-
73-
- Drop support for Python 3.8
74-
- Drop support for macOS-11, add support for macOS-14
75-
76-
- 2024-02-19:
77-
78-
- Replace support in CI of default ubuntu-20.04 by ubuntu-22.04
79-
80-
- 2023-10-18:
81-
82-
- Add dark mode support in documentation
83-
84-
- 2023-07-18:
85-
86-
- Add macOS-13 job in azure-pipelines.yml
87-
88-
- 2022-03-04:
89-
90-
- Synchronize configure and configure.bat scripts for sanity
91-
- Update CI operating system support with latest Azure OS images
92-
- Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party
93-
dependencies. There are now fewer scripts. See etc/scripts/README.rst for details
94-
95-
- 2021-09-03:
96-
- ``configure`` now requires pinned dependencies via the use of ``requirements.txt``
97-
and ``requirements-dev.txt``
98-
- ``configure`` can now accept multiple options at once
99-
- Add utility scripts from scancode-toolkit/etc/release/ for use in generating project files
100-
- Rename virtual environment directory from ``tmp`` to ``venv``
101-
- Update README.rst with instructions for generating ``requirements.txt``
102-
and ``requirements-dev.txt``, as well as collecting dependencies as wheels and generating
103-
ABOUT files for them.
104-
105-
- 2021-05-11:
106-
- Adopt new configure scripts from ScanCode TK that allows correct configuration of which
107-
Python version is used.
69+
See https://aboutcode.org for more information about AboutCode OSS projects.

setup.cfg

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[metadata]
2-
name = skeleton
2+
name = aboutcode.federated
33
license = Apache-2.0
44

55
# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
6-
description = skeleton
6+
description = "A library for AboutCode PURL-based federated identifiers"
77
long_description = file:README.rst
88
long_description_content_type = text/x-rst
9-
url = https://github.com/aboutcode-org/skeleton
9+
url = https://github.com/aboutcode-org/aboutcode.federated
1010

1111
author = nexB. Inc. and others
1212
author_email = info@aboutcode.org
@@ -20,7 +20,13 @@ classifiers =
2020
Topic :: Utilities
2121

2222
keywords =
23-
utilities
23+
purl
24+
Package-URL
25+
open source
26+
package
27+
sca
28+
scan
29+
hash
2430

2531
license_files =
2632
apache-2.0.LICENSE
@@ -40,6 +46,10 @@ include_package_data = true
4046
zip_safe = false
4147

4248
install_requires =
49+
packageurl_python == 0.17.6
50+
saneyaml == 0.6.1
51+
requests == 2.25.1
52+
uritemplate == 4.2.0
4353

4454

4555
[options.packages.find]

src/README.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/aboutcode/federated/CHANGELOG.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/aboutcode/federated/README.rst

Lines changed: 0 additions & 69 deletions
This file was deleted.

tests/README.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/__init__.py

Whitespace-only changes.

src/aboutcode/federated/tests/test_data/all-presets/foo/aboutcode-federated-config.yml renamed to tests/test_data/all-presets/foo/aboutcode-federated-config.yml

File renamed without changes.

src/aboutcode/federated/tests/test_federated.py renamed to tests/test_federated.py

File renamed without changes.

0 commit comments

Comments
 (0)