Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiLehe committed Feb 7, 2020
2 parents 7935632 + 2b26e74 commit 2d0d7d8
Show file tree
Hide file tree
Showing 39 changed files with 1,010 additions and 760 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*.egg
build/
dist/
opmd_viewer.egg-info/
openpmd_viewer.egg-info/
.cache/
.eggs/
.vs/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install:
before_script :
# static code analysis
# pyflakes: mainly warnings, unused code, etc.
- python -m pyflakes opmd_viewer
- python -m pyflakes openpmd_viewer

script:
- "python setup.py test"
36 changes: 35 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Change Log / Release Log for openPMD-viewer

## 1.0.0

This version introduces major changes and breaks backward compatibility.

Here is a list of the changes:
- The import statement now uses `openpmd_viewer` instead of `opmd_viewer`, e.g.
```
from openpmd_viewer import OpenPMDTimeSeries
```
- For consistency, `ts.get_particle` now return particle positions in meters,
instead of microns. For instance, in the code below, `x`, `y`, `z` will be in
meters
```
x, y, z = ts.get_particle(['x', 'y', 'z'], iteration=1000)
```
- In `ts.get_field`, slicing can now be done in several directions, and for
1d, 2d, 3d, and circ geometries. As a consequence, this breaks backward
compatibility for 3d field:
```get_field(field=field, coord=coord, iteration=iteration)```
used to return the central slice along `y` while it now returns the full 3d field.
In addition, the name of the argument of `get_field` that triggers slicing
has been changed from `slicing_dir` to `slice_across` (and `slicing` has been
changed to `slice_relative_position`).
- `openPMD-viewer` does not rely on Cython anymore. Instead, it uses `numba`
for functions that perform a substantial amount of computation.
- A new function (`ts.iterate`) was introduced in order to quickly apply a
given function to all iterations of a time series. See the docstring of
`ts.iterate` for more information.
- The function `get_laser_envelope` does not support the argument `index` anymore
(which was effectively used in order to perform slicing). Instead, users should use
the argument `slicing_dir`. In addition, `get_laser_envelope` now supports the
argument `plot_range`.
- The function `get_laser_waist` does not support the agument `slicing_dir` anymore.

## 0.9.0

This release adds two features:
Expand Down Expand Up @@ -106,7 +140,7 @@ This new version includes:
- an additional option `use_field_mesh` when plotting the particle. When set
to `True`, this option uses information from the field mesh to choose the parameters of the particle histograms (esp. the bins). This is useful in order to avoid plotting/binning artifacts (aliasing) when the particles are evenly spaced.

In addition, the package `opmd_viewer` now has an attribute `__version__`.
In addition, the module `openpmd_viewer` now has an attribute `__version__`.

## 0.3.3

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ git pull [email protected]:openPMD/openPMD-viewer.git dev
- Use [pyflakes](https://pypi.python.org/pypi/pyflakes) to detect any potential bug.
```
cd openPMD-viewer/
pyflakes opmd_viewer
pyflakes openpmd_viewer
```
- Make sure that the tests pass (please install `wget` and `jupyter` before running the tests: `pip install wget jupyter`)
```
Expand All @@ -76,10 +76,10 @@ git push -u origin <NewBranchName>

- Features that **modify** or **improve** the `OpenPMDTimeSeries` object
should be implemented in the
`opmd_viewer/opempmd_timeseries` folder. Features that **build upon** the
`openpmd_viewer/opempmd_timeseries` folder. Features that **build upon** the
`OpenPMDTimeSeries` object to create domain-specific analysis tools
(e.g. laser diagnostics for PIC simulations) should be implemented in
the `opmd_viewer/addons` folder.
the `openpmd_viewer/addons` folder.

- Document the functions and classes that you write, by using a
[docstring](https://www.python.org/dev/peps/pep-0257/). List the
Expand Down
5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include README.md
include requirements.txt
include opmd_viewer/openpmd_timeseries/cython_function.pyx
include opmd_viewer/notebook_starter/openPMD_notebook
include opmd_viewer/notebook_starter/Template_notebook.ipynb
include openpmd_viewer/notebook_starter/openPMD_notebook
include openpmd_viewer/notebook_starter/Template_notebook.ipynb
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,22 @@ browser**. To use this executable, simply type in a regular terminal:

### Installation on a local computer

#### Installation with conda (recommended)
#### Installation with conda

In order to install `openPMD-viewer` with `conda`, please install the [Anaconda
distribution](https://docs.anaconda.com/anaconda/install/), and then type
```
conda install -c rlehe openpmd_viewer
conda install -c conda-forge openpmd-viewer
```
If you are using JupyterLab, please also install the `jupyter-matplotlib`
extension (See installation instructions
[here](https://github.com/matplotlib/jupyter-matplotlib)).

#### Installation with pip

If you cannot install `openPMD-viewer` with `conda`, the alternative
is to use `pip`. However, you need to first make sure that `h5py` is
installed on your local computer. This can be done for instance by
typing `pip install h5py`, though this may require you to install `hdf5` separately.

Once `h5py` is installed, simply type
You can also install `openPMD-viewer` using `pip`
```
pip install openPMD-viewer
pip install openpmd-viewer
```
In addition, if you wish to use the interactive GUI, please type
```
Expand Down
21 changes: 1 addition & 20 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ username = <yourPypiUsername>

## Creating a release on Github

- Make sure that the version number in `opmd_viewer/__version__.py` **and**
- Make sure that the version number in `openpmd_viewer/__version__.py` **and**
in `conda_recipe/meta.yaml` correspond to the new release, and that
the corresponding changes have been documented in `CHANGELOG.md`.

Expand All @@ -57,22 +57,3 @@ twine upload dist/* -r pypi
(NB: You can also first test this by uploading the package to
[test PyPI](https://testpypi.python.org/pypi) ; to do so, simply
replace `pypi` by `pypitest` in the above set of commands)

## Uploading the package to Anaconda.org

- `cd` into the folder `conda_recipe`.

- Still in the folder `conda_recipe`, run
```
docker build -t openpmd_build .
docker run -it -v $PWD:/home/ openpmd_build
```
This builds the conda packages for Python 2.7, 3.4, 3.5 and 3.6, using a
reproduceable environment.

- After the build, the Docker container will **not** exit. From the container, type the following commands:
```
anaconda login
anaconda upload osx-64/*
anaconda upload /opt/conda/conda-bld/linux-64/openpmd_viewer*
```
21 changes: 0 additions & 21 deletions conda_recipe/Dockerfile

This file was deleted.

40 changes: 0 additions & 40 deletions conda_recipe/meta.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions openpmd_viewer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
openPMD-viewer
Usage
-----
See the class OpenPMDTimeSeries to open a set of openPMD files
"""
# Make the OpenPMDTimeSeries object accessible from outside the package
from .openpmd_timeseries import OpenPMDTimeSeries, FieldMetaInformation, \
ParticleTracker

# Define the version number
from .__version__ import __version__
__all__ = ['OpenPMDTimeSeries', 'FieldMetaInformation',
'ParticleTracker', '__version__']
1 change: 1 addition & 0 deletions openpmd_viewer/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.0.0"
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 2d0d7d8

Please sign in to comment.