smroid / cedar-solve

A fast lost-in-space plate solver for star trackers.
https://tetra3.readthedocs.io/en/latest/
Apache License 2.0
1 stars 0 forks source link

feat: convert from setup.py to pyproject.toml #7

Closed leocov-dev closed 1 week ago

leocov-dev commented 1 week ago

Goals of this change are to replace the setup.py configuration with the modern pyproject.toml configuration while ensuring that everything still works as expected.

A few fixes where required to support correct structure and imports when using this as a library.

testing methodology:

# env setup
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,docs,cedar-detect]"

# check that a build works
python -m build

# check that example runs (copied over cedar-detect-server binary first) 
cd examples && python test_tetra3.py && cd ..

# check that docs build (there are some minor warnings to be addressed later)
cd docs && make html && cd ..

Notes: for the moment this will work locally with other databases (besides default_database.npz) but not yet in an installed environment. cedar-detect is not addressed yet.

leocov-dev commented 1 week ago

i don't have write access to merge. please feel free to merge when you are ready, thanks

smroid commented 1 week ago

In the venv I did: pip install -e ".[dev,docs,cedar-detect]"

when I run examples/test_tetra.py, I get: Traceback (most recent call last): File "/home/pi/projects/cedar-solve/examples/test_tetra3.py", line 16, in import tetra3 File "/home/pi/projects/cedar-solve/tetra3/tetra3.py", line 115, in from tetra3.breadth_first_combinations import breadth_first_combinations ModuleNotFoundError: No module named 'tetra3.breadth_first_combinations'; 'tetra3' is not a package

Also: do you have a gmail chat or other way to IM? My gmail chat is smr@dt3.org. Thanks!