Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ web_modules/
.env.production.local
.env.local
.venv/
__pycache__/

# VSCode files, e.g. launch configuration
.vscode
Expand Down
12 changes: 6 additions & 6 deletions COMMUNITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ Total number of contributors: <!--CONTRIBUTOR COUNT START--> 8 <!--CONTRIBUTOR C
</a>
</td>
<td align="center">
<a href="https://github.com/DinneK">
<img src="https://avatars.githubusercontent.com/u/63877492?v=4" width="100;" alt="DinneK"/>
<a href="https://github.com/IsaacMilarky">
<img src="https://avatars.githubusercontent.com/u/24639268?v=4" width="100;" alt="IsaacMilarky"/>
<br />
<sub><b>Dinne Kopelevich</b></sub>
<sub><b>Isaac Milarsky</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/IsaacMilarky">
<img src="https://avatars.githubusercontent.com/u/24639268?v=4" width="100;" alt="IsaacMilarky"/>
<a href="https://github.com/DinneK">
<img src="https://avatars.githubusercontent.com/u/63877492?v=4" width="100;" alt="DinneK"/>
<br />
<sub><b>Isaac Milarsky</b></sub>
<sub><b>Dinne Kopelevich</b></sub>
</a>
</td>
<td align="center">
Expand Down
96 changes: 91 additions & 5 deletions _data/codegovData.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const codegov = require('../codegov.json');
const legacyCodegov = require('../legacy-codegov.json')

module.exports = function() {

Check warning on line 4 in _data/codegovData.js

View workflow job for this annotation

GitHub Actions / Run linter

Unexpected unnamed function
const agencies = [];
const projects = [];
const organizations = new Set();
Expand Down Expand Up @@ -38,6 +39,7 @@
longDescription: release.longDescription,
status: release.status,
repositoryURL: release.repositoryURL,
homepageURL: release.homepageURL || null,
vcs: release.vcs,
repositoryType: release.repositoryType,
repositoryHost: release.repositoryHost,
Expand All @@ -47,8 +49,8 @@
tags: release.tags || [],
softwareType: release.softwareType,
license: {
name: release.permissions?.license?.[0]?.name,
url: release.permissions?.license?.[0]?.URL
name: release.permissions?.license?.[0]?.name || release.permissions?.licenses?.[0]?.name,
url: release.permissions?.license?.[0]?.URL || release.permissions?.licenses?.[0]?.URL
},
usageType: release.permissions?.usageType,
exemptionText: release.permissions?.exemptionText,
Expand All @@ -70,11 +72,93 @@
subsetInGovernment: release.subsetInGovernment,
userType: release.usageType,
maturityModelTier: release.maturityModelTier,
projectType: release.projectType
projectType: release.projectType,
relatedCode: release.relatedCode || [],
downloadURL: release.downloadURL || null
});
});
});

Object.entries(legacyCodegov).forEach(([agencyName, releases]) => {
const agencyOrgs = [...new Set(releases.map(release => release.organization))];

const existingAgency = agencies.find(agency => agency.name === agencyName);
if (!existingAgency) {
agencies.push({
code: agencyName,
name: agencyName,
version: "1.0.0",

Check failure on line 90 in _data/codegovData.js

View workflow job for this annotation

GitHub Actions / Run linter

Strings must use singlequote
measurementType: "Projects",

Check failure on line 91 in _data/codegovData.js

View workflow job for this annotation

GitHub Actions / Run linter

Strings must use singlequote
organizations: agencyOrgs,
projectCount: releases.length,
totalLaborHours: releases.reduce((acc, curr) => acc + (curr.laborHours || 0), 0)
});
}

releases.forEach(release => {
organizations.add(release.organization);
release.categories?.forEach(category => allCategories.add(category));
release.platforms?.forEach(platform => allPlatforms.add(platform));
release.tags?.forEach(tag => allTags.add(tag));

if (release.languages) {
if (Array.isArray(release.languages)) {
release.languages?.forEach(language => language && allLanguages.add(language));
} else if (typeof release.language === 'string') {
allLanguages.add(release.languages)
}
}


projects.push({
agencyCode: agencyName,
agencyName: agencyName,

Check failure on line 115 in _data/codegovData.js

View workflow job for this annotation

GitHub Actions / Run linter

Expected property shorthand
organization: release.organization,
name: release.name,
description: release.description,
longDescription: release.longDescription || release.description,
status: release.status,
repositoryURL: release.repositoryURL,
homepageURL: release.homepageURL || null,
vcs: release.vcs,
repositoryType: release.repositoryType || null,
repositoryHost: release.repositoryHost || null,
platforms: release.platforms || [],
categories: release.categories || [],
languages: release.languages || [],
tags: release.tags || [],
softwareType: release.softwareType || null,
license: {
name: release.permissions?.licenses?.[0]?.name || release.permissions?.license?.[0]?.name,
url: release.permissions?.licenses?.[0]?.URL || release.permissions?.license?.[0]?.URL
},
usageType: release.permissions?.usageType,
exemptionText: release.permissions?.exemptionText || null,
laborHours: release.laborHours || 0,
dates: {
created: release.date?.created,
lastModified: release.date?.lastModified,
metaDataLastUpdated: release.date?.metaDataLastUpdated
},
contact: {
email: release.contact?.email,
name: release.contact?.name
},
maintenance: release.maintenance || null,
localisation: release.localisation || null,
userInput: release.userInput || null,
fismaLevel: release.fismaLevel || null,
group: release.group || null,
subsetInGovernment: release.subsetInGovernment || null,
userType: release.usageType || null,
maturityModelTier: release.maturityModelTier || null,
projectType: release.projectType || null,
relatedCode: release.relatedCode || [],
downloadURL: release.downloadURL || null
});
});
})

return {
agencies,
projects,
Expand All @@ -84,9 +168,11 @@
languages: Array.from(allLanguages).sort(),
platforms: Array.from(allPlatforms).sort(),
tags: Array.from(allTags).sort(),
statuses: ['Production', 'Development', 'Archival'],
statuses: ['Production', 'Development', 'Archival', 'Beta', 'Ideation',
'Release Candidate', 'Alpha v0.11 (Prototype)'],
fismaLevels: ['Low', 'Moderate', 'High'],
usageTypes: ['openSource'],
usageTypes: ['openSource', 'exemptByLaw', 'exemptByAgencySystem', 'exemptByAgencyMission',
'governmentWideReuse', 'exemptByNationalSecurity', ],
maturityTiers: [0, 1, 2, 3, 4]
}
}
Expand Down
Loading
Loading