Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some spelling errors #2900

Merged
merged 1 commit into from
Feb 18, 2025
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 __playwright__/circulars/archive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test.describe('Circulars archive page', () => {
})

test('search finds no results for query with typo', async ({ page }) => {
// this highlights this search behaviour does not capture cases where there is a minor typo
// this highlights this search behavior does not capture cases where there is a minor typo
await page.goto('/circulars?query=230812C')
await page.waitForLoadState()
await expect(
Expand Down
2 changes: 1 addition & 1 deletion __tests__/circulars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ describe('parseEventFromSubject', () => {

describe('emailIsAutoReply', () => {
const invalidFwdSubject = 'FWD: Check this out'
test('detects valid subjectline', () => {
test('detects valid subject line', () => {
expect(emailIsAutoReply(invalidFwdSubject)).toBe(true)
})
})
Expand Down
14 changes: 7 additions & 7 deletions __tests__/cognito.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
extractAttributeRequired,
} from '~/lib/cognito.server'

const mockUserAttribues: AttributeType[] = [
const mockUserAttributes: AttributeType[] = [
{ Name: 'sub', Value: '00000000-0000-0000-0000-000000000000' },
{ Name: 'email', Value: '[email protected]' },
{ Name: 'name', Value: 'Example User' },
Expand All @@ -21,17 +21,17 @@ const mockUserAttribues: AttributeType[] = [

describe('extractAttribute', () => {
test('extracts name attribute', () => {
expect(extractAttribute(mockUserAttribues, 'name')).toBe('Example User')
expect(extractAttribute(mockUserAttributes, 'name')).toBe('Example User')
})

test('extracts affiliation attribute', () => {
expect(extractAttribute(mockUserAttribues, 'custom:affiliation')).toBe(
expect(extractAttribute(mockUserAttributes, 'custom:affiliation')).toBe(
'The Example Institute'
)
})

test('returns undefined if missing attribute', () => {
expect(extractAttribute(mockUserAttribues, 'username')).toBe(undefined)
expect(extractAttribute(mockUserAttributes, 'username')).toBe(undefined)
})

test('returns undefined if attributes array is undefined', () => {
Expand All @@ -41,20 +41,20 @@ describe('extractAttribute', () => {

describe('extractAttributeRequired', () => {
test('extracts email attribute', () => {
expect(extractAttributeRequired(mockUserAttribues, 'email')).toBe(
expect(extractAttributeRequired(mockUserAttributes, 'email')).toBe(
'[email protected]'
)
})

test('extracts sub attribute', () => {
expect(extractAttributeRequired(mockUserAttribues, 'sub')).toBe(
expect(extractAttributeRequired(mockUserAttributes, 'sub')).toBe(
'00000000-0000-0000-0000-000000000000'
)
})

test('throws error when attribute key is missing', () => {
expect(() =>
extractAttributeRequired(mockUserAttribues, 'username')
extractAttributeRequired(mockUserAttributes, 'username')
).toThrow(new Error('required user attribute username is missing'))
})
})
4 changes: 2 additions & 2 deletions app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
JsonNoticeTypeLinks.KM3NET = '/missions/km3net'
}

const counterfunction = (childRef: HTMLInputElement) => {
const counterFunction = (childRef: HTMLInputElement) => {

Check warning on line 257 in app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx

View check run for this annotation

Codecov / codecov/patch

app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx#L257

Added line #L257 was not covered by tests
if (childRef.checked) {
userSelected.add(childRef.name)
} else {
Expand Down Expand Up @@ -322,7 +322,7 @@
: false,
})),
}))}
childoncheckhandler={counterfunction}
childOnCheckHandler={counterFunction}
/>
<div className="text-bold text-ink">
{humanizedCount(selectedCounter, 'notice type')} selected for{' '}
Expand Down
2 changes: 1 addition & 1 deletion app/components/ReCAPTCHA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useRecaptchaSiteKey } from '~/root'

// Something really weird is going on with default imports here.
// On the server side, BaseReCAPTCHA is the module itself.
// On the client side, BaseReCAPTCAH is the module's default import.
// On the client side, BaseReCAPTCHA is the module's default import.
const BaseRECAPTCHAComponent =
'ReCAPTCHA' in BaseReCAPTCHA
? (BaseReCAPTCHA.ReCAPTCHA as typeof BaseReCAPTCHA)
Expand Down
12 changes: 6 additions & 6 deletions app/components/nested-checkboxes/NestedCheckboxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
interface NestedCheckboxProps extends CheckboxProps {
nodes: CheckboxProps[]
link?: string
childoncheckhandler?: (arg: HTMLInputElement) => void
childOnCheckHandler?: (arg: HTMLInputElement) => void
}

function allTrue(values: boolean[]) {
Expand All @@ -34,7 +34,7 @@
function NestedCheckboxNode({
nodes,
link,
childoncheckhandler = () => null,
childOnCheckHandler = () => null,
...topLevelNodeProps
}: NestedCheckboxProps) {
const [expanded, setExpanded] = useState(false)
Expand All @@ -61,7 +61,7 @@
for (const ref in childRefs.current) {
const childRef = childRefs.current[ref]
if (childRef != null) {
childoncheckhandler(childRef)
childOnCheckHandler(childRef)

Check warning on line 64 in app/components/nested-checkboxes/NestedCheckboxes.tsx

View check run for this annotation

Codecov / codecov/patch

app/components/nested-checkboxes/NestedCheckboxes.tsx#L64

Added line #L64 was not covered by tests
}
}
})
Expand Down Expand Up @@ -133,20 +133,20 @@

interface NestedCheckboxesProps {
nodes: NestedCheckboxProps[]
childoncheckhandler?: (arg: HTMLInputElement) => void
childOnCheckHandler?: (arg: HTMLInputElement) => void
}

export function NestedCheckboxes({
nodes,
childoncheckhandler,
childOnCheckHandler,
}: NestedCheckboxesProps) {
return (
<ul role="tree" aria-multiselectable>
{nodes.map((node) => (
<NestedCheckboxNode
key={node.id}
{...node}
childoncheckhandler={childoncheckhandler}
childOnCheckHandler={childOnCheckHandler}
/>
))}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions app/lib/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type Page =
| { type: 'number'; number: number; isCurrent: boolean }

/**
* Implement the pagination algorithm desscribed at
* Implement the pagination algorithm described at
* https://designsystem.digital.gov/components/pagination/.
* Impmenetation is adapted from https://github.com/trussworks/react-uswds/blob/main/src/components/Pagination/Pagination.tsx */
* Implementation is adapted from https://github.com/trussworks/react-uswds/blob/main/src/components/Pagination/Pagination.tsx */
export function usePagination({
totalPages,
currentPage,
Expand Down
2 changes: 1 addition & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
}
}

/** Don't reevaluate this route's loader due to client-side navigations. */
/** Don't reevaluate this route's loader due to client-side navigation. */
export function shouldRevalidate() {
return false
}
Expand Down
2 changes: 1 addition & 1 deletion app/routes/api.tooltip.arxiv.$.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function loader({ params: { '*': value } }: LoaderFunctionArgs) {
.parseFromString(text, 'text/xml')
.getElementsByTagName('entry')[0]

// If arXiv does not find the article, then it still returns an entyr,
// If arXiv does not find the article, then it still returns an entry,
// although the entry does not contain much. If the id field is missing, then
// we report that it was not found.
if (!entry.getElementsByTagName('id').length) {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/circulars._archive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function DownloadLink({
)
}

/** Don't reevaluate this route's loader due to client-side navigations. */
/** Don't reevaluate this route's loader due to client-side navigation. */
export function shouldRevalidate() {
return false
}
Expand Down
12 changes: 6 additions & 6 deletions app/routes/docs.circulars.corrections/route.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ handle:
breadcrumb: Corrections
---

import requestbuttonscreenshot from './request_correction_button.png'
import versionbuttonscreenshot from './version_button.png'
import requestButtonScreenshot from './request_correction_button.png'
import versionButtonScreenshot from './version_button.png'

# Corrections

Expand All @@ -17,11 +17,11 @@ Anyone with a [peer endorsement](/docs/circulars/submitting#to-request-a-peer-en
## How to request corrections?

1. [Sign in to your GCN account](/login).
2. Go to the [GCN Circulars archive](/circulars) and navigate to the circular that you wish to corret.
2. Go to the [GCN Circulars archive](/circulars) and navigate to the circular that you wish to correct.
3. Select "Request Correction".

<img
src={requestbuttonscreenshot}
src={requestButtonScreenshot}
alt="Screen shot of Circulars archive menu showing how to request corrections."
width="530"
height="49"
Expand All @@ -47,7 +47,7 @@ Our Kafka producer will always produce a new message whenever a change is made t
A version history for revised Circulars is publicly viewable in the archive with the "Versions" dropdown. Information about the revision are added to the Circular header including when it was edited, who requested the edit, and which GCN moderator implemented the edits. The path `https://gcn.nasa.gov/circulars/{circularID}` will always point to the latest version of the Circular.

<img
src={versionbuttonscreenshot}
src={versionButtonScreenshot}
alt="Screen shot of Circulars archive menu for an entry with a version history."
width="496"
height="77"
Expand All @@ -56,4 +56,4 @@ A version history for revised Circulars is publicly viewable in the archive with

## Moderators

Several members of the GCN Team serve as moderators for revision requests. Moderators will see requests in the Circulars archive and be notified via the GCN help desk ticketing system. Any moderator can self-assign the ticket, review the revisions, and either accept, reject, or follow up with the submitter via the helpdesk. Once the revision has been either accepted or rejected, the moderator will close the associated ticket.
Several members of the GCN Team serve as moderators for revision requests. Moderators will see requests in the Circulars archive and be notified via the GCN help desk ticketing system. Any moderator can self-assign the ticket, review the revisions, and either accept, reject, or follow up with the submitter via the help desk. Once the revision has been either accepted or rejected, the moderator will close the associated ticket.
8 changes: 4 additions & 4 deletions app/routes/docs.circulars.styleguide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ trying the Burst Advocate, you can contact the Swift PI by phone (see
Swift TOO web site for information: http://www.swift.psu.edu/)
```

The above Circular is a great example of only the relevant information in the title and the content. Swift detection Circulars are generally longer than the style guide recommends due to reporting infrmation from three unique instruments, in this case two detections and one non-detection.
The above Circular is a great example of only the relevant information in the title and the content. Swift detection Circulars are generally longer than the style guide recommends due to reporting information from three unique instruments, in this case two detections and one non-detection.

This style guide contains information on how to properly prepare a GCN Circular for submission. Before your first submission, and especially when creating templates, please follow the guidlines below.
This style guide contains information on how to properly prepare a GCN Circular for submission. Before your first submission, and especially when creating templates, please follow the guidelines below.

- **One Event per Circular:** Each message should be limited to discussion of a single event, i.e. a GRB, GW detection, or neutrino. Reporting multiple candidate counterparts is acceptable as this is observations specific to a single event. If you have observations on more than one event then you must divide them into multiple circulars. This allows for automated grouping of circulars by individual event.
- **Near-Term**: Circulars must be timely. Their content must be relevant to inform potential additional observations for that specific event. A nominal working definition is a few weeks which is generally sufficient for GRBs and kilonovae; however, long-evolving transients allow for longer term consideration (e.g. the afterglow of GRB 170817A).
Expand Down Expand Up @@ -95,9 +95,9 @@ Acceptable content for the GCN Circulars falls within only four areas:
<CircularsKeywords />

- **Contact Information:** You can list "contact" information (e.g. phone number(s) & e-mail address(s), especially if different than the address that appears in the by-line) to allow the reader to contact you for further communications. However, ensure email signatures are not sent in the email content for your circular.
- **Total Length:** Circular submissions should be brief, generally less than 60 lines, as they must be easily digestable by observers for prompt follow-up. The text must contain the salient information for follow-up.
- **Total Length:** Circular submissions should be brief, generally less than 60 lines, as they must be easily digestible by observers for prompt follow-up. The text must contain the salient information for follow-up.
- **Line Wrapping:** When using the legacy GCN Classic system, it was common practice for Circulars submitters to add line breaks to manually wrap long paragraphs. This practice is no longer recommended.
- **URLs & Tables:** It is acceptable to provide a URL in cases where content does not fit within the Style Guide. The URL must be active at the time of Circular submission. Examples include reports of many observations, images or spectra, or detailed descriptions of model assumptions for predictive circulars. However, see "Dont's" below.
- **URLs & Tables:** It is acceptable to provide a URL in cases where content does not fit within the Style Guide. The URL must be active at the time of Circular submission. Examples include reports of many observations, images or spectra, or detailed descriptions of model assumptions for predictive circulars. However, see [Dont's](#donts) below.
- **Tabs and Special Characters:** The use of tabs in producing tables is cautioned, because the recipient may have a different tab-stop setting than the one you used (tabstops of 4 and 8 spaces are common). For things like exponentiation, please use techniques like: 1.2x10^-11 erg/cm2-s or 1.2x10E-11 erg/cm^2-s, etc.
- **Mail Formatting** Plain text is extracted from emails and attachments are removed.

Expand Down
8 changes: 4 additions & 4 deletions app/routes/docs.client.samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ prob_density = skymap[match_index]['PROBDENSITY'].to_value(u.deg**-2)
The estimation of a 90% probability region involves sorting the pixels, calculating the area of each pixel, and then summing the probability of each pixel until 90% is reached.

```python
#Sort the pixels by decending probability density
#Sort the pixels by descending probability density
skymap.sort('PROBDENSITY', reverse=True)

#Area of each pixel
Expand All @@ -239,10 +239,10 @@ pixel_area = ah.nside_to_pixel_area(ah.level_to_nside(level))
#Pixel area times the probability
prob = pixel_area * skymap['PROBDENSITY']

#Cummulative sum of probability
#Cumulative sum of probability
cumprob = np.cumsum(prob)

#Pixels for which cummulative is 0.9
#Pixels for which cumulative is 0.9
i = cumprob.searchsorted(0.9)

#Sum of the areas of the pixels up to that one
Expand Down Expand Up @@ -339,4 +339,4 @@ For more information and resources on the analysis of pixelated data on a sphere

- [MOCpy](https://cds-astro.github.io/mocpy/): Python library allowing easy creation, parsing and manipulation of Multi-Order Coverage maps.

## Bibilography
## Bibliography
2 changes: 1 addition & 1 deletion app/routes/docs.code-of-conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Circulars authors can request edits to their own archived Circulars to correct i

## Reproducing GCN Notices or Circulars in External Archives

The GCN team welcomes cross-compatibility between community astronomical resources. GCN Circulars are scholarly publications and that and the expectations of scientific conduct for citing and reproducing them apply. If GCN Notices, Circulars, or their data are used in other systems, please link back to the original source materal at https://gcn.nasa.gov or https://gcn.gsfc.nasa.gov.
The GCN team welcomes cross-compatibility between community astronomical resources. GCN Circulars are scholarly publications and that and the expectations of scientific conduct for citing and reproducing them apply. If GCN Notices, Circulars, or their data are used in other systems, please link back to the original source material at https://gcn.nasa.gov or https://gcn.gsfc.nasa.gov.

## Enforcement

Expand Down
2 changes: 1 addition & 1 deletion app/routes/docs.contributing.configuration/route.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ _All_ environment variables are _optional in local development_. _All_ environme
heading="Important note about distinct API keys"
headingLevel="h4"
>
Every API token documented below should have a distinct value for each [deployment stage](deployment#stages), beacuse:
Every API token documented below should have a distinct value for each [deployment stage](deployment#stages), because:
- it minimizes the security impact of a compromise of the token in one stage, and
- it prevents rate limiting in one deployment stage from impacting other deployment stages.

Expand Down
4 changes: 2 additions & 2 deletions app/routes/docs.contributing.deployment/route.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import websiteArchitectureImg from './website.svg'

# Deployment

This web site is deployed **in the cloud** on [Amazon Web Services (AWS)](https://aws.amazon.com) in order resist outages due to local network conditions or distasters.
This web site is deployed **in the cloud** on [Amazon Web Services (AWS)](https://aws.amazon.com) in order resist outages due to local network conditions or disasters.

Site assets are replicated and cached through a global **[content delivery network](https://en.wikipedia.org/wiki/Content_delivery_network)** ([AWS CloudFront](https://aws.amazon.com/cloudfront/)) to provide the fastest experience possible to scientists everywhere regardless of their country and location.

Expand Down Expand Up @@ -107,7 +107,7 @@ changes to [environment variables](/docs/contributiong/configuration).
On rare occasions that code changes require the creating or modifying AWS
resources other than code, static assets, and environment variables, it may be
necessary to manually deploy the web site from your development computer,
beacuse of the limited permissions associated with the AWS IAM role used by the
because of the limited permissions associated with the AWS IAM role used by the
continuous deployment pipeline. To manually deploy the web site from your own
computer, first [configure the AWS credentials file on your computer](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html).
Then, run the following commands:
Expand Down
6 changes: 3 additions & 3 deletions app/routes/docs.contributing.npr7150.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { Table } from '@trussworks/react-uswds'

# NPR 7150

NASA-funded sofware projects must comply with software engineering requirements specified by the [NASA Procedural Requirements (NPR) 7150.2D](https://nodis3.gsfc.nasa.gov/displayDir.cfm?t=NPR&c=7150&s=2D) document.
NASA-funded software projects must comply with software engineering requirements specified by the [NASA Procedural Requirements (NPR) 7150.2D](https://nodis3.gsfc.nasa.gov/displayDir.cfm?t=NPR&c=7150&s=2D) document.

The software classification determines which of NPR 7150.2D's requirements are in force. GCN is classified as [Class D software for non-safety-criticial applications](https://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PR_7150_002D_&page_name=AppendixD). GCN is fully compliant with the requirements for that classifiation. One of the requirements is that there must be a [requirements matrix](https://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PR_7150_002D_&page_name=AppendixC), which is satisfied by the table below.
The software classification determines which of NPR 7150.2D's requirements are in force. GCN is classified as [Class D software for non-safety-critical applications](https://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PR_7150_002D_&page_name=AppendixD). GCN is fully compliant with the requirements for that classification. One of the requirements is that there must be a [requirements matrix](https://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PR_7150_002D_&page_name=AppendixC), which is satisfied by the table below.

<Table bordered>
<thead>
Expand Down Expand Up @@ -334,7 +334,7 @@ The software classification determines which of NPR 7150.2D's requirements are i
<tr>
<td>4.5.12</td>
<td>The project manager shall verify through test the software requirements that trace to a hazardous event, cause, or mitigation technique.</td>
<td>As a criterion in reivew of pull requests</td>
<td>As a criterion in review of pull requests</td>
</tr>
<tr><td colSpan="3">Software Operations, Maintenance, and Retirement</td></tr>
<tr>
Expand Down
Loading