Skip to content

Commit

Permalink
Fixed issue with corr_terms and confidence envelopes, and more (#23)
Browse files Browse the repository at this point in the history
* Fixed issue with use of corr_terms in likelihood function, fixed issue with confidence envelopes in trackplot, added posterior samples to deltaRA-deltaDEC plot, removed the jd_tt parameter and added the ref_epoch parameter to generate_plots, added fileprefix parameter to system class, simplified the extraction of samples by using samples_equal from dynesty, added Github Actions workflow, updated .gitignore, updated package __init__, added unit tests to tests folder, removed all binary files that are not required by the repo, tested compatibility with Python 3.11

* Install numpy separately before orbitize

* Testing installation of dependencies

* Git clone orbitize

* Updated with installing orbitize from Github

* Fixing pip install of orbitize

* Testing Github workflow

* Testing workflow

* Skip dependencies

* Testing installation

* Fixed issue in main.yml

* More testing...

* Even more testing...

* Added requirements without orbitize to workflow folder

* Testing

* Testing

* Added requirements file

* Added import sys

* Fixed issue with data_times

* Fixed minor issue

* Further testing

* Fixing PYTHONPATH

* Added orbitize requirements

* Minor fix
  • Loading branch information
tomasstolker authored Dec 18, 2023
1 parent 57044b2 commit 37a4037
Show file tree
Hide file tree
Showing 34 changed files with 672 additions and 12,911 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get install pandoc
pip install --upgrade pip
pip install --upgrade numpy cython
pip install flake8 pytest pytest-cov sphinx
# Install requirements.txt without orbitize
pip install -r .github/workflows/requirements.txt
git clone https://github.com/sblunt/orbitize.git $HOME/orbitize
pip install -r $HOME/orbitize/requirements.txt
ls $HOME
pwd
ls
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run pytest
run: |
echo $PYTHONPATH
export PYTHONPATH=$HOME/orbitize
export PYTHONPATH=$PYTHONPATH:$HOME/work/backtrack/backtrack/
echo $PYTHONPATH
pytest
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ matplotlib
numpy
novas
novas_de405
orbitize
pandas
seaborn
schwimmbad
Expand Down
19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
__pycache__
*.pyc
.DS_Store
docs/_build
docs/.ipynb_checkpoints/
build/
dist/
backtracks.egg-info/
.coverage*
coverage.xml
htmlcov/
.tox/
*.ipynb*
bgstar_emcee.py
__pycache__
*beta_pic*
*SAO*
.pyproject.toml.sw
.pytest_cache/
tests/HD_131399_A_*.png
tests/HD_131399_A_dynestyrun_results.pkl
tests/gaia_query_6204835284262018688.fits
tests/dynesty.save
Binary file removed .pyproject.toml.swp
Binary file not shown.
8 changes: 8 additions & 0 deletions backtracks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from backtracks.backtracks import system

__author__ = "William Balmer"
__license__ = "BSD-3"
__version__ = "0.3.1"
__maintainer__ = "William Balmer"
__email__ = "[email protected]"
__status__ = "Development"
Loading

0 comments on commit 37a4037

Please sign in to comment.