Skip to content

Commit

Permalink
Update throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Aug 8, 2024
1 parent 7cce2f2 commit 610a906
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 78 deletions.
50 changes: 13 additions & 37 deletions contrib/example-schema.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,26 @@
{
"domain": "sentry.io",
"domain": "example.com",
"datetimeModified": "2024-08-05T01:00:00Z",
"description": "People sometimes ask why Sentry is an open source company. However, they are typically asking about our business model: conversion funnel, product roadmap, monetization strategy. In our experience as engineers and as professionals, there is no other choice but open source for building a viable software company serving modern development cycles. As a mantra, Sentry is an open source company because the right to learn and to share what is learned with others is fundamental to product growth and relevance.",
"name": "Sentry",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"name": "Acme Widgets",
"urlSquareLogoWithBackground": "https://avatars.githubusercontent.com/u/1396951?s=200&v=4",
"urlLearnMore": "https://open.sentry.io/osspledge/",
"urlLearnMore": "https://example.com/osspledge/",
"annualReports": [
{
"dateYearEnding": "2023-01-31",
"url": "https://example.com/blog/2",
"dateYearEnding": "2023-12-31",
"averageNumberOfDevs": 135,
"monetaryPayments": [
{
"amount": 435000,
"urlDetails": "https://thanks.dev/d/gh/getsentry/dependencies"
},
{
"amount": 50000,
"urlDetails": "https://github.com/orgs/getsentry/sponsoring"
},
{
"amount": 15000,
"urlDetails": "https://blog.sentry.io/we-just-gave-500-000-dollars-to-open-source-maintainers/"
}
],
"paymentsToProjects": 500000,
"monetaryValueOfTime": 100000,
"monetaryValueOfMaterials": 500000
},
{
"dateYearEnding": "2023-01-31",
"averageNumberOfDevs": 135,
"monetaryPayments": [
{
"amount": 435000,
"urlDetails": "https://thanks.dev/d/gh/getsentry/dependencies"
},
{
"amount": 50000,
"urlDetails": "https://github.com/orgs/getsentry/sponsoring"
},
{
"amount": 15000,
"urlDetails": "https://blog.sentry.io/we-just-gave-500-000-dollars-to-open-source-maintainers/"
}
],
"monetaryValueOfTime": 100000,
"monetaryValueOfMaterials": 500000
"url": "https://example.com/blog/1",
"dateYearEnding": "2022-12-31",
"averageNumberOfDevs": 100,
"paymentsToProjects": 400000,
"monetaryValueOfTime": 10000,
"monetaryValueOfMaterials": 50000
}
]
}
4 changes: 2 additions & 2 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { z, defineCollection } from "astro:content";
* need to understand how to format it, you've found the source of truth. If
* you have questions or run into limitations, please open an issue:
*
* https://github.com/getsentry/osspledge.com/issues/new
* https://github.com/opensourcepledge/osspledge.com/issues/new
*
*/

Expand All @@ -18,7 +18,7 @@ const monetaryPayment = z.object({
const memberReport = z.object({
dateYearEnding: z.string().date(),
averageNumberOfDevs: z.number().nonnegative(),
monetaryPayments: monetaryPayment.array().nonempty(),
paymentsToProjects: z.number().nonnegative(),
monetaryValueOfTime: z.number().nonnegative(),
monetaryValueOfMaterials: z.number().nonnegative(),
});
Expand Down
6 changes: 3 additions & 3 deletions src/content/members/sentry.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"url": "https://blog.sentry.io/we-just-gave-500-000-dollars-to-open-source-maintainers/",
"dateYearEnding": "2024-01-31",
"averageNumberOfDevs": 135,
"moneyToIndependentMaintainers": 500000
"paymentsToProjects": 500000
},
{
"url": "https://blog.sentry.io/we-just-gave-260-028-dollars-to-open-source-maintainers/",
"dateYearEnding": "2023-01-31",
"averageNumberOfDevs": 130,
"moneyToIndependentMaintainers": 260280
"paymentsToProjects": 260280
},
{
"url": "https://blog.sentry.io/we-just-gave-154-999-dollars-and-89-cents-to-open-source-maintainers/",
"dateYearEnding": "2022-01-31",
"averageNumberOfDevs": 75,
"moneyToIndependentMaintainers": 155000
"paymentsToProjects": 155000
}
]
}
10 changes: 2 additions & 8 deletions src/member_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,12 @@ export async function getMembers(): Promise<MemberWithId[]> {
}
}

export function getReportCashTotal(report: MemberReport) {
return report.monetaryPayments
.map((d) => d.amount)
.reduce((acc, d) => acc + d, 0);
}

export function getReportFullTotal(report: MemberReport) {
return getReportCashTotal(report) + report.monetaryValueOfTime + report.monetaryValueOfMaterials;
return report.paymentsToProjects + report.monetaryValueOfTime + report.monetaryValueOfMaterials;
}

export function getDollarsPerDev(report: MemberReport) {
return getReportCashTotal(report) / report.averageNumberOfDevs;
return report.paymentsToProjects / report.averageNumberOfDevs;
}

export function fmtCurrency(num: number) {
Expand Down
35 changes: 7 additions & 28 deletions src/pages/members/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -55,48 +55,27 @@ function getPlatformName(url: string) {
<strong>{fmtCurrency(getDollarsPerDev(report))} / dev</strong>
</div>

<h4 class="text-xl">Payments to Independent Maintainers</h4>
<table>
<tr>
<th class="text-left">Platform</th>
<th class="text-left">Item</th>
<th class="text-right">Amount ($)</th>
</tr>
{report.monetaryPayments.map(entry => <tr>
<td>{entry.urlDetails && <a href={entry.urlDetails}>{getPlatformName(entry.urlDetails)}</a>}</td>
<td class="text-right">{fmtCurrency(entry.amount)}</td>
</tr>)}
<tr>
<td>Total</td>
<td class="text-right">{fmtCurrency(getReportCashTotal(report))}</td>
</tr>
<tr>
<td>Average number of devs</td>
<td class="text-right">{report.averageNumberOfDevs}</td>
<td>Payments to Projects</td>
<td class="text-right">{fmtCurrency(report.paymentsToProjects)}</td>
</tr>
<tr>
<td>$ / dev</td>
<td class="text-right">{fmtCurrency(getDollarsPerDev(report))}</td>
<td></td>
<td class="text-right">= {fmtCurrency(getDollarsPerDev(report))} / dev</td>
</tr>
</table>

<h4 class="text-xl">Other Contributions</h4>
<table>
<tr>
<th class="text-left">Item</th>
<th class="text-right">Amount ($)</th>
</tr>
<tr>
<td>Value of time</td>
<td>Value of Time</td>
<td class="text-right">{fmtCurrency(report.monetaryValueOfTime)}</td>
</tr>
<tr>
<td>Value of materials</td>
<td>Value of Materials</td>
<td class="text-right">{fmtCurrency(report.monetaryValueOfMaterials)}</td>
</tr>
<tr>
<td>Payments to independent maintainers</td>
<td class="text-right">{fmtCurrency(getReportCashTotal(report))}</td>
</tr>
<tr>
<td>Total</td>
<td class="text-right">{fmtCurrency(getReportFullTotal(report))}</td>
Expand Down

0 comments on commit 610a906

Please sign in to comment.