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: include widths.json as a julia file #8

Merged
merged 8 commits into from
Oct 17, 2024
Merged

fix: include widths.json as a julia file #8

merged 8 commits into from
Oct 17, 2024

Conversation

krynju
Copy link
Member

@krynju krynju commented Oct 17, 2024

fixes #7

@krynju krynju requested a review from aviks October 17, 2024 12:14
src/widths.jl Outdated
const WIDTHS = JSON3.read(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need JSON3 here? Can't we place it as a literal array?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It parses as the inner array as Float64 (instead of Int, Int, Float64)
But it's ok I think. Shouldn't be an issue with the current code charCode >= x[1] && charCode <= x[2]

julia> [32,32,38.67]
3-element Vector{Float64}:
 32.0
 32.0
 38.67

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok regexed it into a tuple with correct types

julia> Badges.WIDTHS
10035-element Vector{Tuple{Tuple{Int64, Int64}, Float64}}:
 ((32, 32), 38.67)
 ((33, 33), 43.29)
 ((34, 34), 50.49)
 ((35, 35), 90.02)

src/Badges.jl Outdated Show resolved Hide resolved
src/Badges.jl Outdated Show resolved Hide resolved
src/Badges.jl Outdated Show resolved Hide resolved
@krynju krynju merged commit 8004e21 into master Oct 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InitError in CI - pathof(Badges) returns nothing
2 participants