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

Updated module to Unicode 15.1 #4

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

gaspardpetit
Copy link

Hello,

I am providing an update to this module for Unicode 15.1; In addition, there are several improvements:

  • This change improves performance of the lookup function by about 300x.; on my PC, running the following:
    start_time = time.time()
    for i in range(0, 65535):
        which_scripts(chr(i))
    end_time = time.time()

Goes from ~3100ms to ~10ms

Some other fixes are also provided for style (pylint), allowing the project to pass pylint.
I have also added unittests to the project, and added github actions to test:

  • the new unittests
  • the documentation in module
  • the readme

I have cleaned and updated the update scripts, and ran them against the Unicode 15.1 files.

As a bonus, I've also added a couple of badges in the README (you will want to point them to your own github actions once merged)

I understand that this project has not been updated in several years, if you are no longer maintaining it, would you mind giving me ownership so I can update PyPI with an updated version?

Reorganize lookup, providing ~300x performance improvements
Update python-package.yml to cover python 3.6 to 3.12
Enable coverage of README.md code in unittests
Generating Scripts class with constants for each supported script name
Updated README - added badges and removed dumb and slow mention
Added a get_scripts method to get the scripts on text
@gaspardpetit
Copy link
Author

  • I also added a get_scripts to get the scripts in a text (rather than in a chr
  • I have also pinned the version of the module to the version of Unicode. If this module was to be released to PyPI, it would be released as 15.1.0

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.

1 participant