pytroll / pytroll/aggdraw

Convert wrapper to Cython

Open
#45 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category: build enhancement help wanted priority: low
Dominant language
C++
Stars
107
Forks
45
Avg merge
13h 41m
Merged PRs (30d)
7

Description

As discussed in #37, one option to clean up the aggdraw code is to use cython. As mentioned in #43, I recently noticed that all of the classes in aggdraw are actually declared as factory functions instead of real classes. I don't think any of the aggdraw functionality requires this design so it would be nice if the classes were declared as real classes.

I think the best idea would be to convert the C++ file to cython. This should:

  1. Make the code easier to read
  2. Avoid compatibility issues with new versions of python
  3. Limit unicode/bytes issues and handling

I think this rewrite could wait until aggdraw 2.0 and could look at adding #3's functionality/updating the agg version.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the aggdraw C++ file and the discussions in issues #37 and #43, including the reference to #3. The work would be complete when the wrapper is converted to Cython, aggdraw classes are real classes rather than factory functions, and the proposed Python compatibility and Unicode/bytes concerns are addressed for a possible aggdraw 2.0 release.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
computer-graphics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.