René's URL Explorer Experiment


Title: Nhs number generator improvements by Khoross · Pull Request #121 · codonlibrary/codonPython · GitHub

Open Graph Title: Nhs number generator improvements by Khoross · Pull Request #121 · codonlibrary/codonPython

X Title: Nhs number generator improvements by Khoross · Pull Request #121 · codonlibrary/codonPython

Description: Please check if the Pull Request fulfills these requirements [Y] The commit message is clear and concise [Y] Test for the changes have been added and reviewed [Y] Documentation has been added to all new features and edited code has had documentation reviewed What kind of change does this Pull request introduce? Replacement for the NHS number generator algorithm What is the current behaviour? Currently numbers are generated via a Monte Carlo method, generating random numbers until sufficiently many valid numbers have been made. This takes on average 11 attempts per number requested. This is also done sequentially rather than in a parallel or vectorized method. What is the new behaviour? An algorithm based on modular arithmetic to generate known valid numbers. This works as follows: The central 8 digits of the NHS number are generated, uniformly from 0 to 9 The contribution of the central digits to the check digit is calculated A random number from 1 to 8 is generated for the leading digit We calculate the leading digit value for which there would be an invalid check digit If the random number for the leading digit is at or above the calculated value, then we increase it by 1 We finally calculate the (guaranteed to be valid) check digit This is all performed using numpy, to allow for vectorized calculations, greatly speeding up processing time if a large number are required. Does this Pull Request introduce a breaking change? The new algorithm interacts with the random number generator in a different way, and so produces different results from the same seed. This cannot be avoided.

Open Graph Description: Please check if the Pull Request fulfills these requirements [Y] The commit message is clear and concise [Y] Test for the changes have been added and reviewed [Y] Documentation has been added to ...

X Description: Please check if the Pull Request fulfills these requirements [Y] The commit message is clear and concise [Y] Test for the changes have been added and reviewed [Y] Documentation has been added to ...

