Skip to content
Open
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
10 changes: 5 additions & 5 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ docker compose up -d --build
The backend application is available at http://localhost:8080 and the postgres database is exposed on port 5432 with username and password `postgres`.

When you're finished, tear it down with `docker compose down`.


We typically recommend running the front end components locally instead of through Docker to allow for hot reloading when making changes. Run the following from /direct-file/df-client
```bash
Expand All @@ -43,7 +43,7 @@ The front end application is available at http://localhost:3000
# Codebase Overview
The below provides an introduction to various portions of the codebase. Most applications in our system come with a readme.md to explain what they are for. Follow the instructions there on how to build.
> n.b. Most, but not all, of the applications run in docker via running `docker-compose up --build` in the /direct-file directory. In particular, the applications that interact with MeF (status and submit) are read-only and are not included in the docker compose file.
>
>
> Direct File consists of a frontend React application, a suite of backend Java services, and a shared Scala library that ensures that taxpayers receive accurate error messages and UX flow for the tax rules that apply to them.

#### direct-file
Expand Down Expand Up @@ -306,7 +306,7 @@ Most of the project dependencies can be installed using [SDKMAN!](https://sdkman
```sh
docker compose up -d --build
```

1. You should see the following (among other) containers start up:

* direct-file-app — df-client | `df-client`
Expand Down Expand Up @@ -427,6 +427,7 @@ cd direct-file/<project>
```

To run a test individually, run `./mvnw -Dtest=<Name of Test> test` with the test name. For example:

```sh
./mvnw -Dtest=TaxReturnServiceTest test
```
Expand All @@ -446,6 +447,5 @@ To run code coverage in any particular app:
```sh
./mvnw jacoco:report
```
To view the generated report, go to `<app_name>/target/site/jacoco/index.html` and open it in a browser.


To view the generated report, go to `<app_name>/target/site/jacoco/index.html` and open it in a browser.
8 changes: 4 additions & 4 deletions direct-file/backend/src/main/resources/tax/formW2s.xml
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
</Fact>
<Fact path="/formW2s/*/hasSeenLastAvailableScreen">
<Name>Has Seen last available screen</Name>
<Description>Whether the user has seen the last available scren for this W2.</Description>
<Description>Whether the user has seen the last available screen for this W2.</Description>
<Export downstreamFacts="true" />

<Writable>
Expand Down Expand Up @@ -1440,7 +1440,7 @@
</Fact>

<Fact path="/maxMedicareWagesForAnyFilerOnReturn">
<Description>The highest medicare wages a single person on the return recieved</Description>
<Description>The highest medicare wages a single person on the return received</Description>
<Derived>
<GreaterOf>
<Dependency path="/primaryFilerMedicareWages" />
Expand Down Expand Up @@ -5518,7 +5518,7 @@

<Fact path="/flowKnockoutBox15IncomeFromDifferentState">
<Name>Flow Knockout Income from Unsupported State</Name>
<Description>Used to control a knockout for if the filer recieved income from an unsupported
<Description>Used to control a knockout for if the filer received income from an unsupported
state.</Description>
<Export downstreamFacts="true" />

Expand All @@ -5537,7 +5537,7 @@
</Fact>

<Fact path="/formW2s/*/hasKnockoutBox15IncomeFromDifferentState">
<Name>Has Knockout recieved Income from a Different State</Name>
<Name>Has Knockout received Income from a Different State</Name>
<Description>Checks to see if their income is from a different state.</Description>

<Derived>
Expand Down
4 changes: 2 additions & 2 deletions direct-file/backend/src/main/resources/tax/ptc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -738,14 +738,14 @@
</Fact>

<Fact path="/writableHasAdvancedPtc">
<Description>(Writable) Whether the TP has recieved advaned payments of the PTC</Description>
<Description>(Writable) Whether the TP has received advanced payments of the PTC</Description>
<Writable>
<Boolean />
</Writable>
</Fact>

