diff --git a/database/005-create-relations-for-software.sql b/database/005-create-relations-for-software.sql index 7ee9eb074..ce5ee2722 100644 --- a/database/005-create-relations-for-software.sql +++ b/database/005-create-relations-for-software.sql @@ -20,6 +20,7 @@ CREATE TABLE repository_url ( software UUID REFERENCES software (id) PRIMARY KEY, url VARCHAR(200) NOT NULL CHECK (url ~ '^https?://'), code_platform platform_type NOT NULL DEFAULT 'other', + archived BOOLEAN, license VARCHAR(200), star_count BIGINT, fork_count INTEGER, diff --git a/frontend/components/category/CategoriesWithHeadlines.tsx b/frontend/components/category/CategoriesWithHeadlines.tsx index 0bd4f739c..b09983c4b 100644 --- a/frontend/components/category/CategoriesWithHeadlines.tsx +++ b/frontend/components/category/CategoriesWithHeadlines.tsx @@ -23,7 +23,7 @@ export const CategoriesWithHeadlines = ({categories}: CategoriesWithHeadlinesPro const category = node.getValue() const children = node.children() - return + return
diff --git a/frontend/components/charts/d3LineChart/drawLineChart.tsx b/frontend/components/charts/d3LineChart/drawLineChart.tsx index d290bef5f..82f7695d5 100644 --- a/frontend/components/charts/d3LineChart/drawLineChart.tsx +++ b/frontend/components/charts/d3LineChart/drawLineChart.tsx @@ -24,7 +24,7 @@ type LineChartConfig = { const margin = { // minimal margins to host first/last year label 'overflow' left: 12, right: 12, - top: 4, bottom: 16 + top: 4, bottom: 24 } function findMax(data:LineData[]) { diff --git a/frontend/components/charts/d3LineChart/formatData.ts b/frontend/components/charts/d3LineChart/formatData.ts index 54b115e69..1c746f71d 100644 --- a/frontend/components/charts/d3LineChart/formatData.ts +++ b/frontend/components/charts/d3LineChart/formatData.ts @@ -1,5 +1,7 @@ // SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) // SPDX-FileCopyrightText: 2022 dv4all +// SPDX-FileCopyrightText: 2024 Dusan Mijatovic (Netherlands eScience Center) +// SPDX-FileCopyrightText: 2024 Netherlands eScience Center // // SPDX-License-Identifier: Apache-2.0 @@ -37,10 +39,11 @@ export function formatUnixDateData(data: Data) { } export function prepareDataForSoftwarePage(data: Data) { + console.log('prepareDataForSoftwarePage...',data) // format unix time in seconds to ms for js const {lineData,lastUpdateInMs} = formatUnixDateData(data) // calculate total number of commits - const totalCountY = lineData.reduce((acc: any, point) => { + const totalCountY:number = lineData.reduce((acc: any, point) => { return acc+=point.y }, 0) // extract last commit date diff --git a/frontend/components/software/CommitsChart.test.tsx b/frontend/components/software/CommitsChart.test.tsx index 43c1cc478..7c0033916 100644 --- a/frontend/components/software/CommitsChart.test.tsx +++ b/frontend/components/software/CommitsChart.test.tsx @@ -1,6 +1,6 @@ -// SPDX-FileCopyrightText: 2023 Dusan Mijatovic (Netherlands eScience Center) +// SPDX-FileCopyrightText: 2023 - 2024 Dusan Mijatovic (Netherlands eScience Center) +// SPDX-FileCopyrightText: 2023 - 2024 Netherlands eScience Center // SPDX-FileCopyrightText: 2023 Dusan Mijatovic (dv4all) (dv4all) -// SPDX-FileCopyrightText: 2023 Netherlands eScience Center // SPDX-FileCopyrightText: 2023 dv4all // // SPDX-License-Identifier: Apache-2.0 @@ -8,7 +8,7 @@ import {render, screen} from '@testing-library/react' import {WithAppContext} from '~/utils/jest/WithAppContext' -import CommitsChart, {CommitsChartProps} from './CommitsChart' +import CommitsChart, {CommitsChartProps,ArchivedRepo,StarCount,ForkCount} from './CommitsChart' // MOCK useResizeObserver jest.mock('~/components/charts/d3LineChart/useResizeObserver') @@ -21,20 +21,18 @@ jest.mock('~/components/charts/d3LineChart/NoDataAvailableChart', () => ({ default: jest.fn(({text}) =>
{text}
) })) -// const mockPrepareDataForSoftwarePage = jest.fn(props => ({ -// lineData: [], -// totalCountY:0, -// lastCommitDate: null -// })) -// jest.mock('~/components/charts/d3LineChart/formatData', () => ({ -// prepareDataForSoftwarePage: jest.fn(props=>mockPrepareDataForSoftwarePage(props)) -// })) +type MutableProps = { + -readonly [key in keyof CommitsChartProps]: CommitsChartProps[key] +} -const mockProps:CommitsChartProps = { +const mockProps:MutableProps = { repository_url: null, commit_history: undefined, commit_history_scraped_at: undefined, - className: undefined + className: undefined, + archived: null, + star_count: null, + fork_count: null } it('renders "missing repository_url" message', () => { @@ -70,7 +68,7 @@ it('renders "did not scrape repo yet" message', () => { // screen.debug() }) -it('renders "reposotory is empty" message', () => { +it('renders "repository is empty" message', () => { mockProps.repository_url = 'https://some.repo.url.com' mockProps.commit_history_scraped_at = new Date().toISOString() mockProps.commit_history = {} @@ -105,3 +103,82 @@ it('renders "we cannot read the commit history" message', () => { expect(message).toHaveTextContent(expectMessage) // screen.debug() }) + +it('renders "archived repository" message', () => { + // render + render( + + + + ) + + screen.getByTestId('archived-repository') +}) + +it('renders "0 stars" message', () => { + // render + render( + + + + ) + + screen.getByText('0 stars') +}) + +it('does NOT render the stars message on null', async() => { + // render + render( + + + + ) + const stars = screen.queryByTestId('star-count') + expect(stars).not.toBeInTheDocument() + // screen.debug(stars) +}) + +it('does NOT render the stars message on undefined', async() => { + // render + render( + + + + ) + const stars = screen.queryByTestId('star-count') + expect(stars).not.toBeInTheDocument() +}) + +it('renders "0 forks" message', () => { + // render + render( + + + + ) + + screen.getByText('0 forks') +}) + +it('does NOT render forks message on null', async() => { + // render + render( + + + + ) + const forks = screen.queryByTestId('fork-count') + expect(forks).not.toBeInTheDocument() +}) + +it('does NOT render forks message on undefined', async() => { + // render + render( + + + + ) + const stars = screen.queryByTestId('fork-count') + expect(stars).not.toBeInTheDocument() +}) + diff --git a/frontend/components/software/CommitsChart.tsx b/frontend/components/software/CommitsChart.tsx index d3f8f9681..a80e908b7 100644 --- a/frontend/components/software/CommitsChart.tsx +++ b/frontend/components/software/CommitsChart.tsx @@ -3,6 +3,8 @@ // SPDX-FileCopyrightText: 2022 Christian Meeßen (GFZ) // SPDX-FileCopyrightText: 2022 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences // SPDX-FileCopyrightText: 2023 Dusan Mijatovic (dv4all) (dv4all) +// SPDX-FileCopyrightText: 2024 Dusan Mijatovic (Netherlands eScience Center) +// SPDX-FileCopyrightText: 2024 Netherlands eScience Center // // SPDX-License-Identifier: Apache-2.0 @@ -12,14 +14,58 @@ import {prepareDataForSoftwarePage} from '~/components/charts/d3LineChart/format import NoDataAvailableChart from '~/components/charts/d3LineChart/NoDataAvailableChart' import SingleLineChart from '~/components/charts/d3LineChart/SingleLineChart' -export type CommitsChartProps = { +export type CommitsChartProps = Readonly<{ repository_url: string | null, + archived: boolean | null, + star_count: number | null, + fork_count: number | null, commit_history?: CommitHistory commit_history_scraped_at?: string className?: string +}> + +export function ArchivedRepo({archived}:Readonly<{archived:boolean|null}>){ + if (!archived) return null + return ( + + archived repository + + ) +} + +export function StarCount({star_count}:Readonly<{star_count:number|null}>){ + if (star_count===null || star_count===undefined) return null + return ( + + {star_count===1 ? `${star_count} star`:`${star_count} stars`} + + ) +} + +export function ForkCount({fork_count}:Readonly<{fork_count:number|null}>){ + if (fork_count===null || fork_count===undefined) return null + return ( + + {fork_count===1 ? `${fork_count} fork` : `${fork_count} forks`} + + ) +} + +export function Commits({commits,lastCommitDate}:Readonly<{commits:number|null,lastCommitDate?:Date}>){ + return ( + <> + {commits===1 ? `${commits} commit` : `${commits} commits`} + Last commit ≈ { + getTimeAgoSince(new Date(), lastCommitDate?.toISOString() ?? null) + } + + ) } -export default function CommitsChart({repository_url, commit_history, commit_history_scraped_at, className}: CommitsChartProps) { +export default function CommitsChart({ + repository_url, commit_history, commit_history_scraped_at, + archived, star_count, fork_count, className +}: CommitsChartProps) { // if there is commit_history if (commit_history && Object.keys(commit_history).length > 0) { // format commits data for chart and calculate other stats @@ -28,10 +74,11 @@ export default function CommitsChart({repository_url, commit_history, commit_his return (
-
- {totalCountY} commits | Last commit ≈ { - getTimeAgoSince(new Date(), lastCommitDate?.toISOString() ?? null) - } +
+ + + +
) diff --git a/frontend/components/software/GetStartedSection.tsx b/frontend/components/software/GetStartedSection.tsx index a09e1b3df..241873c6a 100644 --- a/frontend/components/software/GetStartedSection.tsx +++ b/frontend/components/software/GetStartedSection.tsx @@ -2,25 +2,23 @@ // SPDX-FileCopyrightText: 2021 - 2022 dv4all // SPDX-FileCopyrightText: 2022 Christian Meeßen (GFZ) // SPDX-FileCopyrightText: 2022 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences +// SPDX-FileCopyrightText: 2024 Dusan Mijatovic (Netherlands eScience Center) +// SPDX-FileCopyrightText: 2024 Netherlands eScience Center // // SPDX-License-Identifier: Apache-2.0 import LinkIcon from '@mui/icons-material/Link' import CommitsChart from './CommitsChart' -import {CommitHistory} from '../../types/SoftwareTypes' +import {RepositoryInfo} from '../../types/SoftwareTypes' type GetStartedSectionProps = { get_started_url: string | null, - repository_url: string | null, - commit_history: CommitHistory, - commit_history_scraped_at: string + repositoryInfo: RepositoryInfo } -export default function GetStartedSection(props:GetStartedSectionProps) { - const {repository_url, get_started_url, commit_history, commit_history_scraped_at} = props - +export default function GetStartedSection({get_started_url,repositoryInfo}:GetStartedSectionProps) { // if no get_started_url and repository_url we do not render this section - if (!get_started_url && !repository_url) return null + if (!get_started_url && !repositoryInfo?.url) return null function renderGetStartedUrl() { if (get_started_url) { @@ -45,9 +43,12 @@ export default function GetStartedSection(props:GetStartedSectionProps) { return ( ) } diff --git a/frontend/pages/software/[slug]/index.tsx b/frontend/pages/software/[slug]/index.tsx index 3e13d70fb..500817ede 100644 --- a/frontend/pages/software/[slug]/index.tsx +++ b/frontend/pages/software/[slug]/index.tsx @@ -166,9 +166,7 @@ export default function SoftwareIndexPage(props:SoftwareIndexData) { /> -// SPDX-FileCopyrightText: 2023 Netherlands eScience Center +// SPDX-FileCopyrightText: 2023 - 2024 Ewan Cahen (Netherlands eScience Center) +// SPDX-FileCopyrightText: 2023 - 2024 Netherlands eScience Center // // SPDX-License-Identifier: Apache-2.0 package nl.esciencecenter.rsd.scraper.git; -public class BasicGitData { - public String license; - public Long starCount; - public Integer forkCount; - public Integer openIssueCount; +public record BasicGitData( + Boolean archived, + String license, + Long starCount, + Integer forkCount, + Integer openIssueCount +) { } diff --git a/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GithubScraper.java b/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GithubScraper.java index 57c64e8a1..a15a45e1e 100644 --- a/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GithubScraper.java +++ b/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GithubScraper.java @@ -69,11 +69,11 @@ public BasicGitData basicData() throws IOException, InterruptedException, RsdRes return switch (response.statusCode()) { case 200 -> parseBasicData(response.body()); case 404 -> - throw new RsdResponseException(404, response.uri(), response.body(), "Not found, is the repository URL correct?"); + throw new RsdResponseException(404, response.uri(), response.body(), "Not found, is the repository URL correct?"); case 403 -> - throw new RsdRateLimitException(403, response.uri(), response.body(), "Rate limit for GitHub probably reached"); + throw new RsdRateLimitException(403, response.uri(), response.body(), "Rate limit for GitHub probably reached"); default -> - throw new RsdResponseException(response.statusCode(), response.uri(), response.body(), "Unexpected response"); + throw new RsdResponseException(response.statusCode(), response.uri(), response.body(), "Unexpected response"); }; } @@ -86,12 +86,12 @@ public String languages() throws IOException, InterruptedException, RsdResponseE HttpResponse response = getAsHttpResponse(BASE_API_URL + "/repos/" + organisation + "/" + repo + "/languages"); return switch (response.statusCode()) { case 404 -> - throw new RsdResponseException(404, response.uri(), response.body(), "Not found, is the repository URL correct?"); + throw new RsdResponseException(404, response.uri(), response.body(), "Not found, is the repository URL correct?"); case 403 -> - throw new RsdRateLimitException(403, response.uri(), response.body(), "Rate limit for GitHub probably reached"); + throw new RsdRateLimitException(403, response.uri(), response.body(), "Rate limit for GitHub probably reached"); case 200 -> response.body(); default -> - throw new RsdResponseException(response.statusCode(), response.uri(), response.body(), "Unexpected response"); + throw new RsdResponseException(response.statusCode(), response.uri(), response.body(), "Unexpected response"); }; } @@ -194,16 +194,24 @@ static CommitsPerWeek parseCommits(String json) { } static BasicGitData parseBasicData(String json) { - BasicGitData result = new BasicGitData(); JsonObject jsonObject = JsonParser.parseString(json).getAsJsonObject(); + Boolean archived = jsonObject.getAsJsonPrimitive("archived").getAsBoolean(); JsonElement jsonLicense = jsonObject.get("license"); - result.license = jsonLicense.isJsonNull() ? null : jsonLicense.getAsJsonObject().getAsJsonPrimitive("spdx_id").getAsString(); - result.starCount = jsonObject.getAsJsonPrimitive("stargazers_count").getAsLong(); - result.forkCount = jsonObject.getAsJsonPrimitive("forks_count").getAsInt(); - result.openIssueCount = jsonObject.getAsJsonPrimitive("open_issues_count").getAsInt(); - - return result; + String license = jsonLicense.isJsonNull() ? null : jsonLicense.getAsJsonObject() + .getAsJsonPrimitive("spdx_id") + .getAsString(); + Long starCount = jsonObject.getAsJsonPrimitive("stargazers_count").getAsLong(); + Integer forkCount = jsonObject.getAsJsonPrimitive("forks_count").getAsInt(); + Integer openIssueCount = jsonObject.getAsJsonPrimitive("open_issues_count").getAsInt(); + + return new BasicGitData( + archived, + license, + starCount, + forkCount, + openIssueCount + ); } // return an object with the URL of the last page and the number of the last page respectively diff --git a/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GitlabScraper.java b/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GitlabScraper.java index ebe813cf9..9388ff98b 100644 --- a/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GitlabScraper.java +++ b/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/GitlabScraper.java @@ -88,10 +88,10 @@ public CommitsPerWeek contributions() throws IOException, InterruptedException, boolean done = false; while (!done) { HttpRequest request = HttpRequest.newBuilder().GET() - .uri(URI.create(apiUri + "/projects/" + Utils.urlEncode(projectPath) - + "/repository/commits?per_page=100&order=default&page=" + page)) - .timeout(Duration.ofSeconds(30)) - .build(); + .uri(URI.create(apiUri + "/projects/" + Utils.urlEncode(projectPath) + + "/repository/commits?per_page=100&order=default&page=" + page)) + .timeout(Duration.ofSeconds(30)) + .build(); HttpResponse response; try (HttpClient client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NORMAL).build()) { response = client.send(request, HttpResponse.BodyHandlers.ofString()); @@ -138,15 +138,20 @@ static void parseCommitPage(String json, CommitsPerWeek commitsToFill) { } static BasicGitData parseBasicData(String json) { - BasicGitData result = new BasicGitData(); JsonObject jsonObject = JsonParser.parseString(json).getAsJsonObject(); JsonElement jsonLicense = jsonObject.get("license"); - result.license = jsonLicense.isJsonNull() ? null : jsonLicense.getAsJsonObject().get("name").getAsString(); - result.starCount = jsonObject.getAsJsonPrimitive("star_count").getAsLong(); - result.forkCount = jsonObject.getAsJsonPrimitive("forks_count").getAsInt(); - - return result; + String license = jsonLicense.isJsonNull() ? null : jsonLicense.getAsJsonObject().get("name").getAsString(); + Long starCount = jsonObject.getAsJsonPrimitive("star_count").getAsLong(); + Integer forkCount = jsonObject.getAsJsonPrimitive("forks_count").getAsInt(); + + return new BasicGitData( + null, + license, + starCount, + forkCount, + null + ); } } diff --git a/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/PostgrestConnector.java b/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/PostgrestConnector.java index f50da1d39..0890fd348 100644 --- a/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/PostgrestConnector.java +++ b/scrapers/src/main/java/nl/esciencecenter/rsd/scraper/git/PostgrestConnector.java @@ -82,17 +82,20 @@ static Collection parseBasicJsonData(String data) { } public void saveLanguagesData(LanguagesData languagesData) { - String json = String.format("{\"languages_last_error\": null, \"languages\": %s, \"languages_scraped_at\": \"%s\"}", languagesData.languages(), languagesData.languagesScrapedAt().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); + String json = String.format("{\"languages_last_error\": null, \"languages\": %s, \"languages_scraped_at\": \"%s\"}", languagesData.languages(), languagesData.languagesScrapedAt() + .format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); Utils.patchAsAdmin(backendUrl + "?software=eq." + languagesData.basicData().software().toString(), json); } public void saveCommitData(CommitData commitData) { String json; if (commitData.commitHistory() == null) { - json = String.format("{\"commit_history_last_error\": null, \"commit_history_scraped_at\": \"%s\"}", commitData.commitHistoryScrapedAt().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); + json = String.format("{\"commit_history_last_error\": null, \"commit_history_scraped_at\": \"%s\"}", commitData.commitHistoryScrapedAt() + .format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); } else { commitData.commitHistory().addMissingZeros(); - json = String.format("{\"commit_history_last_error\": null, \"commit_history\": %s, \"commit_history_scraped_at\": \"%s\"}", commitData.commitHistory().toJson(), commitData.commitHistoryScrapedAt().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); + json = String.format("{\"commit_history_last_error\": null, \"commit_history\": %s, \"commit_history_scraped_at\": \"%s\"}", commitData.commitHistory() + .toJson(), commitData.commitHistoryScrapedAt().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); } Utils.patchAsAdmin(backendUrl + "?software=eq." + commitData.basicData().software().toString(), json); } @@ -100,23 +103,30 @@ public void saveCommitData(CommitData commitData) { public void saveBasicData(BasicGitDatabaseData basicData) { JsonObject jsonObject = new JsonObject(); jsonObject.add("basic_data_last_error", JsonNull.INSTANCE); - jsonObject.addProperty("basic_data_scraped_at", basicData.dataScrapedAt().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); - jsonObject.addProperty("license", basicData.statsData().license); - jsonObject.addProperty("star_count", basicData.statsData().starCount); - jsonObject.addProperty("fork_count", basicData.statsData().forkCount); - jsonObject.addProperty("open_issue_count", basicData.statsData().openIssueCount); - - Utils.patchAsAdmin(backendUrl + "?software=eq." + basicData.basicData().software().toString(), jsonObject.toString()); + jsonObject.addProperty("basic_data_scraped_at", basicData.dataScrapedAt() + .format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); + jsonObject.addProperty("archived", basicData.statsData().archived()); + jsonObject.addProperty("license", basicData.statsData().license()); + jsonObject.addProperty("star_count", basicData.statsData().starCount()); + jsonObject.addProperty("fork_count", basicData.statsData().forkCount()); + jsonObject.addProperty("open_issue_count", basicData.statsData().openIssueCount()); + + Utils.patchAsAdmin(backendUrl + "?software=eq." + basicData.basicData() + .software() + .toString(), jsonObject.toString()); } public void saveContributorCount(ContributorDatabaseData contributorData) { JsonObject jsonObject = new JsonObject(); jsonObject.add("contributor_count_last_error", JsonNull.INSTANCE); - jsonObject.addProperty("contributor_count_scraped_at", contributorData.dataScrapedAt().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); + jsonObject.addProperty("contributor_count_scraped_at", contributorData.dataScrapedAt() + .format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)); if (contributorData.contributorCount() != null) { jsonObject.addProperty("contributor_count", contributorData.contributorCount()); } - Utils.patchAsAdmin(backendUrl + "?software=eq." + contributorData.basicData().software().toString(), jsonObject.toString()); + Utils.patchAsAdmin(backendUrl + "?software=eq." + contributorData.basicData() + .software() + .toString(), jsonObject.toString()); } } diff --git a/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GithubScraperIT.java b/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GithubScraperIT.java index 0e0266bce..114b12e92 100644 --- a/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GithubScraperIT.java +++ b/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GithubScraperIT.java @@ -34,7 +34,7 @@ void languages() { @Disabled @Test void license() { - String license = Assertions.assertDoesNotThrow(() -> githubScraper.basicData().license); + String license = Assertions.assertDoesNotThrow(() -> githubScraper.basicData().license()); Assertions.assertEquals("Apache-2.0", license); } diff --git a/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GitlabScraperIT.java b/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GitlabScraperIT.java index 780720124..a4a49932e 100644 --- a/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GitlabScraperIT.java +++ b/scrapers/src/test/java/nl/esciencecenter/rsd/scraper/git/GitlabScraperIT.java @@ -29,7 +29,7 @@ void languages() { @Disabled @Test void license() { - String license = Assertions.assertDoesNotThrow(() -> scraper.basicData().license); + String license = Assertions.assertDoesNotThrow(() -> scraper.basicData().license()); Assertions.assertEquals("MIT License", license); } @@ -38,7 +38,7 @@ void license() { void licenseDoesNotExist() { // unlicensed projects should return null // we need to find a suitable project or create a mocked interface - String license = Assertions.assertDoesNotThrow(() -> scraper.basicData().license); + String license = Assertions.assertDoesNotThrow(() -> scraper.basicData().license()); Assertions.assertNull(license); }