Skip to content

Commit d9cb183

Browse files
authored
Merge pull request #1179 from joshunrau/dev
add instrument licensing website and AI rules file
2 parents e6649d8 + 0274728 commit d9cb183

File tree

6 files changed

+229
-0
lines changed

6 files changed

+229
-0
lines changed

.rules

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
**Code Changes:**
2+
- Make small, incremental changes only
3+
- Each change must be easily reviewable
4+
- No sweeping refactors unless explicitly requested
5+
- Decline if uncertain about implementation details
6+
7+
**Communication:**
8+
- Minimal explanatory text outside code blocks
9+
- Use inline comments only when necessary
10+
- Never comment obvious code behavior
11+
- Follow existing code style and conventions
12+
13+
14+
**Technical Standards:**
15+
- Prioritize type safety over convenience
16+
- Avoid type casting unless necessary
17+
- Never silently fail on errors
18+
- No new dependencies without approval
19+
- Never generate and run scripts to implement changes

apps/outreach/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@douglasneuroinformatics/libui": "catalog:",
15+
"@opendatacapture/licenses": "workspace:*",
1516
"@opendatacapture/schemas": "workspace:*",
1617
"clsx": "^2.1.1",
1718
"lodash-es": "workspace:lodash-es__4.x@*",
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
import { licenses } from '@opendatacapture/licenses';
3+
import type { ApprovedLicense } from '@opendatacapture/licenses';
4+
5+
const approvedLicenseIds: ApprovedLicense[] = [
6+
'0BSD',
7+
'Apache-2.0',
8+
'BSD-1-Clause',
9+
'BSD-2-Clause',
10+
'BSD-3-Clause',
11+
'CC0-1.0',
12+
'ISC',
13+
'MIT',
14+
'MIT-0',
15+
'Unlicense',
16+
'WTFPL'
17+
];
18+
19+
const openApprovedLicenses = Array.from(licenses.entries())
20+
.filter(([id]) => approvedLicenseIds.includes(id as any))
21+
.map(([id, license]) => ({ id, ...license }))
22+
.sort((a, b) => a.name.localeCompare(b.name));
23+
24+
const openNonApprovedLicenses = Array.from(licenses.entries())
25+
.filter(([id, license]) => !approvedLicenseIds.includes(id as any) && license.isOpenSource && license.isCopyleft)
26+
.map(([id, license]) => ({ id, ...license }))
27+
.sort((a, b) => a.name.localeCompare(b.name));
28+
29+
const openUnreviewedLicenses = Array.from(licenses.entries())
30+
.filter(([id, license]) => !approvedLicenseIds.includes(id as any) && license.isOpenSource && !license.isCopyleft)
31+
.map(([id, license]) => ({ id, ...license }))
32+
.sort((a, b) => a.name.localeCompare(b.name));
33+
34+
const proprietaryLicenses = Array.from(licenses.entries())
35+
.filter(([id, license]) => !license.isOpenSource)
36+
.map(([id, license]) => ({ id, ...license }))
37+
.sort((a, b) => a.name.localeCompare(b.name));
38+
---
39+
40+
<div class="space-y-8">
41+
<section>
42+
<h3>Open Source Licenses (Approved)</h3>
43+
<p class="mb-4 text-slate-700">
44+
The following licenses are pre-approved for direct inclusion in the Open Data Capture repository and public
45+
distribution:
46+
</p>
47+
<ul class="tracking-tight">
48+
{
49+
openApprovedLicenses.map((license) => (
50+
<li>
51+
<a
52+
class="font-bold hover:underline"
53+
target="_blank"
54+
rel="noopener noreferrer"
55+
href={license.reference}
56+
style="text-decoration-line: none;"
57+
>
58+
{license.name}
59+
</a>
60+
</li>
61+
))
62+
}
63+
</ul>
64+
<p class="text-slate-700">Please note that instruments in the public domain instruments are also permitted.</p>
65+
</section>
66+
<section>
67+
<h3>Open Source Licenses (Non-Approved)</h3>
68+
<p class="mb-4 text-slate-700">
69+
These open source licenses are acceptable for public distribution, but due to various clauses are not able to be
70+
included directly in the Open Data Capture repository.
71+
</p>
72+
<ul class="tracking-tight">
73+
{
74+
openNonApprovedLicenses.map((license) => (
75+
<li>
76+
<a
77+
class="font-bold hover:underline"
78+
target="_blank"
79+
rel="noopener noreferrer"
80+
href={license.reference}
81+
style="text-decoration-line: none;"
82+
>
83+
{license.name}
84+
</a>
85+
</li>
86+
))
87+
}
88+
</ul>
89+
</section>
90+
<section>
91+
<h3>Open Source Licenses (Review Required)</h3>
92+
<p class="mb-4 text-slate-700">
93+
The following licenses are considered open source, but have not been reviewed by our team.
94+
</p>
95+
<ul class="tracking-tight">
96+
{
97+
openUnreviewedLicenses.map((license) => (
98+
<li>
99+
<a
100+
class="font-bold hover:underline"
101+
target="_blank"
102+
rel="noopener noreferrer"
103+
href={license.reference}
104+
style="text-decoration-line: none;"
105+
>
106+
{license.name}
107+
</a>
108+
</li>
109+
))
110+
}
111+
</ul>
112+
</section>
113+
<section>
114+
<h3>Proprietary and Non-Free Licenses</h3>
115+
<p class="mb-4 text-slate-700">
116+
These licenses may not be published publicly by our team. This list includes non-free licenses, as well as any
117+
licenses with restrictions on commercial use.
118+
</p>
119+
<ul class="tracking-tight">
120+
{
121+
proprietaryLicenses.map((license) => (
122+
<li>
123+
<a
124+
class="font-bold hover:underline"
125+
target="_blank"
126+
rel="noopener noreferrer"
127+
href={license.reference}
128+
style="text-decoration-line: none;"
129+
>
130+
{license.name}
131+
</a>
132+
</li>
133+
))
134+
}
135+
</ul>
136+
</section>
137+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Instrument Licenses
3+
slug: en/docs/reference/instrument-licenses
4+
sidebar:
5+
order: 8
6+
---
7+
8+
import Licenses from '@/components/docs/Licenses.astro';
9+
10+
<Licenses />

0 commit comments

Comments
 (0)