<Fact path="/hasAdvancedPtc">
<Description>Whether the TP has recieved advaned payments of the PTC</Description>
<Description>Whether the TP has received advanced payments of the PTC</Description>
<Derived>
<Switch>
<Case>
Expand Down
6 changes: 3 additions & 3 deletions direct-file/df-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [Variables](#variables)
- [Functions](#functions)
- [How to set and save facts via the variables](#how-to-set-and-save-facts-via-the-variables)
- [Reset the state of facts locally:](#reset-the-state-of-facts-locally)
- [Reset the state of facts locally](#reset-the-state-of-facts-locally)
- [Testing](#testing)
- [Running fact dictionary tests](#running-fact-dictionary-tests)
- [Running a prod build locally](#running-a-prod-build-locally)
Expand Down Expand Up @@ -45,7 +45,7 @@
in order to avoid long waits due to network timeouts during fetches. See the [status README](../status/README.md) to get started.
4. Run `npm install` in df-client directory, to install dependencies
5. Run `npm run start` in df-client directory, to build the application in development mode
6. (Optional) If you want to use the psuedo locale instead of Spanish, you can set `VITE_USE_PSEUDO_LOCALE=true` when starting the server.
6. (Optional) If you want to use the pseudo locale instead of Spanish, you can set `VITE_USE_PSEUDO_LOCALE=true` when starting the server.

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

Expand Down Expand Up @@ -121,7 +121,7 @@ In order to access the variables and functions mentioned above, one needs to hav
5. Run step 3 to see if it's been overwritten.
6. Load the `about-you-intro` screen again to see the new name appear in the UI.

### Reset the state of facts locally:
### Reset the state of facts locally

1. Run `debugFactGraph.download()` to save the fact graph into a local text file.
2. Remove any existing facts you want.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Alert } from '@trussworks/react-uswds';
import {
isBeforeStdDeadline,
isPostStateFilingDeadline,
isPostDeadlineButBeforeMassachussetsDeadline,
isPostDeadlineButBeforeMassachussettsDeadline,
isBeforeResubmissionDeadline,
} from '../../utils/dateUtils.js';
import { useContext, useMemo } from 'react';
Expand Down Expand Up @@ -76,7 +76,7 @@ export const getBannerI18nKeys = (
} else if (isBeforeStdDeadline(now)) {
headingI18nKey = `banner.endOfFilingSeason.headingBeforeStdDeadline`;
bodyI18nKey = `banner.endOfFilingSeason.contentBase`;
} else if (isPostDeadlineButBeforeMassachussetsDeadline(now)) {
} else if (isPostDeadlineButBeforeMassachussettsDeadline(now)) {
headingI18nKey = `banner.endOfFilingSeason.headingBeforeMaDeadline`;
bodyI18nKey = `banner.endOfFilingSeason.contentBase`;
} else if (isPostStateFilingDeadline(now)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const SubmitSubcategory = (
i18nKey='/info/complete/sign-and-submit/tax-owed-pay-later-after-tax-day'
conditions={[`/owesBalance`, { operator: `isFalse`, condition: `/payViaAch` }, `/isAfterTaxDay`]}
/>
{/* // Todo: SOT seems to imply this will route to the dashboard - is that really synonomous with Exit? */}
{/* // Todo: SOT seems to imply this will route to the dashboard - is that really synonymous with Exit? */}
{/* <ExitButton condition={{ operator: `isFalse`, condition: `/hasStateFilingIntegration` }} /> */}
</Screen>
</Subcategory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export const AboutYouSubcategory = (
>
<Heading i18nKey='/heading/you-and-your-family/about-you/will-be-claimed' batches={[`updates-0`]} />
<InfoDisplay i18nKey='/info/you-and-your-family/about-you/will-be-claimed' batches={[`updates-0`]} />
{/* This question is overriden by /taxpayerCannotBeClaimed, so we only let the taxpayer answer it if /taxpayerCannotBeClaimed is false */}
{/* This question is overridden by /taxpayerCannotBeClaimed, so we only let the taxpayer answer it if /taxpayerCannotBeClaimed is false */}
<Boolean
path='/filers/*/willBeClaimed'
condition={{ operator: `isFalse`, condition: `/taxpayerCannotBeClaimed` }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ describe(`FlowConfig`, () => {
}
});

it<LocalTestContext>(`collection context can come from subcategory or be overriden by a CollectionLoop`, ({
it<LocalTestContext>(`collection context can come from subcategory or be overridden by a CollectionLoop`, ({
flowConfig,
}) => {
for (const screen of flowConfig.screens) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ describe(`GET /taxreturns`, () => {
throw new ReadError(`Response was not successful`, 501);
});

// Because we already succesfully rendered once in a previous spec, we won't automatically refresh
// Because we already successfully rendered once in a previous spec, we won't automatically refresh
// returns.
store.dispatch(fetchTaxReturns());
await act(async () => {
Expand Down Expand Up @@ -404,7 +404,7 @@ describe(`save()`, () => {
}
});

test(`error responses with an apiErrorKey are returned and considered translateable`, async () => {
test(`error responses with an apiErrorKey are returned and considered translatable`, async () => {
fakeFetch.mockResolvedValue(
createFetchResponse({
status: 404,
Expand Down
2 changes: 1 addition & 1 deletion direct-file/df-client/df-client-app/src/hooks/useSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const useSubmit = () => {
};
if (e.apiErrorKey === `signing.retriableEsignatureError`) {
config.internalLink = `/flow/complete/sign-and-submit/sign-return-intro`;
// Remeber that the user has failed electronic signing at least once. The user can still retry but
// Remember that the user has failed electronic signing at least once. The user can still retry but
// if they proceed through the legacy signing flow we'll prefer the legacy /submit endpoint next time.
dispatch(setElectronicSignatureFailure());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe(`Relationship tests`, () => {
relationship: `otherDescendantOfSibling`,
relationshipOptionName: `otherDescendantOfSibling`,
qc: true,
// this is correct -- pub 501 specifies only a sibiling's son or daughter. Nothing further.
// this is correct -- pub 501 specifies only a sibling's son or daughter. Nothing further.
qrWithoutMemberOfHousehold: false,
marriedHohQp: false,
xmlName: `NEPHEW`,
Expand Down Expand Up @@ -103,7 +103,7 @@ describe(`Relationship tests`, () => {
relationship: `otherDescendantOfHalfSibling`,
relationshipOptionName: `otherDescendantOfHalfSibling`,
qc: true,
qrWithoutMemberOfHousehold: false, // this is correct -- pub 501 specifies only a half-sibiling's son or daughter.
qrWithoutMemberOfHousehold: false, // this is correct -- pub 501 specifies only a half-sibling's son or daughter.
marriedHohQp: false,
xmlName: `NEPHEW`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ describe(`Dependent age`, () => {
});
});

describe(`Qualifing dependent TIN verification`, () => {
describe(`Qualifying dependent TIN verification`, () => {
it(`A dependent has an SSN`, ({ task }) => {
task.meta.testedFactPaths = [`/familyAndHousehold/*/hasTin`];
const { factGraph } = setupFactGraphDeprecated({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ describe(`EITC eligibility`, () => {
});
});

describe(`Must be ctizen or resident alien all year`, () => {
describe(`Must be citizen or resident alien all year`, () => {
describe(`Single returns`, () => {
const baseCase = {
...filerWithChild,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ describe(`mefBusinessNameLine1Type`, () => {
{ _testName: `not allowed`, input: `.^$/@!£§ÁÉÍÑÓ×ÚÜáéíñóúü[]`, expected: `` },
{
_testName: `special characters`,
input: ` San-Diego's #1 Photograpy & Monkey Biz (.*~;/%") `,
expected: `San-Diego's #1 Photograpy & Monkey Biz (*)`,
input: ` San-Diego's #1 Photography & Monkey Biz (.*~;/%") `,
expected: `San-Diego's #1 Photography & Monkey Biz (*)`,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const twoFilers = {
},
};

describe(`MFJ depednents`, () => {
describe(`MFJ dependents`, () => {
it(`MFJ dependent because of spouse`, ({ task }) => {
task.meta.testedFactPaths = [`/isMFJDependent`];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe(`Taxable social security benefits`, () => {
});
expect(factGraph.get(Path.concretePath(`/taxableSocialSecurityBenefits`, null)).get.toString()).toBe(`0.00`);
});
it(`Starts getting taxed when there is other income in addition to social security income above a threshhold`, ({
it(`Starts getting taxed when there is other income in addition to social security income above a threshold`, ({
task,
}) => {
task.meta.testedFactPaths = [`/taxableSocialSecurityBenefits`];
Expand Down Expand Up @@ -197,7 +197,7 @@ describe(`Taxable social security benefits`, () => {
});
expect(factGraph.get(Path.concretePath(`/taxableSocialSecurityBenefits`, null)).get.toString()).toBe(`0.00`);
});
it(`Starts getting taxed when there is other income in addition to social security income above a threshhold`, ({
it(`Starts getting taxed when there is other income in addition to social security income above a threshold`, ({
task,
}) => {
task.meta.testedFactPaths = [`/taxableSocialSecurityBenefits`];
Expand Down
2 changes: 1 addition & 1 deletion direct-file/df-client/df-client-app/src/utils/dateUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const isBeforeStdDeadline = (now: Date) => {
return currentTime < DAY_WHEN_UNABLE_TO_FILE_FEDERAL.getTime();
};

export const isPostDeadlineButBeforeMassachussetsDeadline = (now: Date) => {
export const isPostDeadlineButBeforeMassachussettsDeadline = (now: Date) => {
const currentTime = now.getTime();
return currentTime >= DAY_WHEN_UNABLE_TO_FILE_FEDERAL.getTime() && currentTime < DAY_WHEN_UNABLE_TO_FILE_MA.getTime();
};
Expand Down
2 changes: 1 addition & 1 deletion direct-file/df-client/df-static-site/src/pages/Done.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Done = () => {
</Helmet>
<SubHeader />
<Breadcrumbs href={PREV} />
{/* We are currrently commenting out this ternary operater as we are temporarily removing the
{/* We are currently commenting out this ternary operator as we are temporarily removing the
"closing soon" state until designers and product have a chance to review this copy */}
{/* {phase?.showOpenDoneSection ? (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import scala.util.{Try, Success, Failure}
import gov.irs.factgraph.monads.JSEither
import gov.irs.factgraph.validation.{ValidationFailure, ValidationFailureReason}

// NOTE: These classes and types are specified just to simplify some front-end logstics
// NOTE: These classes and types are specified just to simplify some front-end logistics
// This pattern may need some reconsideration to minimize boilerplate

@JSExportAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ object StringFactory:
StringFailureReason.InvalidForm1099rBox11Year,
),
MefRatioTypeAsPercentPattern -> (
"Invalid characters for pecentage field",
"Invalid characters for percentage field",
StringFailureReason.InvalidMefRatioType,
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import gov.irs.factgraph.types.Dollar
//
// [1]: https://www.irs.gov/pub/irs-pdf/f1040.pdf
//
// There is a relationship betwen lines 12a, 12b, and 12c. In order to know what
// There is a relationship between lines 12a, 12b, and 12c. In order to know what
// should be entered in 12c, we need to first know the values of 12a and 12b.
//
// This pattern might remind you of a spreadsheet. If we were to transcribe Form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ graph.get("/factC")
// refund owed or balance due. There will be a set of tax credits for which we
// have not yet determined the taxpayer's eligibility. In this case, it would be
// far better to assume the taxpayer is ineligible until we can conclusively
// prove their eligibility, rather than presuming eligilibity and taking credits
// prove their eligibility, rather than presuming eligibility and taking credits
// away from the taxpayer one by one.
//
// Conversely, we might imagine a Fact that represents whether the taxpayer's
Expand Down Expand Up @@ -141,7 +141,7 @@ graph.save()

graph.get("/conclusion")

// Unsuprisingly, the value is false. But more significantly, despite fact C
// Unsurprisingly, the value is false. But more significantly, despite fact C
// still being missing, the result is now complete. This makes sense if we think
// about whether the value of fact C could affect the result. Now that fact B is
// false, the value of fact C no longer matters; no matter what, the children of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ val graph = Graph(
graph.get("/tax")

// Note that when the arguments to an operation serve different roles, the
// operations require us to explicilty label them. So while Add and Multiply can
// operations require us to explicitly label them. So while Add and Multiply can
// take arguments in any order, Subtract and Divide use Minuend/Subtrahends and
// Dividend/Divisors to avoid ambiguity. Similarly, comparison operations like
// LessThanOrEqual explicitly specify Left and Right.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.util.UUID
//
// In the last chapter, we described Collections and CollectionItems as Facts
// with special properties. In this chapter, we'll explore some more of those
// special proprties, and also look at how we can operate on Collections and
// special properties, and also look at how we can operate on Collections and
// CollectionItems same as we would any other Fact.
//
// As we often do, let's start by building a FactDictionary with some examples.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class TinNodeSpec extends AnyFunSpec:
assert(fact.get(0) == Result.Complete(Tin("999-99-0000")))
}
it("accepts an argument allowing TINs that are all 0's") {
// On W-2s, if a filer hasn't recieved a TIN by the time the W-2 is
// On W-2s, if a filer hasn't received a TIN by the time the W-2 is
// printed, the W-2 might have an SSN of 000-00-0000, so we have a flag
// to allow that
val dictionary = FactDictionary()
Expand Down
Loading