Skip to content

Commit

Permalink
Include stub data in distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
mjumbewu committed Jul 18, 2023
1 parent 99d429d commit 7d2b194
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Copy in stub data
run: cp -r ./stub_data ./dist
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
1 change: 1 addition & 0 deletions app/src/components/CypressGrantsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ export default {
ol {
padding: 0;
list-style: none;
overflow-y: auto;
}
</style>
16 changes: 8 additions & 8 deletions app/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function fetchCustomers() {
where _valid_to > current_timestamp
*/
const results = await papaParsePromise('/stub_data/customers.csv', {
const results = await papaParsePromise('../stub_data/customers.csv', {
header: true,
download: true,
skipEmptyLines: true,
Expand Down Expand Up @@ -72,7 +72,7 @@ async function fetchGrants() {
- eligibleProjectTypes (array of {type, needsAdditionalReview})
- eligibilityCriteria (array of strings)
*/
const grants = (await papaParsePromise('/stub_data/grants.csv', {
const grants = (await papaParsePromise('../stub_data/grants.csv', {
header: true,
download: true,
skipEmptyLines: true,
Expand All @@ -86,39 +86,39 @@ async function fetchGrants() {
}
}

const grantEligiblePrimaryApplicantTypes = (await papaParsePromise('/stub_data/grant_eligible_applicant_types.csv', {
const grantEligiblePrimaryApplicantTypes = (await papaParsePromise('../stub_data/grant_eligible_applicant_types.csv', {
header: true,
download: true,
skipEmptyLines: true,
}))
.data
.reduce(groupBy('grant_name'), {});

const grantEligibleSubApplicantTypes = (await papaParsePromise('/stub_data/grant_eligible_subapplicant_types.csv', {
const grantEligibleSubApplicantTypes = (await papaParsePromise('../stub_data/grant_eligible_subapplicant_types.csv', {
header: true,
download: true,
skipEmptyLines: true,
}))
.data
.reduce(groupBy('grant_name'), {});

const grantEligibleBeneficiaries = (await papaParsePromise('/stub_data/grant_eligible_project_beneficiaries.csv', {
const grantEligibleBeneficiaries = (await papaParsePromise('../stub_data/grant_eligible_project_beneficiaries.csv', {
header: true,
download: true,
skipEmptyLines: true,
}))
.data
.reduce(groupBy('grant_name'), {});

const grantEligibleProjectTypes = (await papaParsePromise('/stub_data/grant_eligible_project_types.csv', {
const grantEligibleProjectTypes = (await papaParsePromise('../stub_data/grant_eligible_project_types.csv', {
header: true,
download: true,
skipEmptyLines: true,
}))
.data
.reduce(groupBy('grant_name'), {});

const grantEligibilityCriteria = (await papaParsePromise('/stub_data/grant_eligibility_criteria.csv', {
const grantEligibilityCriteria = (await papaParsePromise('../stub_data/grant_eligibility_criteria.csv', {
header: true,
download: true,
skipEmptyLines: true,
Expand All @@ -138,7 +138,7 @@ async function fetchGrants() {
}

async function fetchCritieria() {
const results = await papaParsePromise('/stub_data/eligibility_criteria.csv', {
const results = await papaParsePromise('../stub_data/eligibility_criteria.csv', {
header: true,
download: true,
skipEmptyLines: true,
Expand Down

0 comments on commit 7d2b194

Please sign in to comment.