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

syntax-highlighting ng (new fork) #48

Open
3 tasks done
cav71 opened this issue Dec 19, 2023 · 2 comments
Open
3 tasks done

syntax-highlighting ng (new fork) #48

cav71 opened this issue Dec 19, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@cav71
Copy link

cav71 commented Dec 19, 2023

Checklist

Please replace the space inside the brackets with an x if the following items apply:

  • I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
  • I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
  • I've checked if anyone else suggested this feature before by looking through the issue reports.

Problem case

So far it looks there are quite few issues in the backburner, due to a combination of lack of manpower (likely), old code support (eg. mixed py2/py3) etc.

Solution

I decided to fork it and try to address them into a new fork called syntax-highlighting-ng.

The main goals here are:

  • support fully python 3.x (no backward compatibility)
  • use only anki21 (no backward compatibility)
  • start to refactor the code base so it is locally testable without using the main application (pytest)
  • support for mypy/ruff/black out of the box on commit (pre-commit)

The source is located here and the new addon is here.

@cav71 cav71 added the enhancement New feature or request label Dec 19, 2023
@Barabazs
Copy link

Too bad you didn't actually "fork" the repo, but re-uploaded the code. Otherwise we would have a nice way of comparing your changes with the original code and assess if your changes are safe to use.

@cav71
Copy link
Author

cav71 commented Apr 17, 2024

I wouldn't re-uploaded the code if the changes were smaller, the new version introduces:

  • a newer pygments under libs using a whl file (easier to manage/update)
  • drops support for older anki20 (that means less code to maintain)
  • typing!
  • support for pre-commit (eg. it helps to keep the code clean)
  • adds tests!
  • support github workflows on the commit

As well cleaning up the code and cover it with a set of tests (that should make easier to maintain)

You can check out latest version of both and see the differences side by side, the code retain the original structure, to make the comparison easier (that was a deliberate choice).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants