Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ repos:
- id: check-toml
- id: pretty-format-json
- id: detect-private-key
#- repo: local
# hooks:
- repo: local
hooks:
- id: export_dev_requirements
name: Export dev requirements
language: system
pass_filenames: false
entry: peodd -o requirements-dev.txt
# - id: export-requirements
# name: Export requeriments.txt
# language: system
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# [![Unit Tests][20]][21] ![Release][31] [![Downloads][70]][71] [![Lines of code][81]](<>) [![Total lines][80]](<>) [![Files][82]](<>) [![License][50]][51]
# [![Unit Tests][20]][21] ![Release][31] [![Downloads][70]][71] [![Lines of code][81]](<>) [![Total lines][80]](<>) [![Files][82]](<>) [![License][50]][51] [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/easyScience/easyDiffractionLib/develop)


<img height="80"><img src="https://raw.githubusercontent.com/easyScience/easyDiffractionApp/master/resources/images/ed_logo.svg" height="65">

Expand Down Expand Up @@ -56,6 +57,10 @@ Currently **easyDiffractionLib** is in **alpha** and has not been released on **
```
* Select one of the ***.ipynb** files

### Via Binder

Examples can also be run on the online service [binder](https://mybinder.org/). [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/easyScience/easyDiffractionLib/develop) and navigate to the examples folder to run one of the notebooks or create your own.

## Test

The installation can be verified by running the test suite:
Expand Down
4 changes: 4 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

pip install --extra-index-url https://easyscience.github.io/pypi -r requirements.txt
pip install -r requirements-dev.txt
8 changes: 7 additions & 1 deletion examples/Fitting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"from easyCore import np\n",
"from easyCore.Fitting.Fitting import Fitter\n",
"\n",
"try:\n",
" from easyDiffractionLib import Phase\n",
"except ImportError:\n",
" import sys, os\n",
" sys.path.append(os.path.abspath('..'))\n",
"\n",
"# esyScience, diffraction\n",
"from easyDiffractionLib import Phases\n",
"from easyDiffractionLib.sample import Sample as Job\n",
Expand Down Expand Up @@ -1072,4 +1078,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
9 changes: 7 additions & 2 deletions examples/Simulation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
"source": [
"# esyScience, technique-independent\n",
"from easyCore import np\n",
"from easyCore.Fitting.Fitting import Fitter\n",
"\n",
"try:\n",
" from easyDiffractionLib import Phase\n",
"except ImportError:\n",
" import sys, os\n",
" sys.path.append(os.path.abspath('..'))\n",
"\n",
"# esyScience, diffraction\n",
"from easyDiffractionLib import Site, Phase, Phases\n",
Expand Down Expand Up @@ -2525,4 +2530,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pytest = "^5.2"
toml = "^0.10"
requests = '^2.24'
hvplot = "^0.7.0"
jupyter = "^1.0.0"
ipympl = "^0.8.0"
matplotlib = "^3.4"
py3Dmol = "^1.7.0"
Expand Down
7 changes: 7 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pytest>=5.2
toml>=0.10
requests>=2.24
hvplot>=0.7.0
ipympl>=0.8.0
matplotlib>=3.4
py3Dmol>=1.7.0