Skip to content

Commit

Permalink
Merge pull request #322 from georgetown-cset/20241029-data-update
Browse files Browse the repository at this point in the history
Update data, prevent minor schema changes from breaking pipeline
  • Loading branch information
jmelot authored Oct 30, 2024
2 parents 3fe1143 + bdf6adc commit 4651bfd
Show file tree
Hide file tree
Showing 9 changed files with 19,979 additions and 20,968 deletions.
22 changes: 11 additions & 11 deletions github-metrics/src/components/dashboard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ describe("filter panel", () => {
let topReposHeading;
let topEntries

expect(screen.getByRole("heading", { name: currentlyTrackingHeading(8541, "artificial intelligence") })).toBeVisible();
expect(screen.getByRole("heading", { name: currentlyTrackingHeading(8051, "artificial intelligence") })).toBeVisible();
topReposHeading = screen.getByRole("heading", { name: "Top repositories by stars" });
topEntries = getAllByRole(topReposHeading.parentElement, "listitem");
expect(topEntries[0].textContent).toEqual("public-apis/public-apis311473 stars (-70.86%, 2023-2024)");
expect(topEntries[1].textContent).toEqual("facebook/react226953 stars (-75.51%, 2023-2024)");
expect(topEntries[0].textContent).toEqual("public-apis/public-apis315581 stars (-70.86%, 2023-2024)");
expect(topEntries[1].textContent).toEqual("facebook/react228410 stars (-75.51%, 2023-2024)");

await user.click(screen.getByRole('combobox'));
expect(screen.getByText("Astrobiology")).toBeVisible();
Expand All @@ -32,11 +32,11 @@ describe("filter panel", () => {
});
await new Promise(res => setTimeout(res, 500));

expect(screen.getByRole("heading", { name: currentlyTrackingHeading(100, "astrobiology") })).toBeVisible();
expect(screen.getByRole("heading", { name: currentlyTrackingHeading(97, "astrobiology") })).toBeVisible();
topReposHeading = screen.getByRole("heading", { name: "Top repositories by stars" });
topEntries = getAllByRole(topReposHeading.parentElement, "listitem");
expect(topEntries[0].textContent).toEqual("keras-team/keras61559 stars (-75.75%, 2023-2024)");
expect(topEntries[1].textContent).toEqual("google/jax29746 stars (-69.67%, 2023-2024)");
expect(topEntries[0].textContent).toEqual("keras-team/keras61897 stars (-75.75%, 2023-2024)");
expect(topEntries[1].textContent).toEqual("jax-ml/jax30264 stars (-69.67%, 2023-2024)");
});


