Skip to content

Commit 558e8ea

Browse files
authored
chore(docs): update dependencies and event types docs (#2894)
1 parent c20a9cf commit 558e8ea

File tree

3 files changed

+103
-120
lines changed

3 files changed

+103
-120
lines changed

apps/docs/docs/references/event.md

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,64 +27,110 @@ All sources of event data are associated with a unique `event_source`. We are ad
2727

2828
Event types are used to classify activities that relate to a given artifact namespace. The following event types are currently supported:
2929

30-
### COMMIT_CODE
30+
### Code Events
3131

32-
Represents a commit made to a code repository. This event is used to track changes in the source code over time.
32+
These events track activities related to source code management and collaboration:
3333

34-
### CONTRACT_INVOCATION_DAILY_COUNT
34+
#### COMMIT_CODE
3535

36-
Represents the daily count of contract invocations. This event is used to track the frequency of contract interactions on the blockchain.
36+
Represents a commit made to a code repository. This event is used to track changes in the source code over time.
3737

38-
### CONTRACT_INVOCATION_DAILY_L2_GAS_USED
38+
#### FORKED
3939

40-
Represents the total gas used in contract invocations on Layer 2 networks on a daily basis. This event helps track the resource consumption of contract executions.
40+
Represents the event when a repository is forked. This event is used to track the distribution and branching of the source code.
4141

42-
### CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT
42+
#### RELEASE_PUBLISHED
4343

44-
Represents the daily count of successful contract invocations. This event is used to measure the success rate of contract executions on the blockchain.
44+
Represents the publication of a new release version of the software.
4545

46-
### FORKED
46+
#### STARRED
4747

48-
Represents the event when a repository is forked. This event is used to track the distribution and branching of the source code.
48+
Represents the starring of a repository by a user. This event is used to track the popularity and user interest in the repository.
4949

50-
### ISSUE_CLOSED
50+
### Issue Events
5151

52-
Represents the closing of an issue in a repository. This event is used to track the resolution and management of reported issues.
52+
These events track the lifecycle of issues in a repository:
5353

54-
### ISSUE_OPENED
54+
#### ISSUE_OPENED
5555

5656
Represents the opening of a new issue in a repository. This event is used to track new problems or feature requests reported by users.
5757

58-
### ISSUE_REOPENED
58+
#### ISSUE_CLOSED
59+
60+
Represents the closing of an issue in a repository. This event is used to track the resolution and management of reported issues.
61+
62+
#### ISSUE_REOPENED
5963

6064
Represents the reopening of a previously closed issue in a repository. This event is used to track the reoccurrence or unresolved status of issues.
6165

62-
### PULL_REQUEST_CLOSED
66+
#### ISSUE_COMMENT
6367

64-
Represents the closing of a pull request in a repository. This event is used to track the finalization and rejection of proposed code changes.
68+
Represents a comment made on an issue in a repository.
6569

66-
### PULL_REQUEST_MERGED
70+
### Pull Request Events
6771

68-
Represents the merging of a pull request into the main branch of a repository. This event is used to track the integration of code changes.
72+
These events track the lifecycle of pull requests:
6973

70-
### PULL_REQUEST_OPENED
74+
#### PULL_REQUEST_OPENED
7175

7276
Represents the opening of a new pull request in a repository. This event is used to track proposed changes to the codebase.
7377

74-
### PULL_REQUEST_REOPENED
78+
#### PULL_REQUEST_CLOSED
79+
80+
Represents the closing of a pull request in a repository. This event is used to track the finalization and rejection of proposed code changes.
81+
82+
#### PULL_REQUEST_MERGED
83+
84+
Represents the merging of a pull request into the main branch of a repository. This event is used to track the integration of code changes.
85+
86+
#### PULL_REQUEST_REOPENED
7587

7688
Represents the reopening of a previously closed pull request in a repository. This event is used to track the reconsideration of proposed code changes.
7789

78-
### STARRED
90+
#### PULL_REQUEST_REVIEW_COMMENT
7991

80-
Represents the starring of a repository by a user. This event is used to track the popularity and user interest in the repository.
92+
Represents a comment made during the review of a pull request.
8193

82-
## NPM Events
94+
### Onchain Events
8395

84-
:::warning
85-
This section is currently in development.
86-
:::
96+
These events track blockchain-related activities:
97+
98+
#### CONTRACT_INVOCATION_DAILY_COUNT
99+
100+
Represents the daily count of contract invocations. This event is used to track the frequency of contract interactions on the blockchain.
101+
102+
#### CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT
103+
104+
Represents the daily count of successful contract invocations. This event is used to measure the success rate of contract executions on the blockchain.
105+
106+
#### CONTRACT_INVOCATION_DAILY_L2_GAS_USED
107+
108+
Represents the total gas used in contract invocations on Layer 2 networks on a daily basis. This event helps track the resource consumption of contract executions.
109+
110+
### Financial Events
111+
112+
These events track financial transactions:
113+
114+
#### GRANT_RECEIVED_USD
115+
116+
Represents the receipt of a grant in USD equilvalent; currently only available for sources listed in [oss-funding](https://github.com/opensource-observer/oss-funding).
117+
118+
#### CREDIT
119+
120+
Represents an incoming financial transaction or credit to an account; currently only available for Open Collective.
121+
122+
#### DEBIT
123+
124+
Represents an outgoing financial transaction or debit from an account; currently only available for Open Collective.
125+
126+
### Dependency Events
127+
128+
These events track package dependencies:
129+
130+
#### ADD_DEPENDENCY
131+
132+
Represents the addition of a new dependency to a project.
87133

88-
All NPM events are associated with a unique NPM package. The following NPM events are currently supported:
134+
#### DOWNLOADS
89135

90-
- Downloads: A snapshot of the number of downloads for an NPM package on a given date.
136+
Represents the number of downloads for a package on a given date according to the package manager's public data.

apps/docs/docs/references/impact-metrics/dependencies.md

Lines changed: 29 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ sidebar_position: 5
88
OSO tracks the dependency graph among projects in a collection or ecosystem. A **dependency** is a software package, module, or project that another project requires to function properly. Conversely, a **dependent** is a project that includes a specific package as its dependency. These metrics can highlight the usefulness of a given open source software project to other projects in the ecosystem.
99
:::
1010

11-
:::warning
12-
These metrics are currently in development.
13-
:::
14-
15-
## Direct vs. Indirect Dependents
11+
## Dependency Types
1612

1713
---
1814

@@ -21,83 +17,49 @@ Dependents can be categorized as:
2117
- **Direct Dependents**: Projects that directly include the parent package in their list of dependencies.
2218
- **Indirect Dependents**: Projects that rely on the parent package through an intermediary package. For example, if Package A depends on Package B, and Package B relies on Package C, then Package A is an indirect dependent of Package C.
2319

24-
## Developer Dependencies
20+
## Data Sources
2521

2622
---
2723

28-
Many package managers, such as npm and Crates, distinguish between production code dependencies and **developer dependencies** that are only needed for local development and testing.
29-
30-
Below is an example of an npm `package.json` file with developer dependencies:
24+
OSO indexes software dependencies using multiple data sources:
3125

32-
```
33-
"name": "my_package",
34-
"version": "1.0.0",
35-
"dependencies": {
36-
"my_dep": "^1.0.0",
37-
"another_dep": "~2.2.0"
38-
},
39-
"devDependencies" : {
40-
"my_test_framework": "^3.1.0",
41-
"another_dev_dep": "1.0.0 - 1.2.0"
42-
}
43-
```
26+
1. **GitHub Software Bill of Materials (SBOMs)**
27+
- Extracted via [GitHub’s SBOM API](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/exporting-a-software-bill-of-materials-for-your-repository)
28+
- Includes direct and indirect dependencies
29+
- Does not support all languages, but is largely complete for JavaScript/TypeScript, Python, Rust, and Go.
30+
2. **Package Metadata and Historical Events**
4431

45-
## Constraints on Dependency Analysis
46-
47-
---
32+
- Retrieved from the [deps.dev](https://deps.dev) public dataset.
33+
- Used to map package versions to their maintainers and track add/remove events between packages.
34+
- Covers major package registries (npm, PyPI, Crates.io, Go modules).
35+
- Includes dependency depth charts up to 10 levels deep; we typically only use the first 3 levels.
4836

49-
For Open Source Observer, we've set the following constraints for our dependency analysis:
37+
3. **Downloads from Package Registries**
5038

51-
1. Only direct dependents are considered, excluding indirect ones.
52-
2. Dependency analysis is restricted to specific collections or the union of specific collection sets. This ensures a more manageable indexing process and a clearer understanding of critical package relationships within an ecosystem.
39+
- Fetched by API from npm and from public datasets for PyPI and Crates.io.
40+
- Track downloads and fetch metadata from select package registries
41+
- Artifacts must be listed in a project's OSS Directory file in order to have these metrics indexed.
5342

54-
Without such constraints, certain packages might appear as indirect dependents or dependencies for a vast majority of open source projects.
43+
4. **OSO Public Datasets**
44+
- OSO provides SQL-based access to indexed dependency data in `oso_production.sboms_v0`
45+
- Maintainer repositories are tracked in `oso_production.package_owners_v0`
5546

56-
## Example
47+
Here is a [tutorial](../../tutorials/dependencies) on how to work with OSO dependency datasets.
5748

58-
> Note: This is a hypothetical example. Real-world examples based on actual dependency graphs will be added soon.
59-
60-
Consider a collection of "Ethereum Developer Tools" with projects like `ethers` and `wagmi` and another collection called "Optimism Applications" with projects like `velodrome-finance` and `zora`. If `velodrome-finance` depends on `ethers`, and `zora` depends on both `ethers` and `wagmi`, then `ethers` has two dependents, and `wagmi` has one.
61-
62-
```
63-
Ecosystems: Ethereum Developer Tools & Optimism Applications
64-
|
65-
|----> Project: ethers
66-
| |
67-
| |----> Dependent: velodrome-finance
68-
| |----> Dependent: zora
69-
|
70-
|----> Project: wagmi
71-
|
72-
|----> Dependent: zora
73-
```
74-
75-
## Dependent Metrics
49+
## Limitations
7650

7751
---
7852

79-
In addition to mapping projects and their dependents, we also capture the following data about a project's dependents:
80-
81-
### Current Dependents
53+
Dependency data is not always complete. Here are some of the limitations:
8254

83-
Count of dependent projects as of the most recent indexing run. These may also be referred to as "downstream dependencies" or "reverse dependencies".
55+
- Published packages may change maintainers, which can cause discontinuities in the dependency graph.
56+
- Some languages are not well-supported by the data sources.
57+
- We rely on various sources, which have different indexing and data ingestion schedules. The latest changes may not always be reflected in the OSO production data.
8458

85-
### Current Dependencies
86-
87-
Count of dependencies as of the most recent indexing run. These may also be referred to as "upstream dependencies".
88-
89-
### Active Developer Dependents
90-
91-
Count of active developers of all dependent projects in the same collection.
92-
93-
### Active User Dependents
94-
95-
Count of active users of all dependent projects in the same collection.
96-
97-
### Fees Dependents
98-
99-
Total sequencer fees of all dependent projects in the same collection.
59+
## Contributing
10060

10161
---
10262

103-
To contribute new metrics, please see our guide [here](../../contribute-models/data-models)
63+
There is a vast amount that can be done on top of these data sources!
64+
65+
To contribute new metrics and models, please see our guide [here](../../contribute-models/data-models)

apps/docs/docs/references/impact-metrics/package.md

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

0 commit comments

Comments
 (0)