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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RSD_ENVIRONMENT=prod
# Allowed values are: SURFCONEXT, ORCID, AZURE, LINKEDIN or LOCAL
# if env value is not provided default provider is set to be SURFCONEXT
# if you add the value "LOCAL", then local accounts are enabled, USE THIS FOR TESTING PURPOSES ONLY
RSD_AUTH_PROVIDERS=SURFCONEXT;ORCID;AZURE;LOCAL
RSD_AUTH_PROVIDERS=LINKEDIN;ORCID;LOCAL

# consumed by services: authentication, frontend (api/fe)
# provide a list of supported OpenID auth providers for coupling with the user's RSD account
Expand Down
66 changes: 50 additions & 16 deletions data-generation/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,78 @@ const orcids = generateOrcids();
const [
accounts,
idsMentions
] = await Promise.all([
] = await Promise.allSettled([
generateAccounts(orcids),
generateMentions()
])

console.log("accounts...", accounts.length)
console.log("mentions...", idsMentions.length)
if (accounts.status==='fulfilled'){
console.log("accounts...DONE...", accounts.value.length)
}else{
console.log("accounts...FAILED...", accounts.reason)
}

if(idsMentions.status==='fulfilled'){
console.log("mentions...DONE...", idsMentions.value.length)
}else{
console.log("mentions...FAILED...", idsMentions.reason)
}

// software, projects, news and meta pages
const [
// idsSoftware,
idsProjects,
// idsNews,
idsNews,
idsMeta
] = await Promise.all([
] = await Promise.allSettled([
// generateSoftware({orcids,idsMentions}),
generateProject({orcids,idsMentions}),
// generateNews(),
generateProject({
orcids,
idsMentions:idsMentions.value
}),
generateNews(),
generateMetaPages()
])

// console.log("software...", idsSoftware.length)
console.log("projects...", idsProjects.length)
// console.log("news...", idsNews.length)
console.log("meta pages...", idsMeta.length)
if (idsProjects.status==='fulfilled'){
// console.log("software...", idsSoftware.length)
console.log("projects...DONE...", idsProjects.value.length)
}else{
console.log("projects...FAILED...", idsProjects.reason)
}

if (idsNews.status==='fulfilled'){
console.log("news...DONE...", idsNews.value.length)
}else{
console.log("news...FAILED...", idsNews.reason)
}

if (idsMeta.status==='fulfilled'){
// console.log("news...", idsNews.length)
console.log("meta pages...DONE...", idsMeta.value.length)
}else{
console.log("meta pages...FAILED...", idsMeta.reason)
}

// organisations and communities
// organisations, news and communities
const [
idsOrganisations,
// idsCommunities,
] = await Promise.all([
generateOrganisation({idsSoftware:[],idsProjects,idsMentions}),
] = await Promise.allSettled([
generateOrganisation({
idsSoftware:[],
idsProjects:idsProjects.value,
idsMentions: idsMentions.value
}),
// generateCommunities({idsSoftware}),
])

console.log("organisations...", idsOrganisations.length)
if (idsOrganisations.status==='fulfilled'){
console.log("organisations...DONE...", idsOrganisations.value.length)
}else{
console.log("organisations...FAILED...", idsOrganisations.reason)
}

// console.log("communities...", idsCommunities.length)
console.log('Done');

// This is unfortunately needed, because when using docker compose, the node process might hang for a long time
Expand Down
2 changes: 1 addition & 1 deletion data-generation/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function generateNews(){
const news = await postToBackend('/news', createNews())
const newsIds = news.map(n=>n.id)

const newsData = Promise.all([
const newsData = await Promise.all([
postToBackend('/image_for_news', generateImagesForNews(newsIds, newsImageIds))
])

Expand Down
38 changes: 26 additions & 12 deletions data-generation/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,32 @@ export async function generateProject({orcids,idsMentions,amount = 500}){
const projects = await postToBackend('/project', createProjects(projectImageIds,amount))
const idsProjects = projects.map(p=>p.id)

const projectData = await Promise.all([
postToBackend('/team_member', await generateTeamMembers(idsProjects,peopleWithOrcid,projectImageIds)),
postToBackend('/url_for_project', generateUrlsForProjects(idsProjects)),
postToBackend('/keyword_for_project', generateKeywordsForEntity(idsProjects, idsKeywords, 'project')),
postToBackend('/output_for_project', generateMentionsForEntity(idsProjects, idsMentions, 'project')),
postToBackend('/impact_for_project', generateMentionsForEntity(idsProjects, idsMentions, 'project')),
postToBackend(
'/research_domain_for_project',
generateResearchDomainsForProjects(idsProjects, idsResearchDomains)
),
postToBackend('/project_for_project', generateSoftwareForSoftware(idsProjects))
const teamMembers = generateTeamMembers(idsProjects,peopleWithOrcid,projectImageIds)
const projectUrls = generateUrlsForProjects(idsProjects)
const keywords = generateKeywordsForEntity(idsProjects, idsKeywords, 'project')
const output = generateMentionsForEntity(idsProjects, idsMentions, 'project')
const impact = generateMentionsForEntity(idsProjects, idsMentions, 'project')
const researchDomains = generateResearchDomainsForProjects(idsProjects, idsResearchDomains)
const relatedProjects = generateSoftwareForSoftware(idsProjects)

const responses = await Promise.allSettled([
postToBackend('/team_member', teamMembers),
postToBackend('/url_for_project', projectUrls),
postToBackend('/keyword_for_project', keywords),
postToBackend('/output_for_project', output),
postToBackend('/impact_for_project', impact),
postToBackend('/research_domain_for_project', researchDomains),
postToBackend('/project_for_project', relatedProjects)
])

responses.forEach((resp,idx)=>{
if (resp.status==="fulfilled"){
console.log("Project section...", idx, "...OK")
}else{
console.log("Project section...", idx, "...FAILED: ",resp.reason)
}
})

return idsProjects
}

Expand Down Expand Up @@ -86,10 +99,11 @@ export function createProjects(projectImageIds,amount = 500) {
return result;
}

export async function generateTeamMembers(projectIds, peopleWithOrcids, contributorImageIds=[],minPerProject = 0, maxPerProject = 15) {
export function generateTeamMembers(projectIds, peopleWithOrcids, contributorImageIds=[],minPerProject = 0, maxPerProject = 15) {
const result = [];

for (const projectId of projectIds) {

const amount = faker.number.int({
max: maxPerProject,
min: minPerProject,
Expand Down
2 changes: 1 addition & 1 deletion data-generation/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function mimeTypeFromFileName(fileName) {
if (fileName.endsWith('.png')) {
return 'image/png';
} else if (fileName.endsWith('.jpg') || fileName.endsWith('.jpeg')) {
return 'image/jpg';
return 'image/jpeg';
} else if (fileName.endsWith('.svg')) {
return 'image/svg+xml';
} else return null;
Expand Down
8 changes: 4 additions & 4 deletions deployment/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
services:
database:
container_name: database
image: ghcr.io/research-software-directory/rsd-saas/database:v2.17.0
image: ghcr.io/research-software-directory/rsd-saas/database:v2.29.0
expose:
- 5432
environment:
Expand All @@ -25,7 +25,7 @@ services:

backend:
container_name: backend
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.17.0
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.29.0
expose:
- 3500
environment:
Expand All @@ -43,7 +43,7 @@ services:

auth:
container_name: auth
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.28.0
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.29.0
expose:
- 7000
environment:
Expand Down Expand Up @@ -82,7 +82,7 @@ services:

scrapers:
container_name: scrapers
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.17.0
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.29.0
environment:
# it uses values from .env file
- POSTGREST_URL
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

services:
database:
image: ghcr.io/research-software-directory/rsd-saas/database:v2.17.0
image: ghcr.io/research-software-directory/rsd-saas/database:v2.29.0
ports:
# enable connection from outside (development mode)
- "5432:5432"
Expand All @@ -23,7 +23,7 @@ services:
- net

backend:
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.17.0
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.29.0
expose:
- 3500
environment:
Expand All @@ -39,7 +39,7 @@ services:
- net

auth:
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.28.0
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.29.0
ports:
- 5005:5005
expose:
Expand Down Expand Up @@ -85,7 +85,7 @@ services:
]

scrapers:
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.17.0
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.29.0
environment:
# it uses values from .env file
- POSTGREST_URL
Expand All @@ -110,7 +110,7 @@ services:
# dockerfile to use for build
dockerfile: Dockerfile
# update version number to correspond to frontend/package.json
image: kin-rpd/frontend:0.0.2
image: kin-rpd/frontend:0.1.0
environment:
# it uses values from .env file
- POSTGREST_URL
Expand Down Expand Up @@ -161,7 +161,7 @@ services:
context: ./documentation
# dockerfile to use for build
dockerfile: Dockerfile
image: kin-rpd/documentation:0.0.1
image: kin-rpd/documentation:0.1.0
expose:
- "80"
networks:
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/AppFooter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function AppFooter () {
</p>
<ContactEmail email={host?.email} headers={host?.emailHeaders} />
{/* <div className="py-4"></div> */}
<div className="bg-base-100 w-[24rem] p-4 rounded-md mt-4">
<div className="w-[10rem] p-2 rounded-md mt-4">
<OrganisationLogo host={host} />
</div>

Expand Down
9 changes: 3 additions & 6 deletions frontend/components/AppHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,13 @@ export default function AppHeader() {
<div className="w-full flex-1 flex items-center justify-between">
<Link href="/" passHref className="hover:text-inherit" aria-label="Link to home page">
<img
src="/apple-touch-icon.png"
alt="KIN logo"
src={host.logo_url}
alt="VEDA by KIN logo"
title="Klimaatonderzoek Initiatief Nederland"
style={{
height: '3.5rem',
width: 'auto',
padding: '0.5rem',
objectFit: 'contain',
backgroundColor: '#fff',
borderRadius:'50%'
objectFit: 'contain'
}}
/>
</Link>
Expand Down
27 changes: 14 additions & 13 deletions frontend/public/data/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"host": {
"name": "kin-rpd",
"email": "[email protected]",
"emailHeaders": [],
"logo_url": "/images/logo-KIN.svg",
"website": "https://hetkin.nl/en/home-en/",
"logo_url": "/images/veda-beta-logo.png",
"website": "https://hetkin.nl/en/",
"feedback": {
"enabled": true,
"url": "rsd@esciencecenter.nl",
"url": "veda@hetkin.nl",
"issues_page_url": "https://github.com/research-software-directory/KIN-RPD/issues"
},
"login_info_url":"https://research-software-directory.github.io/documentation/getting-access.html",
Expand Down Expand Up @@ -52,19 +53,19 @@
"base-content": "#306070",
"base-content-secondary": "rgba(48,96,112,0.7)",
"base-content-disabled": "rgba(34,36,37,0.45)",
"primary": "#01A2D6",
"primary": "#01a2d6",
"primary-content": "#fff",
"secondary": "#306070",
"secondary-content": "#fff",
"accent": "#a3ccb9",
"accent-content": "#306070",
"error": "#8A1D12",
"accent": "#01a2d6",
"accent-content": "#fff",
"error": "#EC5F59",
"error-content": "#fff",
"warning": "#ed6c02",
"warning-content": "#fff",
"info": "#0288d1",
"info-content": "#fff",
"success": "#307070",
"success": "#71ad93",
"success-content": "#fff",
"glow-start": "#db2777",
"glow-end": "#9333ea"
Expand Down Expand Up @@ -101,15 +102,15 @@
"primary-content": "#fff",
"secondary": "#306070",
"secondary-content": "#fff",
"accent": "#73095d",
"accent": "#6C4E71",
"accent-content": "#fff",
"error": "#e53935",
"error": "#EC5F59",
"error-content": "#000",
"warning": "#ed6c02",
"warning-content": "#000",
"info": "#0288d1",
"info-content": "#000",
"success": "#2e7d32",
"success": "#71ad93",
"success-content": "#fff",
"glow-start": "#db2777",
"glow-end": "#9333ea"
Expand All @@ -129,8 +130,8 @@
}
},
"typography": {
"defaultFontFamily": "aller, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
"titlesFontFamily": "aller, Roboto, sans-serif",
"defaultFontFamily": "Aller, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
"titlesFontFamily": "Aller, Roboto, sans-serif",
"fontWeightLight": 200,
"fontWeightRegular": 400,
"fontWeightMedium": 500,
Expand Down
Loading