Expand All @@ -45,7 +45,7 @@ describe("filter panel", () => {
<Dashboard />
);

expect(screen.getByRole("heading", { name: currentlyTrackingHeading(100, "astrobiology") })).toBeVisible();
expect(screen.getByRole("heading", { name: currentlyTrackingHeading(97, "astrobiology") })).toBeVisible();

await user.click(screen.getByRole('checkbox'));
await new Promise(res => setTimeout(res, 500));
Expand Down Expand Up @@ -78,7 +78,7 @@ describe("filter panel", () => {
await user.click(getByRole(dropdownList, 'option', { name: "Open issues and PRs" }));

cards = screen.getAllByTestId("project-card");
expect(getByRole(cards[0], "heading", { name: "google/jax" })).toBeVisible();
expect(getByRole(cards[0], "heading", { name: "jax-ml/jax" })).toBeVisible();

});

Expand All @@ -89,7 +89,7 @@ describe("filter panel", () => {
);

let cards = screen.getAllByTestId("project-card");
expect(getByRole(cards[0], "heading", { name: "google/jax" })).toBeVisible();
expect(getByRole(cards[0], "heading", { name: "jax-ml/jax" })).toBeVisible();
expect(cards[0].textContent).toContain("Commits over time");

await user.click(screen.getByRole('button', { name: "Show graphs for Commits over time" }));
Expand Down Expand Up @@ -123,10 +123,10 @@ describe("filter panel", () => {

// Check prior state
let topPanel = screen.getByTestId('top-panel');
expect(getByText(topPanel, "Showing 100 repositories", { exact: false })).toBeVisible();
expect(getByText(topPanel, "Showing 97 repositories", { exact: false })).toBeVisible();
let cards = screen.getAllByTestId("project-card");
expect(cards.length).toEqual(10); // Pagination shows only 10 per page
expect(getByRole(cards[0], "heading", { name: "google/jax" })).toBeVisible();
expect(getByRole(cards[0], "heading", { name: "jax-ml/jax" })).toBeVisible();

// Filter by language
await user.click(screen.getByRole('button', { name: "Filter by top programming language All" }));
Expand Down
2 changes: 1 addition & 1 deletion github-metrics/src/data/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"start_year": 2018, "end_year": 2024, "last_updated": "September 17, 2024"}
{"start_year": 2018, "end_year": 2024, "last_updated": "October 29, 2024"}
2 changes: 1 addition & 1 deletion github-metrics/src/data/field_to_repos.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion github-metrics/src/data/fields.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["Renewable Energy", "Food science", "Cardiology", "Cell biology", "Software engineering", "Sustainable Development", "Pathology", "Computational chemistry", "Quantum mechanics", "Theoretical physics", "Media studies", "Astrophysics", "Particle physics", "Acoustics", "Climate and Earth Science", "Geophysics", "Geomorphology", "Zoology", "Physical chemistry", "Econometrics", "Algebra", "Thermodynamics", "Energy Storage", "Mathematical optimization", "Reliability engineering", "Botany", "Agroforestry", "Evolutionary biology", "Computer hardware", "Linguistics", "Consumption of Energy and Resources", "Astronomy", "Optics", "Remote sensing", "Industrial Ecology", "Bioinformatics", "Molecular physics", "Oceanography", "Control theory", "Cancer research", "Automotive engineering", "Condensed matter physics", "Geometry", "ai_safety", "Social science", "Genetics", "Meteorology", "Advertising", "Social psychology", "Epistemology", "Virology", "Immunology", "weto", "Atmospheric sciences", "Nuclear magnetic resonance", "Seismology", "Anatomy", "International economics", "Semiconductors", "Microbiology", "Embedded system", "Computer security", "Mathematical analysis", "Water resource management", "Visual arts", "Finance", "Surgery", "Pharmacology", "Topology", "Natural Resources", "Calculus", "riscv", "Computer engineering", "Financial system", "Gender studies", "Neuroscience", "Theoretical computer science", "Ecology", "Emissions", "Molecular biology", "Quantum electrodynamics", "Artificial intelligence", "Organic chemistry", "Astrobiology", "Energy Systems", "Computational physics", "Radiology", "Financial economics", "Hydrology", "Cognitive science", "Nuclear physics", "Medical education", "Earth Systems", "Quantum computing"]
["Embedded system", "Mathematical optimization", "Linguistics", "Semiconductors", "Econometrics", "Evolutionary biology", "Social science", "Geomorphology", "Atmospheric sciences", "Medical education", "Control theory", "weto", "Quantum computing", "Molecular physics", "Mathematical analysis", "Cancer research", "Oceanography", "Nuclear physics", "Emissions", "Astrobiology", "Remote sensing", "Industrial Ecology", "International economics", "Earth Systems", "Hydrology", "Molecular biology", "Social psychology", "Epistemology", "Optics", "Water resource management", "Bioinformatics", "Sustainable Development", "Gender studies", "Condensed matter physics", "Acoustics", "Consumption of Energy and Resources", "Reliability engineering", "Botany", "Renewable Energy", "Artificial intelligence", "Financial economics", "Nuclear magnetic resonance", "Topology", "Computational chemistry", "Cardiology", "Immunology", "Advertising", "Geophysics", "Quantum mechanics", "Computer engineering", "Neuroscience", "Algebra", "Organic chemistry", "Particle physics", "Seismology", "Astronomy", "Microbiology", "ai_safety", "Energy Systems", "Geometry", "Astrophysics", "Calculus", "Automotive engineering", "Computational physics", "Agroforestry", "Meteorology", "Natural Resources", "Pharmacology", "Theoretical physics", "Visual arts", "Cognitive science", "Surgery", "Ecology", "Quantum electrodynamics", "Radiology", "Physical chemistry", "Zoology", "Anatomy", "Virology", "Financial system", "Theoretical computer science", "Software engineering", "Climate and Earth Science", "riscv", "Energy Storage", "Computer security", "Pathology", "Cell biology", "Media studies", "Computer hardware", "Finance", "Thermodynamics", "Genetics", "Food science"]
Loading

0 comments on commit 4651bfd

Please sign in to comment.