Skip to content

Commit

Permalink
docs: major reorg to new top level sections
Browse files Browse the repository at this point in the history
* This is not a complete rewrite of the docs, just moving things around
* Moves the top level folders to the right place and fixes all the
  broken links
* Needs subsequent PRs for content
  • Loading branch information
ryscheng committed Dec 13, 2024
1 parent 1eabcee commit 38c4c63
Show file tree
Hide file tree
Showing 99 changed files with 381 additions and 136 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ $ dbt run --select {name_of_the_model}

For setup and common operations for each subproject, navigate into the respective directory and check out the `README.md`.

You can also find some operations guides on our [documentation](https://docs.opensource.observer/docs/how-oso-works/ops/).
You can also find some operations guides on our [documentation](https://docs.opensource.observer/docs/guides/ops/).

## License

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/blog/2024-01-31-arb-ecosystem-analysis/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For those interested in a deeper dive, the Python notebooks used for data proces

In this report, we explore 345 OSS projects that are integral to the Arbitrum ecosystem. Their contributions range from open source code development to deploying smart contracts on Arbitrum One, thereby facilitating millions of transactions and generating significant sequencer fees.

As there is no centralized repository of all the projects and contributors in a decentralized network economy like Arbitrum, we developed a unique methodology to compile an initial directory of these entities. We invite your contributions to enhance this directory; please visit [here](https://github.com/opensource-observer/oss-directory) to submit a PR or [here](https://docs.opensource.observer/docs/contribute/) to learn more about how to contribute data about projects and their code artifacts.
As there is no centralized repository of all the projects and contributors in a decentralized network economy like Arbitrum, we developed a unique methodology to compile an initial directory of these entities. We invite your contributions to enhance this directory; please visit [here](https://github.com/opensource-observer/oss-directory) to submit a PR or [here](../../docs/projects/) to learn more about how to contribute data about projects and their code artifacts.

### Methodology for project identification

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/blog/2024-02-28-arbitrum-impact-pools/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The real value, however, lies in combining simple metrics in novel ways to filte

<!-- truncate -->

As described in [our previous post](https://docs.opensource.observer/blog/arb-ecosystem-analysis#methodology-for-project-identification), these projects were sourced primarily from the most recent [“Electric Capital Crypto Ecosystems Mapping”](https://github.com/electric-capital/crypto-ecosystems), from Dune Analytics, and from Plurality Labs partners including [Karma GAP](https://gap.karmahq.xyz/arbitrum/) and [OpenBlock Labs](https://www.openblocklabs.com/app/arbitrum/grantees). We invite your contributions to enhance this directory; please visit [here](https://github.com/opensource-observer/oss-directory) to submit a PR or [here](https://docs.opensource.observer/docs/contribute/) to learn more about how to contribute data about projects and their code artifacts.
As described in [our previous post](https://docs.opensource.observer/blog/arb-ecosystem-analysis#methodology-for-project-identification), these projects were sourced primarily from the most recent [“Electric Capital Crypto Ecosystems Mapping”](https://github.com/electric-capital/crypto-ecosystems), from Dune Analytics, and from Plurality Labs partners including [Karma GAP](https://gap.karmahq.xyz/arbitrum/) and [OpenBlock Labs](https://www.openblocklabs.com/app/arbitrum/grantees). We invite your contributions to enhance this directory; please visit [here](https://github.com/opensource-observer/oss-directory) to submit a PR or [here](../../docs/projects/) to learn more about how to contribute data about projects and their code artifacts.

## A word of caution

Expand All @@ -29,7 +29,7 @@ First, our data platform is still in active development. We just recently connec

Second, we are continuously iterating on our impact metrics. We hope the metrics included here illustrate what's possible to quickly identify trends among projects and relative performance levels. However, the metrics we chose should not be viewed as applicable to all projects or battle-tested against gamification. Similarly, the coefficients used to weight metrics in our impact pools are only intended to serve as starting points for further analysis.

If you have ideas for how to test and iterate on these types of impact metrics and pools, check out [our docs](https://docs.opensource.observer/docs/contribute/data-models) and send us a note.
If you have ideas for how to test and iterate on these types of impact metrics and pools, check out [our docs](../../docs/contribute-models/data-models) and send us a note.

## How pools are constructed

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/blog/2024-03-20-request-for-impact-metrics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you'd like to get involved, here's what to do:
1. Apply to [join the Data Collective](https://www.kariba.network/). It only takes a few minutes. We'll review, and reach out to schedule an onboarding call.
2. Join our [Discord server](https://www.opensource.observer/discord) and say hello.
3. Get inspiration from our Colab directory of [starter notebooks for impact metrics](https://drive.google.com/drive/folders/1I4exiLfZYgPwIGBEzuAMeGtJUhtS_DE7?usp=drive_link). We also have of them in our [Insights repo](https://github.com/opensource-observer/insights/tree/main/community/notebooks) if you prefer to run them locally.
4. Consult [our docs](https://docs.opensource.observer/docs/) and especially our [impact metric spec](https://docs.opensource.observer/docs/how-oso-works/impact-metrics/) as you prepare your analysis.
4. Consult [our docs](../../docs/) and especially our [impact metric spec](../../docs/guides/impact-metrics/) as you prepare your analysis.

The rest of this post includes more details on the types of impact metrics we're interested in.

Expand Down Expand Up @@ -62,7 +62,7 @@ _Metrics that attempt to differentiate onchain users based on behavior and trust

This is a hot topic right now, with a number of projects attempting to create reputation systems for onchain users. We're integrating with many of the leading projects and bringing the data they generate into the OSO data warehouse. From there, there are all sorts of directions you can take the analysis!

The **Onchain Activity** metric is a good starting point for new analysts. Have a look at our working definitions for [onchain users](https://docs.opensource.observer/docs/how-oso-works/impact-metrics/onchain_users) and help us create some better ones. The **Network Loyalty** is a spicy metric that will get even spicier as we add more networks to the OSO dataset!
The **Onchain Activity** metric is a good starting point for new analysts. Have a look at our working definitions for [onchain users](../../docs/guides/impact-metrics/onchain) and help us create some better ones. The **Network Loyalty** is a spicy metric that will get even spicier as we add more networks to the OSO dataset!

| Impact Metric | Description | Comments |
| :--------------- | :---------------------------------------------------- | :----------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Another foundational building block is a registry we maintain called [OSS Direct

Every project that applied for Retro Funding (and met eligibility criteria) is included in [OSS Directory](https://github.com/opensource-observer/oss-directory).

As described in [our docs](https://docs.opensource.observer/docs/how-oso-works/oss-directory/artifact), OSS Directory has one strict rule: an artifact can only belong to one project at a time. This means that a blockchain address or a repo cannot be included in multiple projects.
As described in [our docs](../../docs/guides/oss-directory/artifact), OSS Directory has one strict rule: an artifact can only belong to one project at a time. This means that a blockchain address or a repo cannot be included in multiple projects.

![image](./oss-directory.png)

Expand Down Expand Up @@ -116,7 +116,7 @@ We're excited to see how this type of model evolves and is extended for future u

## Developing the impact metrics

The following design principles guide the development and evolution of [impact metrics](https://docs.opensource.observer/docs/how-oso-works/impact-metrics/#principles):
The following design principles guide the development and evolution of [impact metrics](../../docs/guides/impact-metrics/#principles):

- Verifiability: Metrics should be based on public data that can be independently verified. They should not rely on proprietary data sources or private APIs.
- Reproducibility: Metrics should be easy to reproduce, simulate, and audit to ensure they are achieving the intended results. They should not have a "black box" element that makes them difficult to understand or replicate.
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/blog/2024-07-15-impact-of-retro-funding/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Remember: _correlation is not causation_. While there are numerous signs of posi

## Cohort Analysis

At the time of writing, there are 23 [collections](https://docs.opensource.observer/docs/how-oso-works/oss-directory/collection) in the [OSS Directory](https://github.com/opensource-observer/oss-directory/tree/main/data/collections) we maintain, with a total of 1506 distinct projects with relevant activity in the last 6 months. Of these, 546 have applied for or received Retro Funding at some point.
At the time of writing, there are 23 [collections](../../docs/guides/oss-directory/collection) in the [OSS Directory](https://github.com/opensource-observer/oss-directory/tree/main/data/collections) we maintain, with a total of 1506 distinct projects with relevant activity in the last 6 months. Of these, 546 have applied for or received Retro Funding at some point.

The breakdown of RF projects by cohort is as follows:

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/blog/2024-07-16-oso-data-portal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ where passport_address = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'

When you’ve developed a novel impact metrics or data model,
we encourage you to
[contribute back to the OSO data pipeline](https://docs.opensource.observer/docs/contribute/data-models),
[contribute back to the OSO data pipeline](../../docs/contribute-models/data-models),
which is continuously deployed from our
[open source repository](https://github.com/opensource-observer/oso/).

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/blog/2024-08-12-war-for-public-goods/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ Once again, there are valuable lessons from baseball that we can apply:
- **Embrace Competing Implementations**: As mentioned earlier, there is no single standard calculation for WAR. Even though the data and methodologies are public, there’s vibrant debate about which method is best. In an industry as dynamic as crypto, this diversity of approaches is a strength, encouraging innovation and continuous improvement.
- **Engage the Research Community**: WAR models are like catnip for data enthusiasts. They offer endless opportunities for simulation, experimentation, and visualization. By providing well-documented, easy-to-use datasets and stoking interest in the results from protocol leaders and governance teams, we can create a garden of catnip for researchers and data nerds.

At Open Source Observer, we want to build the equivalent of a sabermetrics for open source impact. If you have ideas for a WAR model, check out our existing library of [data](https://docs.opensource.observer/docs/integrate/overview/) and [metrics](https://docs.opensource.observer/docs/how-oso-works/impact-metrics/), and come say hi on our [Discord](https://opensource.observer/discord).
At Open Source Observer, we want to build the equivalent of a sabermetrics for open source impact. If you have ideas for a WAR model, check out our existing library of [data](../../docs/integrate/overview) and [metrics](../../docs/guides/impact-metrics/), and come say hi on our [Discord](https://www.opensource.observer/discord).
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "Learn How OSO Works",
"label": "Contribute Data",
"position": 5,
"link": {
"type": "doc",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ from {{ source("ethereum", "transactions") }}

## Next steps

- [**SQL Query Guide**](../../integrate/query-data.mdx): run queries against the data you just loaded
- [**Connect OSO to 3rd Party tools**](../../integrate/3rd-party.mdx): explore your data using tools like Hex.tech, Tableau, and Metabase
- [**Write a dbt model**](../data-models.md): contribute new impact and data models to our data pipeline
- [**SQL Query Guide**](../integrate/query-data.mdx): run queries against the data you just loaded
- [**Connect OSO to 3rd Party tools**](../integrate/3rd-party.mdx): explore your data using tools like Hex.tech, Tableau, and Metabase
- [**Write a dbt model**](../contribute-models/data-models.md): contribute new impact and data models to our data pipeline
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Contribute To OSO",
"position": 2,
"label": "Contribute Models",
"position": 6,
"link": {
"type": "doc",
"id": "index"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Here’s what you need to do to participate in this (and future) data challenges

1. Join the [Kariba Data Collective](https://www.kariba.network/). Participation is open to anyone in the data collective (free to join, but we review applications).
2. Join our Discord and receive a **_data-collective_** role; ask questions and share code snippets in the **_#data-challenges_** channel.
3. Bookmark [our docs and tutorials](https://docs.opensource.observer/docs/how-oso-works/impact-metrics/) for creating impact metrics. Also make sure to browse our [Colab Notebooks](https://drive.google.com/drive/folders/1mzqrSToxPaWhsoGOR-UVldIsaX1gqP0F) for examples and inspiration.
3. Bookmark [our docs and tutorials](../../guides/impact-metrics/) for creating impact metrics. Also make sure to browse our [Colab Notebooks](https://drive.google.com/drive/folders/1mzqrSToxPaWhsoGOR-UVldIsaX1gqP0F) for examples and inspiration.
4. Submit your impact metric(s) by opening an issue on our Insight repo [here](https://github.com/opensource-observer/insights/issues/new/choose).

Every impact metric submission should include:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Contribute your own data visualization templates by adding them to the `./visual

### Impact Metrcs

We're building scripts and analysis frameworks for community-generated impact metrics. Submissions must be replicable with data sourced entirely from the OSO data warehouse and should follow the follow the [Impact Metrics Specification](../how-oso-works/impact-metrics/).
We're building scripts and analysis frameworks for community-generated impact metrics. Submissions must be replicable with data sourced entirely from the OSO data warehouse and should follow the follow the [Impact Metrics Specification](../guides/impact-metrics/).

In most cases, impact vectors will be reviewed and recognized via one of our Data Challenges, with separate instructions for showcasing work and submitting pull requests.

Expand Down
8 changes: 8 additions & 0 deletions apps/docs/docs/get-started/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Get Started",
"position": 1,
"link": {
"type": "doc",
"id": "index"
}
}
148 changes: 148 additions & 0 deletions apps/docs/docs/get-started/api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
title: "Get started with OSO API"
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

The [OSO](https://www.opensource.observer) API serves
queries on metrics and metadata about open source projects.
It is a [GraphQL](https://graphql.org/) API backed by the
[OSO data pipeline](../guides/architecture.md).

Let's make your first query in under five minutes.

## Generate an API key

First, go to [www.opensource.observer](https://www.opensource.observer) and create a new account.

If you already have an account, log in. Then create a new personal API key:

1. Go to [Account settings](https://www.opensource.observer/app/settings)
2. In the "API Keys" section, click "+ New"
3. Give your key a label - this is just for you, usually to describe a key's purpose.
4. You should see your brand new key. **Immediately** save this value, as you'll **never** see it again after refreshing the page.
5. Click "Create" to save the key.


![generate API key](../integrate/generate-api-key.png)

## Prepare your query

You can navigate to our
[public GraphQL explorer](https://www.opensource.observer/graphql)
to explore the schema and execute test queries.

![GraphQL explorer](../integrate/api-explorer.gif)

For example, this query will fetch the first 10 projects in
[oss-directory](https://github.com/opensource-observer/oss-directory).

```graphql
query GetProjects {
oso_projectsV1(limit: 10) {
description
displayName
projectId
projectName
projectNamespace
projectSource
}
}
```

## Issue your first API request

All API requests are sent to the following URL:

```
https://www.opensource.observer/api/v1/graphql
```

In order to authenticate with the API service, you have to use the `Authorization` HTTP header and `Bearer` authentication on all HTTP requests


<Tabs>
<TabItem value="curl" label="curl" default>
```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DEVELOPER_API_KEY" \
-d '{"query":"query GetProjects { oso_projectsV1(limit: 10) { description displayName projectId projectName projectNamespace projectSource } }"}' \
https://www.opensource.observer/api/v1/graphql
```
</TabItem>
<TabItem value="javascript" label="JavaScript">
```js
const query = `
query GetProjects {
oso_projectsV1(limit: 10) {
description
displayName
projectId
projectName
projectNamespace
projectSource
}
}
`;
const headers = {
'Content-Type': 'application/json',
'Authorization': `Bearer ${DEVELOPER_API_KEY}`,
};

const response = await fetch('https://www.opensource.observer/api/v1/graphql', {
method: 'POST',
headers: headers,
body: JSON.stringify({
query: query
}),
});

const data = await response.json();
console.log(data);
```
</TabItem>
<TabItem value="python" label="Python">
```python
import requests

query = """
query GetProjects {
oso_projectsV1(limit: 10) {
description
displayName
projectId
projectName
projectNamespace
projectSource
}
}
"""

headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {DEVELOPER_API_KEY}'
}

response = requests.post(
'https://www.opensource.observer/api/v1/graphql',
json={'query': query},
headers=headers
)

data = response.json()
print(data)
```
</TabItem>
</Tabs>


## Next steps

Congratulations! You've made your first API request.
Now try one of our tutorials.

- [Analyze a collection of projects](../tutorials/collection-view)
- [Deep dive into a project](../tutorials/project-deepdive)
Loading

0 comments on commit 38c4c63

Please sign in to comment.