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

announcement for eventID backfill, sample code #2827

Draft
wants to merge 69 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
fb50eea
add in-page lucene docs
tylerbarna Nov 12, 2024
7edb810
add lucene examples back
tylerbarna Dec 8, 2024
4cdd37a
add copyright
tylerbarna Dec 12, 2024
6361cc6
correct link to further docs
tylerbarna Dec 12, 2024
4877cd8
remove reference to "page"
tylerbarna Dec 12, 2024
a5b7d41
remove unneeded div
tylerbarna Dec 12, 2024
188f23a
Merge branch 'main' into circulars-lucene-in-page-documentation
tylerbarna Dec 12, 2024
7e6a6fd
correct merge with main
tylerbarna Dec 12, 2024
d34ed8f
restyle details
tylerbarna Dec 16, 2024
e4ca0ba
change example method
tylerbarna Dec 16, 2024
a176856
rerun checks
tylerbarna Dec 17, 2024
1a40586
draft announcement for eventID backfill
jracusin Jan 10, 2025
2074dbc
Bump isbot from 5.1.20 to 5.1.21
dependabot[bot] Jan 13, 2025
fbc5db0
Replace aws-lambda-ses-forwarder fork with release
lpsinger Jan 16, 2025
f987de6
Merge pull request #2832 from lpsinger/aws-lambda-ses-forwarder
dakota002 Jan 17, 2025
6c4cf08
Add rehype-citation plugin
lpsinger Jan 17, 2025
7bbdc1d
Remove the CopyableCode component, Highlight should be used
dakota002 Jan 17, 2025
fa4ec9c
switch to using Highlight
tylerbarna Jan 17, 2025
f4ed9db
address dakota`s demands
tylerbarna Jan 17, 2025
8dccdad
Merge pull request #2713 from tylerbarna/circulars-lucene-in-page-doc…
dakota002 Jan 17, 2025
d3c34af
Bump the remix group across 1 directory with 6 updates
dependabot[bot] Jan 17, 2025
78f126c
Courey/update table stream (#2781)
Courey Jan 17, 2025
aa737a9
Use released version of @architect/inventory
lpsinger Jan 17, 2025
fc81907
remove all mentions of the road map
jracusin Jan 17, 2025
043bf46
Bump lint-staged from 15.3.0 to 15.4.1
dependabot[bot] Jan 20, 2025
210e916
Bump eslint-config-prettier from 9.1.0 to 10.0.1
dependabot[bot] Jan 20, 2025
0242bde
Healpix doc (#2498)
Vidushi-GitHub Jan 20, 2025
a82a6e1
Bump undici from 6.19.8 to 6.21.1
dependabot[bot] Jan 21, 2025
e2be6c9
Bump vite
dependabot[bot] Jan 21, 2025
13335f4
add VTP and code sample announcements
jracusin Jan 23, 2025
1386c8f
add announcements
jracusin Jan 23, 2025
f3b25c7
remove link to ASD statement
jracusin Jan 27, 2025
204b92f
update language
jracusin Jan 31, 2025
9fc7b85
Bump the remix group with 6 updates
dependabot[bot] Feb 3, 2025
d6f64a8
fixing grouping locally
Courey Feb 6, 2025
a1375e5
add FRB keyword
jracusin Feb 7, 2025
8774529
Bump esbuild from 0.24.2 to 0.25.0
dependabot[bot] Feb 11, 2025
cb10d39
Adds regex and test for FRB matches in subject line
dakota002 Feb 11, 2025
fa1c8b8
Makes the event id not required for edits
dakota002 Feb 11, 2025
2cdb809
Merge pull request #2880 from dakota002/FRB-Match
dakota002 Feb 11, 2025
9e00deb
Fix logic
dakota002 Feb 11, 2025
054417b
Moves the date filter button
dakota002 Feb 11, 2025
9a099a6
Bump koa from 2.15.3 to 2.15.4
dependabot[bot] Feb 12, 2025
1e8c120
Merge pull request #2881 from dakota002/eventIdNotRequired
jracusin Feb 14, 2025
7496c15
Allows undefined event Ids as default
dakota002 Feb 14, 2025
596be8a
Better formatting
dakota002 Feb 14, 2025
4c65332
Bump @octokit/plugin-paginate-rest from 11.3.0 to 11.4.2
dependabot[bot] Feb 14, 2025
918ddac
Bump @octokit/endpoint from 10.1.1 to 10.1.3
dependabot[bot] Feb 14, 2025
dde73ee
Bump @octokit/request-error from 6.1.1 to 6.1.7
dependabot[bot] Feb 14, 2025
eee217d
Merge pull request #2890 from dakota002/DefaultEventBugFix
jracusin Feb 18, 2025
d4e0542
Add SVOM to subject keyword list
lpsinger Feb 18, 2025
adf0363
Bump @octokit/request from 9.1.1 to 9.2.2
dependabot[bot] Feb 17, 2025
a41ed38
Fix some spelling errors
lpsinger Feb 18, 2025
8a6b550
Bump @xmldom/xmldom from 0.9.6 to 0.9.7
dependabot[bot] Feb 3, 2025
eae948a
Add SVOM mission page
timroland Feb 7, 2025
5ad4073
Fix spelling (American English, not British English)
lpsinger Feb 18, 2025
306f780
Adds svom voevent topics
dakota002 Feb 19, 2025
2345feb
Different feature flag
dakota002 Feb 19, 2025
490046a
moved VTP retirement standalone
jracusin Feb 20, 2025
1110827
Parse JSON Section in Sample Code (#2873)
Vidushi-GitHub Feb 20, 2025
69f3661
fix merge conflicts
jracusin Feb 20, 2025
c83d72b
Merge pull request #2868 from jracusin/svom_voe_announce
jracusin Feb 20, 2025
d7160ea
fixed new banner
jracusin Feb 20, 2025
fdcee59
add SVOM source name subject matcher
jracusin Feb 20, 2025
d555fcd
remove SVOM feature flag (#2907)
jracusin Feb 20, 2025
11fe677
fix SVOM VT name typo
jracusin Feb 21, 2025
6a9c6a9
Merge pull request #2911 from jracusin/svom-vt-typo
jracusin Feb 21, 2025
b783622
draft announcement for eventID backfill
jracusin Jan 10, 2025
7d968a9
resolving merge conflicts
jracusin Feb 21, 2025
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
104 changes: 103 additions & 1 deletion __tests__/circulars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ describe('parseEventFromSubject', () => {
const sgrEvent = 'SGR 1935+2154'
const ztfEvent = 'ZTF23aabmzlp'
const epEvent = 'EP241119a'
const frbEvent = 'FRB 20250206A'
const svomEvent = 'sb25021804'

test('handles nonsense subject cases', () => {
expect(parseEventFromSubject('zawxdrcftvgbhnjm')).toBe(undefined)
Expand Down Expand Up @@ -572,11 +574,111 @@ describe('parseEventFromSubject', () => {
expect(parseEventFromSubject(baksanSubjectWithHyphen)).toBe(baksanEvent)
})
})

describe('FRB', () => {
test('handles FRB event names', () => {
const frbSubject =
'FRB 20250206A: MASTER observations and possible mother galaxy'
expect(parseEventFromSubject(frbSubject)).toBe(frbEvent)
})

test('handles FRB event names in misc positions', () => {
const frbSubjectWithSpace =
'MASTER observations:FRB 20250206A and possible mother galaxy'
expect(parseEventFromSubject(frbSubjectWithSpace)).toBe(frbEvent)
})

test('handles FRB event names without space', () => {
const frbSubjectWithNoSpace =
'FRB20250206A: MASTER observations and possible mother galaxy'
expect(parseEventFromSubject(frbSubjectWithNoSpace)).toBe(frbEvent)
})

test('handles FRB event names without spaces in misc positions', () => {
const frbSubjectWithSpace =
'MASTER observations: FRB20250206A and possible mother galaxy'
expect(parseEventFromSubject(frbSubjectWithSpace)).toBe(frbEvent)
})

test('handles FRB event name with an underscore', () => {
const frbSubjectWithUnderscore =
'FRB_20250206A: MASTER observations and possible mother galaxy'
expect(parseEventFromSubject(frbSubjectWithUnderscore)).toBe(frbEvent)
})

test('handles FRB event names with an underscore in misc positions', () => {
const frbSubjectWithUnderscore =
'MASTER observations and FRB_20250206A: possible mother galaxy'
expect(parseEventFromSubject(frbSubjectWithUnderscore)).toBe(frbEvent)
})

test('handles FRB event name with a hyphen', () => {
const frbSubjectWithHyphen =
'FRB-20250206A: MASTER observations and possible mother galaxy'
expect(parseEventFromSubject(frbSubjectWithHyphen)).toBe(frbEvent)
})

test('handles FRB event name with a hyphen in misc positions', () => {
const frbSubjectWithHyphen =
'MASTER observations: FRB-20250206A and possible mother galaxy'
expect(parseEventFromSubject(frbSubjectWithHyphen)).toBe(frbEvent)
})
})

describe('SVOM', () => {
test('handles SVOM event names', () => {
const svomSubject =
'SVOM/sb25021804: SVOM detection of a long X-ray transient'
expect(parseEventFromSubject(svomSubject)).toBe(svomEvent)
})

test('handles SVOM event names in misc positions', () => {
const svomSubjectWithNoSpace =
'SVOM detection: SVOM/sb25021804 a long X-ray transient'
expect(parseEventFromSubject(svomSubjectWithNoSpace)).toBe(svomEvent)
})

test('handles SVOM event names with space', () => {
const svomSubjectWithSpace =
'SVOM/sb 25021804: SVOM detection of a long X-ray transient'
expect(parseEventFromSubject(svomSubjectWithSpace)).toBe(svomEvent)
})

test('handles SVOM event names with spaces in misc positions', () => {
const svomSubjectWithSpace =
'SVOM detection: SVOM/sb25021804 a long X-ray transient'
expect(parseEventFromSubject(svomSubjectWithSpace)).toBe(svomEvent)
})

test('handles SVOM event name with an underscore', () => {
const svomSubjectWithUnderscore =
'SVOM/sb_25021804: SVOM detection of a long X-ray transient'
expect(parseEventFromSubject(svomSubjectWithUnderscore)).toBe(svomEvent)
})

test('handles SVOM event names with an underscore in misc positions', () => {
const svomSubjectWithUnderscore =
'SVOM detection: SVOM/sb25021804 a long X-ray transient'
expect(parseEventFromSubject(svomSubjectWithUnderscore)).toBe(svomEvent)
})

test('handles SVOM event name with a hyphen', () => {
const svomSubjectWithHyphen =
'SVOM/sb-25021804: SVOM detection of a long X-ray transient'
expect(parseEventFromSubject(svomSubjectWithHyphen)).toBe(svomEvent)
})

test('handles SVOM event name with a hyphen in misc positions', () => {
const svomSubjectWithHyphen =
'SVOM detection: SVOM/sb-25021804 a long X-ray transient'
expect(parseEventFromSubject(svomSubjectWithHyphen)).toBe(svomEvent)
})
})
})

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'))
})
})
Loading
Loading