Skip to content

Commit

Permalink
software packaging shell without any code
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed Aug 16, 2022
1 parent a8d1729 commit 7430b10
Show file tree
Hide file tree
Showing 9 changed files with 159 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pytest
python -m pip install flake8 pytest pytest-cov coveralls
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi
python -m pip install .
#- 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: Test with pytest
run: |
pytest --cov=jaxtronomy
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
18 changes: 18 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=======
Credits
=======


lenstronomy contributors
------------------------

See the `lenstronomy contributors list <https://github.com/lenstronomy/lenstronomy/blob/main/AUTHORS.rst>`_ on the `lenstronomy <https://github.com/lenstronomy/lenstronomy>`_ repository
for a full list of contirbutors to the original lenstronomy source code.



Contributors to the JAXtronomy
------------------------------

* Aymeric Galan `aymgal <https://github.com/aymgal/>`_
* Simon Birrer `sibirrer <https://github.com/sibirrer/>`_
21 changes: 21 additions & 0 deletions CITATION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Citation Guidelines
===================

|JOSS|

If you use JAXtronomy for work or research presented in a publication (whether
directly, or as a dependency of another package) we recommend and encourage
the following acknowledgment:

This research made use of lenstronomy, a multi-purpose gravitational lens
modeling software package (Birrer et. al., 2021).

where the citations are to our publication in the `Journal of Open Source
Software`_. We also encourage citations within the main text wherever
appropriate. DOIs and BibTeX keys are available through the links above.


.. _Journal of Open Source Software: https://joss.theoj.org/papers/10.21105/joss.03283

.. |JOSS| image:: https://joss.theoj.org/papers/10.21105/joss.03283/status.svg
:target: https://joss.theoj.org/papers/10.21105/joss.03283
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2022, lenstronomy project
Copyright (c) 2022, lenstronomy developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

44 changes: 44 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
==========
JAXtronomy
==========

.. image:: https://github.com/lenstronomy/JAXtronomy/workflows/Tests/badge.svg
:target: https://github.com/lenstronomy/JAXtronomy/actions

.. image:: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
:target: https://github.com/lenstronomy/lenstronomy/blob/main/LICENSE



**JAX port of lenstronomy, for parallelized, GPU accelerated, and differentiable gravitational lensing and image simulations.**

**Disclaimer**: This project is still in an early development phase and serves as a skeleton for someone taking the lead on it :)

The goal of this library is to reimplement lenstronomy functionalities in pure JAX to allow for automatic differentiation, GPU acceleration, and batched computations.

**Guiding Principles**:

- Strive to be a drop-in replacement for lenstronomy, i.e. provide a close match to the lenstronomy API.
- Each function/feature will be tested against the reference lenstronomy implementation.
- This package will aim to be a **subset** of lenstronomy (i.e. only contains functions with a reference lenstronomy implementation).
- Implementations should be easy to read and understand.
- Code should be pip installable on any machine, no compilation required.
- Any notable differences between the JAX and reference implementations will be clearly documented.



Related software packages
-------------------------

The following lensing software packages do use JAX-accelerated computing that in part were inspired or made use of lenstronomy functions:

- Herculens_
- GIGA-lens_

.. _Herculens: https://github.com/austinpeel/herculens
.. _GIGA-lens: https://github.com/giga-lens/gigalens





2 changes: 2 additions & 0 deletions jaxtronomy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__author__ = 'lenstronomy developers'
__version__ = '0.0.1rc1'
26 changes: 26 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from setuptools import setup, find_packages

requires = ["numpy >= 1.18.0", "lenstronomy >= 1.10.4", "jax", "jaxlib"]
tests_require = ["pytest"]

setup(
name="JAX-lenstronomy",
version="0.0.1rc1",
url="https://github.com/lenstronomy/JAX-lenstronomy",
author="lenstronomy developers",
description="lenstronomy, but in JAX",
packages=find_packages(),
license="BSD-3",
install_requires=requires,
tests_require=tests_require,
keywords='lenstronomy',
classifiers=[
"Development Status :: 1 - Alpha",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)
Empty file added test/__init__.py
Empty file.

0 comments on commit 7430b10

Please sign in to comment.