dingo-gw / dingo

Dingo: Deep inference for gravitational-wave observations
MIT License
55 stars 18 forks source link

Replace setup.py with pyproject.toml #140

Closed mpuerrer closed 1 year ago

mpuerrer commented 1 year ago

Set up for building and uploading to PyPI. It avoids pinning any packages.

Feel free to adjust metadata!

It builds without error on CIT:

cd /home/michael.puerrer/projects/dingo-devel
conda activate igwn-testing
python3 -m build

I have not tried uploading to testpypi because it would be public and we want to get some pull requests merged in.

A local pip install of the built wheel worked, but it did install some packages in addition to the igwn-testing conda env packages:

I ran:

python3 -m pip install dist/dingo_gw-0.3.0-py3-none-any.whl --user

and this is the tail end of the output:

Building wheels for collected packages: chainconsumer, sklearn, pathtools
  Building wheel for chainconsumer (setup.py) ... done
  Created wheel for chainconsumer: filename=ChainConsumer-0.34.0-py3-none-any.whl size=42758 sha256=67b64233ada487106f494d8e886a57ba73cf409aa7c2c6441a8f492e6d82f86e
  Stored in directory: /home/michael.puerrer/.cache/pip/wheels/c4/a6/4e/3b70c1ab3dbfddf55db5abf6702eae7dbd1a3c20770d5b234c
  Building wheel for sklearn (setup.py) ... done
  Created wheel for sklearn: filename=sklearn-0.0.post1-py3-none-any.whl size=2935 sha256=b135452190e3f51e7becb8b4d31b134001d322f347d344918ef00500a84b893f
  Stored in directory: /home/michael.puerrer/.cache/pip/wheels/f8/e0/3d/9d0c2020c44a519b9f02ab4fa6d2a4a996c98d79ab2f569fa1
  Building wheel for pathtools (setup.py) ... done
  Created wheel for pathtools: filename=pathtools-0.1.2-py3-none-any.whl size=8791 sha256=b189c05ea30b963b4d8cb38db7fd60e42300ab8fc83422c02f3a80a927ff0d4d
  Stored in directory: /home/michael.puerrer/.cache/pip/wheels/b7/0a/67/ada2a22079218c75a88361c0782855cc72aebc4d18d0289d05
Successfully built chainconsumer sklearn pathtools
Installing collected packages: tensorboard-plugin-wit, sklearn, pathtools, tensorboard-data-server, sentry-sdk, rsa, protobuf, oauthlib, grpcio, docker-pycreds, absl-py, torchvision, requests-oauthlib, google-auth, wandb, google-auth-oauthlib, tensorboard, chainconsumer, dingo-gw
Successfully installed absl-py-1.4.0 chainconsumer-0.34.0 dingo-gw-0.3.0 docker-pycreds-0.4.0 google-auth-2.16.1 google-auth-oauthlib-0.4.6 grpcio-1.51.3 oauthlib-3.2.2 pathtools-0.1.2 protobuf-4.22.0 requests-oauthlib-1.3.1 rsa-4.9 sentry-sdk-1.15.0 sklearn-0.0.post1 tensorboard-2.12.0 tensorboard-data-server-0.7.0 tensorboard-plugin-wit-1.8.1 torchvision-0.14.1 wandb-0.13.10
mpuerrer commented 1 year ago

There does not seem to be a way to load author information into pyproject.toml according to https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#authors-maintainers. I added a separate AUTHORS.md file following what bilby does.