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

Move our build system to poetry #278

Open
alexlib opened this issue Nov 25, 2022 · 7 comments
Open

Move our build system to poetry #278

alexlib opened this issue Nov 25, 2022 · 7 comments

Comments

@alexlib
Copy link
Member

alexlib commented Nov 25, 2022

We first built with setuptools and used requirements.txt to keep dependicies. Then we added Github actions and then followed some recommendation to use pyproject.toml as the future method of consistent builds.

Describe the solution you'd like
Use poetry https://python-poetry.org/docs/basic-usage/ and Github actions for consistent testing, build, doc build, PyPi and ReadTheDocs uploads.

@alexlib
Copy link
Member Author

alexlib commented Nov 25, 2022

@ErichZimmer
Copy link
Contributor

ErichZimmer commented Jun 21, 2023

@alexlib
As we incorporate poetry, should we turn OpenPIV-Python into a namespace package like this?

@alexlib
Copy link
Member Author

alexlib commented Jun 21, 2023

sorry @ErichZimmer i didn't understand what you suggested.

@ErichZimmer
Copy link
Contributor

Instead of having .py files containing all the relevant functions, I think we should create submodules (folders inside of the main openpiv package containing the relevant code) so the code can be broken down into different files. For instance, let's take the windef.py file and make a folder with an _init.py_ in it. Then, we can split windef.py into something like _windef.py (contains the windef class/script), _deformation.py (contains functions related to deformation), and _piv_eval (contains the first pass and multipass deformation PIV code). So a tree structure along the lines as:

openpiv/
    __init__.py
    pyprocess/
        __init__.py
        _correlators.py
        _corr_stats.py
        _grid_generation.py
    windef/
        __init__.py
        _deformation.py
        _piv_eval.py
        _windef.py
  

The code in each submodule is imported by the init.py so it essentially acts like one large python source file.

A better example (one that I tried to link but misplaced the location) can be seen with the OpenPIV-Python-cxx package where i decided to make it a namespace package. Here is the link to the windef submodule of that package.
https://github.com/ErichZimmer/OpenPIV-Python-cxx/tree/4-pocketfft-support-and-others/lib/windef

Scipy, skimage, and I think numpy are namespace packages too. Here is the link for the basic idea of namespace packages from Python.

I simply think namespace packages have the advantage of splitting large files in a way that code is more readable and maintainable, but it is not strictly necessary as it is basically an aesthetic thing.

@alexlib
Copy link
Member Author

alexlib commented Jun 21, 2023 via email

@yuriishizawa
Copy link
Contributor

@alexlib I would like to help in this task. Do you still interested in move the build to poetry?

@alexlib
Copy link
Member Author

alexlib commented Nov 8, 2023

@alexlib I would like to help in this task. Do you still interested in move the build to poetry?

Yes definitely- please your help

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

No branches or pull requests

3 participants