Opengraph URL: https://github.com/codonlibrary/codonPython/pull/121

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b9f7aa66-a4e8-de96-f1e0-186ac6fbb106
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDE66:1489B0:A2CD1:E7906:6A50EC87
html-safe-nonce05089244f2f2f559d41ef7000b1029cd0b63fd13e2f448737c10ee77c0c1bebf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTY2OjE0ODlCMDpBMkNEMTpFNzkwNjo2QTUwRUM4NyIsInZpc2l0b3JfaWQiOiI2NDI1OTA2NzMxNzU5NDk2MzI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3a3fc2d91ccfba2802990da2e355e1901d751de54383832897de1dfdbfff6132
hovercard-subject-tagpull_request:389910344
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/codonlibrary/codonPython/pull/121/files
twitter:imagehttps://avatars.githubusercontent.com/u/31031340?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/31031340?s=400&v=4
og:image:altPlease check if the Pull Request fulfills these requirements [Y] The commit message is clear and concise [Y] Test for the changes have been added and reviewed [Y] Documentation has been added to ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/codonlibrary/codonPython git https://github.com/codonlibrary/codonPython.git
octolytics-dimension-user_id52656738
octolytics-dimension-user_logincodonlibrary
octolytics-dimension-repository_id196361780
octolytics-dimension-repository_nwocodonlibrary/codonPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id196361780
octolytics-dimension-repository_network_root_nwocodonlibrary/codonPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasefb19d617b534959801b4b7453938ecf1dfa22131
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/codonlibrary/codonPython/pull/121/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcodonlibrary%2FcodonPython%2Fpull%2F121%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcodonlibrary%2FcodonPython%2Fpull%2F121%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=codonlibrary%2FcodonPython
Reloadhttps://github.com/codonlibrary/codonPython/pull/121/files
Reloadhttps://github.com/codonlibrary/codonPython/pull/121/files
Reloadhttps://github.com/codonlibrary/codonPython/pull/121/files
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
codonlibrary https://github.com/codonlibrary
codonPythonhttps://github.com/codonlibrary/codonPython
Notifications https://github.com/login?return_to=%2Fcodonlibrary%2FcodonPython
Fork 17 https://github.com/login?return_to=%2Fcodonlibrary%2FcodonPython
Star 6 https://github.com/login?return_to=%2Fcodonlibrary%2FcodonPython
Code https://github.com/codonlibrary/codonPython
Issues 0 https://github.com/codonlibrary/codonPython/issues
Pull requests 1 https://github.com/codonlibrary/codonPython/pulls
Actions https://github.com/codonlibrary/codonPython/actions
Projects https://github.com/codonlibrary/codonPython/projects
Wiki https://github.com/codonlibrary/codonPython/wiki
Security and quality 0 https://github.com/codonlibrary/codonPython/security
Insights https://github.com/codonlibrary/codonPython/pulse
Code https://github.com/codonlibrary/codonPython
Issues https://github.com/codonlibrary/codonPython/issues
Pull requests https://github.com/codonlibrary/codonPython/pulls
Actions https://github.com/codonlibrary/codonPython/actions
Projects https://github.com/codonlibrary/codonPython/projects
Wiki https://github.com/codonlibrary/codonPython/wiki
Security and quality https://github.com/codonlibrary/codonPython/security
Insights https://github.com/codonlibrary/codonPython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcodonlibrary%2FcodonPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcodonlibrary%2FcodonPython%2Fissues%2Fnew%2Fchoose
Khorosshttps://github.com/Khoross
codonlibrary:devhttps://github.com/codonlibrary/codonPython/tree/dev
Khoross:nhsNumberGeneratorImprovementshttps://github.com/Khoross/codonPython/tree/nhsNumberGeneratorImprovements
Conversation 17 https://github.com/codonlibrary/codonPython/pull/121
Commits 4 https://github.com/codonlibrary/codonPython/pull/121/commits
Checks 0 https://github.com/codonlibrary/codonPython/pull/121/checks
Files changed https://github.com/codonlibrary/codonPython/pull/121/files
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
Nhs number generator improvements https://github.com/codonlibrary/codonPython/pull/121/files#top
Show all changes 4 commits https://github.com/codonlibrary/codonPython/pull/121/files
05118c6 Use numpy and modular arithmetic to generate valid numbers in one batch Jan 21, 2020 https://github.com/codonlibrary/codonPython/pull/121/commits/05118c607712d4ea57eaaade7638203eebfc5c05
f875ec7 Adjust tests to pass Mar 17, 2020 https://github.com/codonlibrary/codonPython/pull/121/commits/f875ec757c12f7b07ac18e0bd352754a1a406f4e
923577a Coerce results to int Mar 17, 2020 https://github.com/codonlibrary/codonPython/pull/121/commits/923577a13382e88f0df772a66cc7cba553853f4a
0e6687e Update doctest to match result from new algorithm Mar 17, 2020 https://github.com/codonlibrary/codonPython/pull/121/commits/0e6687e3b792cd55d36d36b367bc8d8e45f6c5c2
Clear filters https://github.com/codonlibrary/codonPython/pull/121/files
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
nhsNumber.py https://github.com/codonlibrary/codonPython/pull/121/files#diff-4125a7afa1f9323ff97fc2dd7c49ca6bcf3b1481a8816934d17d30265f5e06a2
nhsNumber_test.py https://github.com/codonlibrary/codonPython/pull/121/files#diff-f1d96b8157f8ceda22cc87cb31d697ebdf6f054a85c997381c1f33f72f00ca4c
codonPython/nhsNumber.pyhttps://github.com/codonlibrary/codonPython/pull/121/files#diff-4125a7afa1f9323ff97fc2dd7c49ca6bcf3b1481a8816934d17d30265f5e06a2
View file https://github.com/codonlibrary/codonPython/blob/0e6687e3b792cd55d36d36b367bc8d8e45f6c5c2/codonPython/nhsNumber.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/codonlibrary/codonPython/pull/121/{{ revealButtonHref }}
https://github.com/codonlibrary/codonPython/pull/121/files#diff-4125a7afa1f9323ff97fc2dd7c49ca6bcf3b1481a8816934d17d30265f5e06a2
https://github.com/codonlibrary/codonPython/pull/121/files#diff-4125a7afa1f9323ff97fc2dd7c49ca6bcf3b1481a8816934d17d30265f5e06a2
https://github.com/codonlibrary/codonPython/pull/121/files#diff-4125a7afa1f9323ff97fc2dd7c49ca6bcf3b1481a8816934d17d30265f5e06a2
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522863941
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522864597
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522864950
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522865086
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522865248
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522865520
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522865681
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522865870
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522866022
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522866217
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522866870
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
codonPython/tests/nhsNumber_test.pyhttps://github.com/codonlibrary/codonPython/pull/121/files#diff-f1d96b8157f8ceda22cc87cb31d697ebdf6f054a85c997381c1f33f72f00ca4c
View file https://github.com/codonlibrary/codonPython/blob/0e6687e3b792cd55d36d36b367bc8d8e45f6c5c2/codonPython/tests/nhsNumber_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/codonlibrary/codonPython/pull/121/{{ revealButtonHref }}
https://github.com/codonlibrary/codonPython/pull/121/files#diff-f1d96b8157f8ceda22cc87cb31d697ebdf6f054a85c997381c1f33f72f00ca4c
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522868038
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522868213
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522874806
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
georgeRobertsonhttps://github.com/georgeRobertson
Nov 13, 2020https://github.com/codonlibrary/codonPython/pull/121/files#r522875006
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/codonlibrary/codonPython/pull/121/files
https://github.com/codonlibrary/codonPython/pull/121/files#diff-f1d96b8157f8ceda22cc87cb31d697ebdf6f054a85c997381c1f33f72f00ca4c
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.