Add PedigreeTools module for pedigree ID conversion and validation - #6
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| if parallel == :threads | ||
| Threads.@threads for i in 1:n | ||
| v = values[i] |
There was a problem hiding this comment.
[P0] Import Threads before using threading macro
The map_forward method uses Threads.@threads but the module never imports or qualifies the Threads module. During using PedigreeTools Julia evaluates this definition and immediately raises UndefVarError: Threads not defined, so the package cannot be loaded. Pull in Base.Threads or fully qualify the macro before defining the function.
Useful? React with 👍 / 👎.
| birth_col = detect_column(df, [:birthdate, :BirthDate, :dob, :出生日期]) | ||
| if !isnothing(birth_col) | ||
| df[!, birth_col] = Vector{Union{Date,Missing}}(undef, nrow(df)) | ||
| for i in 1:nrow(df) | ||
| v = df[i, birth_col] |
There was a problem hiding this comment.
[P1] Birthdate parsing reads from uninitialized column
The birthdate cleanup block replaces the column with Vector{Union{Date,Missing}}(undef, nrow(df)) and then immediately accesses df[i, birth_col] to parse the original string. Because the original data has already been discarded and the new vector contains uninitialized references, this code throws UndefRefError whenever a birthdate column is present. Parse from a copy of the original data before overwriting the column.
Useful? React with 👍 / 👎.
Summary
Testing
julia --project -e 'using Pkg; Pkg.test()'(fails: command not found: julia)https://chatgpt.com/codex/tasks/task_e_68c104c56a5083288dabda2e54614708