wbalmer / backtracks

Python package to fit relative astrometry with background star motion tracks.
https://backtracks.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Adding pypi installation support with requirements.txt . Not yet hosted to pypi, requires git clone and local install #18

Closed wbalmer closed 10 months ago

wbalmer commented 10 months ago

Reconfigured the package slightly to allow future pypi hosting too (there is already backtrack on pypi, so I now use backtracks plural as the overall package name).

New structure:

backtrack/ (github.com/wbalmer/backtrack) ├── dist/ ├── src/ └── backtracks/ ├── init.py ├── backtrack.py ├── bailer-jones_edr3.csv ├── plotting.py └── utils.py ├── tests/ ├── LICENSE ├── README.md ├── requirements.txt └── pyproject.toml

Added some instructions to the readme to facilitate installation via pip:

conda create python=3.9 -n backtrack
conda activate backtrack
conda install pip
git clone https://github.com/wbalmer/backtrack.git
cd backtrack
pip install -e .

and the test

cd tests
python hd131399a.py
wbalmer commented 10 months ago

Should address #2 for the most part, aside from going public on pypi.

wbalmer commented 10 months ago

I've double checked this, but would @tomasstolker or @gotten be willing to try and make sure this works? I am completely new to distributing packages.

e.g. in a new conda env and separate folder, try

conda create python=3.9 -n backtrack
conda activate backtrack
conda install pip
git clone https://github.com/wbalmer/backtrack.git
cd backtrack
git checkout dev-wb
pip install -e .

cd tests
python hd131399a.py

and see if it runs smoothly?

gotten commented 10 months ago

Your instructions work on my Ubuntu 22.04 WSL2 install. Here is the output _model_bgstar.png

HD_131399_A_model_bgstar

wbalmer commented 10 months ago

Yay! Thanks Giles. I'm going to merge this, then.