Skip to content

Commit

Permalink
Setup rework (#228)
Browse files Browse the repository at this point in the history
## v0.13.1

- Reworks the requirements to make install faster
- Updates README to reflect changes
- Re-adds the dLux logo
- Removes some old files
  • Loading branch information
LouisDesdoigts authored May 30, 2023
1 parent 423976d commit c540fa7
Show file tree
Hide file tree
Showing 13 changed files with 136 additions and 164 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
- name: install environment
run: |
python -m pip install --upgrade pip
pip install --quiet pytest
pip install --quiet -r requirements.txt
pip install --quiet .
pip install --quiet ".[tests]"
# ===== Tests =====
- name: install tests
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ The ∂Lux framwork is built in [Zodiax](https://github.com/LouisDesdoigts/zodia
For an overview of these capabilities and different optimisation methods in [Zodiax](https://github.com/LouisDesdoigts/zodiax), please go through this [Zodiax Tutorial](https://louisdesdoigts.github.io/zodiax/docs/usage/).

Doccumentataion: [https://louisdesdoigts.github.io/dLux/](https://louisdesdoigts.github.io/dLux/)
Documentation: [https://louisdesdoigts.github.io/dLux/](https://louisdesdoigts.github.io/dLux/)

Requires: Python 3.8+, Jax 0.4.3+, Zodiax 0.4+

Installation: ```pip install dLux```

Requires: Python 3.8+, Jax 0.4.3+, Zodiax 0.4+
Docs installation: ```pip install "dLux[docs]"```

Test installation: ```pip install "dLux[tests]"```


## Collaboration & Development

Expand Down
2 changes: 1 addition & 1 deletion dLux/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "dLux"
__version__ = "0.13.0"
__version__ = "0.13.1"

# Import as modules
# Wavefronts and Optics
Expand Down
Binary file added docs/assets/logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions docs/creating_a_layer.md

This file was deleted.

43 changes: 0 additions & 43 deletions docs/notebooks/Core_classes.ipynb

This file was deleted.

37 changes: 23 additions & 14 deletions docs/notebooks/HMC.ipynb

Large diffs are not rendered by default.

121 changes: 66 additions & 55 deletions docs/notebooks/designing_a_mask.ipynb

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions docs/notebooks/fisher_information.ipynb

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/notebooks/flatfield_calibration.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/notebooks/phase_retrieval_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
"output_type": "stream",
"text": [
"Initial Loss: 144743.921875\n",
"CPU times: user 342 ms, sys: 18.8 ms, total: 361 ms\n",
"Wall time: 315 ms\n"
"CPU times: user 324 ms, sys: 15.3 ms, total: 339 ms\n",
"Wall time: 274 ms\n"
]
}
],
Expand Down Expand Up @@ -241,7 +241,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "aaaa3c0c39c145f8b50bff2898343318",
"model_id": "fbbe389b4cc14ae0a4e16759cb4c7b10",
"version_major": 2,
"version_minor": 0
},
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Core
jax
jaxlib
zodiax==0.4.0
zodiax>=0.4.1
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def find_version(*file_paths):
raise RuntimeError("Unable to find version string.")

# DEPENDENCIES
# 1. What are the required dependencies?
with open('requirements.txt') as f:
install_requires = f.read().splitlines()
# 2. What dependencies required to run the unit tests? (i.e. `pytest --remote-data`)
tests_require = ['pytest']
docs_require = ['optax', 'matplotlib', 'jupyter', 'jupyterlab', 'tqdm',
'chainconsumer', 'nummpyro']

docs_require = ['matplotlib', 'jupyter', 'jupyterlab', 'tqdm',
'chainconsumer', 'numpyro', 'dLuxToliman', "scikit-learn", "mkdocs",
"mkdocs-jupyter", "mkdocs-same-dir", "mkdocs-autorefs",
"mkdocs-simple-plugin", "mkdocstrings-python",
"jupyter_contrib_nbextensions"]

setuptools.setup(
python_requires='>=3.7,<4.0',
Expand All @@ -43,13 +43,15 @@ def find_version(*file_paths):
},

install_requires=install_requires,
tests_require=tests_require,
extras_require={'docs': docs_require},
extras_require={
'docs': docs_require,
'tests' : tests_require
},

classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],

packages = ["dLux", "dLux/utils"]
)
)

0 comments on commit c540fa7

Please sign in to comment.