Skip to content

Commit

Permalink
Merge pull request #60 from ebachelet/Rebranding
Browse files Browse the repository at this point in the history
Rebranding
  • Loading branch information
ebachelet authored Jun 21, 2023
2 parents 81a791f + 15191a8 commit 56372f9
Show file tree
Hide file tree
Showing 167 changed files with 26,828 additions and 15,023 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/actions_unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker Image CI

on:
push:
branches: [ "master" ,"Rebranding" ]
pull_request:
branches: [ "master" ]


jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff pytest
pip install .
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 .
# default set of ruff rules with GitHub Annotations
ruff --format=github --target-version=py37 .
- name: Test with pytest
run: |
pytest
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var/
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
# Unit tests / coverage reports
htmlcov/
.tox/
.coverage
Expand Down
40 changes: 20 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
language: python
cache : pip
cache: pip
python:
- 3.6
- 3.7
- 3.6
- 3.7


matrix:
include:
#MacOs currently not supported by TRAVIS
- name: "Python 3.7.4 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell
before_install:
- choco install python --version 3.7.4
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
- pip3 install codecov
- pip3 install -r requirements.txt
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
after_success: python 3 -m codecov
include:
#MacOs currently not supported by TRAVIS
- name: "Python 3.7.4 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell
before_install:
- choco install python --version 3.7.4
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
- pip3 install codecov
- pip3 install -r requirements.txt
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
after_success: python 3 -m codecov
before_install:
- pip install -r requirements.txt
- pip install -r requirements.txt

script:
coverage run --source=. setup.py test
coverage run --source=. setup.py tests

after_success:
coveralls
coveralls
64 changes: 17 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,44 @@
[![Build Status](https://travis-ci.org/ebachelet/pyLIMA.svg?branch=master)](https://travis-ci.org/ebachelet/pyLIMA)
[![Coverage Status](https://coveralls.io/repos/github/ebachelet/pyLIMA/badge.svg?branch=master)](https://coveralls.io/github/ebachelet/pyLIMA?branch=master)
![Build Status](https://github.com/ebachelet/pyLIMA/actions/workflows/actions_unit_tests.yaml/badge.svg)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.997468.svg)](https://doi.org/10.5281/zenodo.997468)



# pyLIMA

Authors : Etienne Bachelet, [email protected]
Rachel Street, [email protected]
Valerio Bozza, [email protected]
Martin Norbury, [email protected]
and friends!
Authors : Etienne Bachelet ([email protected]), Rachel Street ([email protected]),
Valerio Bozza ([email protected]), Yiannis Tsapras ([email protected])
and friends!

pyLIMA is an open source for modeling microlensing events.
pyLIMA is the first open source software for modeling microlensing events.
It should be flexible enough to handle your data and fit it.
You can also practice by simulating events.

# Documentation and Installation



[Documentation](https://pylima.readthedocs.io/en/latest/)

### Required materials
### Required materials

You need [pip](https://pip.pypa.io/en/stable/installing/) or you can install manually
the required libraries [Documentation](https://ebachelet.github.io/pyLIMA/)
You need [pip](https://pip.pypa.io/en/stable/installing/) and python, that's it!

pyLIMA should now run both on python3 (python2 is not supported anymore, time for update!).
### Installation and use

Lot of efforts have been made to have pyLIMA (and VBBinaryLensing) install through pip:

```
>>> pip install pyLIMA
```

This new procedure which should avoid the previous installations headaches!
Successfully test on various UNIX, MAC and Windows! If you encounter any problems,
please contact [email protected].

You should be able to load pyLIMA as general module :

```python
from pyLIMA import microlmagnification
import pyLIMA
print(pyLIMA.__version__)
```

### Examples
Examples can be found in your pyLIMA directory. Look on the documentation to learn how to run it.
There is two version for each examples, one using [Jupyter notebook](https://jupyter.org/) (*.ipynb) or
classic Python file (*.py).

Examples can be found in the pyLIMA directory after cloning this repository. More details can be found in the [Documentation](https://pylima.readthedocs.io/en/latest/)
There is two version for each examples, one
using [Jupyter notebook](https://jupyter.org/) or
classic Python file.

Example_1 : [HOW TO FIT MY DATA?](https://github.com/ebachelet/pyLIMA/tree/master/examples)

Expand All @@ -58,30 +49,9 @@ Example_3 : [HOW TO SIMULATE EVENST?](https://github.com/ebachelet/pyLIMA/tree/m
Example_4 : [HOW TO USE YOUR OWN FITTING ROUTINES?](https://github.com/ebachelet/pyLIMA/tree/master/examples)

Example_5 : [HOW TO FIT PARALLAX?](https://github.com/ebachelet/pyLIMA/tree/master/examples)
# What can you do?


#### pyLIMA is now in beta!! Here is the status of implemented microlensing models:

| Model | Implemented | Examples | Fit Method Advice |
| :--- | :---: |:---: | ---: |
| Point-Source Point Lens (PSPL) | ![Alt text](./doc/HGF.png?raw=true) | Yes | Levenberg-Marquardt (LM) |
| Finite-Source Point Lens (FSPL) | ![Alt text](./doc/HGF.png?raw=true) | Yes | Levenberg-Marquardt (LM) or Differential Evolution (DE) |
| Double-Source Point Lens (DSPL) | ![Alt text](./doc/HGF.png?raw=true) | Yes | Differential Evolution (DE) |
| Uniform-Source Binary Lens (USBL) | ![Alt text](./doc/HGF.png?raw=true) | No | |

#### pyLIMA can also treat Second Order effects :

| Second-Order Effects | Implemented | Examples |Fit Method Advice |
| :--- | :---: | :---: | ---: |
| Annual parallax | ![Alt text](./doc/HGF.png?raw=true) | No | Levenberg-Marquardt (LM) |
| Terrestrial parallax | ![Alt text](./doc/HGF.png?raw=true) | No | Levenberg-Marquardt (LM) |
| Space parallax | ![Alt text](./doc/HGF.png?raw=true) | No| Levenberg-Marquardt (LM) |
| Orbital Motion | ![Alt text](./doc/HGF.png?raw=true) | No | |
| Xallarap | ![Alt text](./doc/WIP.png?raw=true) | No | |


# How to contribute?

Want to contribute? Bug detections? Comments?
Please email us : [email protected], [email protected], [email protected]
Please email us ([email protected]) or raise an issue (recommended).
Empty file added __init__.py
Empty file.
13 changes: 7 additions & 6 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand All @@ -16,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading

0 comments on commit 56372f9

Please sign in to comment.