Skip to content

feat: modern packaging#12

Open
bilalix wants to merge 5 commits intohci-lab:releasefrom
bilalix:feat/modern-packaging
Open

feat: modern packaging#12
bilalix wants to merge 5 commits intohci-lab:releasefrom
bilalix:feat/modern-packaging

Conversation

@bilalix
Copy link
Copy Markdown

@bilalix bilalix commented Feb 27, 2026

This PR aims to bring the package up to date, as well as improve support and modernise the repo

Main changes:

  • Add editable-install support
  • Add support for Python 3.12 (Fixes issue newer versions of NumPy #10 )
  • Add GitHub Actions to run tests on every push

More details in the commit descriptions

Add modern packaging metadata so the repo can be installed locally with pip install -e . while preserving legacy import paths.

  - add pyproject.toml with setuptools backend and project metadata
  - add MANIFEST.in and package corpus XML data
  - introduce pyquran/ package namespace with wrapper modules for core and tools
  - add top-level shim modules (quran, arabic, searchHelper, filtering, error, buckwalter, shapeHelper) to keep old absolute imports working
  - add QuranCorpus/__init__.py so corpus data is package-addressable
  - make package __init__ resilient when optional runtime deps (numpy, pyarabic) are not yet installed
  - document editable local install steps in README.md

  This is a compatibility-first packaging step, internal import cleanup will follow in a separate refactor commit insha'Allah
Modernize import structure after editable-install bootstrap by removing
  legacy top-level shim modules and converting internal code to use
  pyquran.tools... imports directly.

 - remove root shim modules:
      - arabic.py, quran.py, searchHelper.py, filtering.py,
        error.py, buckwalter.py, shapeHelper.py
  - migrate runtime imports in core/tools to package-qualified paths
  - remove path-mutation bootstrap code from core/__init__.py and
    tools/__init__.py
  - update tests to import from pyquran / pyquran.tools instead of
    manipulating sys.path
  - update testing/run_test.sh to set PYTHONPATH to project root
  - update documentation/auto_gen_docs.py imports to package paths
  - update packaging metadata in pyproject.toml to stop exporting removed
    shim modules
  - fix NumPy compatibility by replacing deprecated numpy.int with
    builtin int in core/pyquran.py

Still need wo figure out why some tests are broken
…zation

- update testing/test_shape_systems.py to call pyquran.count_rasm
- update docs/examples to use count_rasm
- improve recitation symbol filtering in tools/filtering.py:
   - remove additional Quran annotation marks (including U+06D7 and range
     U+06D6..U+06ED)
   - normalize hamza_above (U+0654) to standalone hamza (U+0621)
   - normalize whitespace after symbol removal
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