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

Update home & build #9

Merged
merged 6 commits into from
Dec 30, 2024
Merged

Update home & build #9

merged 6 commits into from
Dec 30, 2024

Conversation

prisae
Copy link
Member

@prisae prisae commented Dec 18, 2024

Update repo for:

  • the move from prisae to the emsig-org;
  • the build from distutils to meson (thanks @jokva).

@prisae
Copy link
Member Author

prisae commented Dec 18, 2024

This doesn't not work currently on many fronts.

  • Version number - try setuptools_scm again with the new build backend!
  • Tests
  • Wrapper itself
  • Deploy

@prisae
Copy link
Member Author

prisae commented Dec 18, 2024

The current setup fails, if you call fftlog from within the fftlog directory (which is the case for the tests with pytest).

EOD - need to come back on another day.

@jokva
Copy link
Collaborator

jokva commented Dec 19, 2024

I pushed a patch which fixes a part of that issue by simply removing the fftlog/ dir, just doing src/ directly.

@jokva
Copy link
Collaborator

jokva commented Dec 19, 2024

With these patches I see the same test failure in the CI job as I do locally. I figure you're more familiar with the API and can work on that for a bit.

@prisae
Copy link
Member Author

prisae commented Dec 19, 2024

Thanks, much appreciated! That is also the one I had locally. If I remember right, wsave is a "working array" in Fortran that stores all sort of things, which was not needed in the Python version, respectively constructed internally and the user did not have to bother about it. I'll have to dig in to try and remember, will do that over the holidays.

@prisae
Copy link
Member Author

prisae commented Dec 30, 2024

The current error is

E       TypeError: _fftlog.fhti() missing required argument 'wsave' (pos 7)

Something must have changed in f2py, but I cannot figure out what right now. Nothing changed in the signature file (although I tried adding hide to the intent(out), but with the same error).

prisae and others added 5 commits December 30, 2024 17:28
To work with python >= 3.12, which will deprecated numpy.distutils, port
the build to meson and pyproject.

    $ pip install build
    $ python -m build
    $ cd test && python -c "import fftlog; print(fftlog.__all__)"
    ['fhti', 'fftl', 'fht', 'fhtq']

The cd test is to avoid trying to import from $(pwd)/fftlog.

This just changes the build, and does not hard constrain versions.
Follow up work should be to figure out true minimum versions, maybe test
with different compilers, and fix the type error in ifac and friends.

The directory tree is flattened because fftlog/ doesn't form a cohesive
module as-is. Due to the presence of the __init__.py the dir would be
detected as a module and loaded by pytest and friends, shadowing the
installed one and failing because it does not find the native extension.

Finally, remove __init__.py from tests/ to not pretend it is a module
anymore.
@prisae prisae merged commit 4c2bfa1 into main Dec 30, 2024
5 checks passed
@prisae prisae deleted the update-build branch December 30, 2024 16:42
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.

2 participants