You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/docs/references/event.md
+74-28Lines changed: 74 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,64 +27,110 @@ All sources of event data are associated with a unique `event_source`. We are ad
27
27
28
28
Event types are used to classify activities that relate to a given artifact namespace. The following event types are currently supported:
29
29
30
-
### COMMIT_CODE
30
+
### Code Events
31
31
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:
33
33
34
-
###CONTRACT_INVOCATION_DAILY_COUNT
34
+
#### COMMIT_CODE
35
35
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.
37
37
38
-
###CONTRACT_INVOCATION_DAILY_L2_GAS_USED
38
+
#### FORKED
39
39
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.
41
41
42
-
###CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT
42
+
#### RELEASE_PUBLISHED
43
43
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.
45
45
46
-
###FORKED
46
+
#### STARRED
47
47
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.
49
49
50
-
### ISSUE_CLOSED
50
+
### Issue Events
51
51
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:
53
53
54
-
### ISSUE_OPENED
54
+
####ISSUE_OPENED
55
55
56
56
Represents the opening of a new issue in a repository. This event is used to track new problems or feature requests reported by users.
57
57
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
59
63
60
64
Represents the reopening of a previously closed issue in a repository. This event is used to track the reoccurrence or unresolved status of issues.
61
65
62
-
###PULL_REQUEST_CLOSED
66
+
#### ISSUE_COMMENT
63
67
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.
65
69
66
-
### PULL_REQUEST_MERGED
70
+
### Pull Request Events
67
71
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:
69
73
70
-
### PULL_REQUEST_OPENED
74
+
####PULL_REQUEST_OPENED
71
75
72
76
Represents the opening of a new pull request in a repository. This event is used to track proposed changes to the codebase.
73
77
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
75
87
76
88
Represents the reopening of a previously closed pull request in a repository. This event is used to track the reconsideration of proposed code changes.
77
89
78
-
###STARRED
90
+
#### PULL_REQUEST_REVIEW_COMMENT
79
91
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.
81
93
82
-
##NPM Events
94
+
### Onchain Events
83
95
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.
87
133
88
-
All NPM events are associated with a unique NPM package. The following NPM events are currently supported:
134
+
#### DOWNLOADS
89
135
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.
Copy file name to clipboardExpand all lines: apps/docs/docs/references/impact-metrics/dependencies.md
+29-67Lines changed: 29 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,7 @@ sidebar_position: 5
8
8
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.
9
9
:::
10
10
11
-
:::warning
12
-
These metrics are currently in development.
13
-
:::
14
-
15
-
## Direct vs. Indirect Dependents
11
+
## Dependency Types
16
12
17
13
---
18
14
@@ -21,83 +17,49 @@ Dependents can be categorized as:
21
17
-**Direct Dependents**: Projects that directly include the parent package in their list of dependencies.
22
18
-**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.
23
19
24
-
## Developer Dependencies
20
+
## Data Sources
25
21
26
22
---
27
23
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:
31
25
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**
44
31
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.
48
36
49
-
For Open Source Observer, we've set the following constraints for our dependency analysis:
37
+
3.**Downloads from Package Registries**
50
38
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.
53
42
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`
55
46
56
-
## Example
47
+
Here is a [tutorial](../../tutorials/dependencies) on how to work with OSO dependency datasets.
57
48
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.
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:
82
54
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.
84
58
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
100
60
101
61
---
102
62
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)
0 commit comments