ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/platform/bls/occupations_test.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/platform/bls/occupations_test.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/platform/bls/occupations_test.go
Original SHA-256ee27c37832ebed64ed893adc72d6c6354ed952666f39afc1908a5596e29d1ce3
Git blob SHA55151eae9a9be4c72e39590ea6256512122bed85
Reading-copy SHA-256ee27c37832ebed64ed893adc72d6c6354ed952666f39afc1908a5596e29d1ce3

Original source ↗

Every recorded occurrence

These 11 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/platform/bls/occupations_test.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/platform/bls/occupations_test.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/platform/bls/occupations_test.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

package bls import ( "context" "strings" "testing" ) // TestParseDetailedOccupationsKeepsOnlyDisplayLevel3 pins the oe.occupation parser: given a tab delimited // flat file with a header row, aggregate roll up rows (display level 0, 1, 2), and detailed SOC rows // (display level 3), it keeps ONLY the detailed occupations and captures the six digit SOC and the OEWS // title. A malformed short row and a blank row are skipped rather than failing the parse. func TestParseDetailedOccupationsKeepsOnlyDisplayLevel3(t *testing.T) { // Columns: occupation_code, occupation_name, occupation_description, display_level, selectable, sort_sequence. flat := strings.Join([]string{ "occupation_code\toccupation_name\toccupation_description\tdisplay_level\tselectable\tsort_sequence", "000000\tAll Occupations\tAll occupations rollup\t0\tT\t1", "110000\tManagement Occupations\tManagement rollup\t1\tT\t2", "113021\tComputer and Information Systems Managers\tManage computer systems\t3\tT\t10", "150000\tComputer and Mathematical Occupations\tComputer rollup\t2\tT\t20", "151212\tInformation Security Analysts\tPlan security measures\t3\tT\t30", "151252\tSoftware Developers\tDevelop software\t3\tT\t40", "", // a blank row must be skipped "999999\tShort Row", // a malformed short row must be skipped, not crash }, "\n") occs, err := ParseDetailedOccupations(strings.NewReader(flat)) if err != nil { t.Fatalf("parse occupation list: %v", err) } if len(occs) != 3 { t.Fatalf("only the three display level 3 rows are detailed SOCs, got %d: %+v", len(occs), occs) } want := map[string]string{ "113021": "Computer and Information Systems Managers", "151212": "Information Security Analysts", "151252": "Software Developers", } for _, o := range occs { title, ok := want[o.SOC] if !ok { t.Errorf("unexpected SOC kept: %q", o.SOC) continue } if o.Title != title { t.Errorf("SOC %q title = %q, want %q", o.SOC, o.Title, title) } } // The header row, the rollups, the blank, and the short row must never appear. for _, o := range occs { if o.SOC == "occupation_code" || o.SOC == "000000" || o.SOC == "110000" || o.SOC == "150000" || o.SOC == "999999" { t.Errorf("a non detailed row leaked into the result: %q", o.SOC) } } } // TestFetchDetailedOccupationsRequiresUserAgent proves the download refuses an empty User Agent before any // request is made, since BLS returns 403 to a default or empty User Agent. No network is touched. func TestFetchDetailedOccupationsRequiresUserAgent(t *testing.T) { if _, err := FetchDetailedOccupations(context.Background(), nil, "http://example.invalid", ""); err == nil { t.Fatal("an empty User Agent must be rejected before the BLS request") } }

Search equations, builds, manuscript text, and recovered sources.