Skip to content

Commit

Permalink
Merge pull request #1 from din14970/testing
Browse files Browse the repository at this point in the history
revised all
  • Loading branch information
din14970 committed Feb 4, 2021
2 parents acfe8a6 + 06d7c40 commit 242e92e
Show file tree
Hide file tree
Showing 15 changed files with 6,072 additions and 1,152 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-and-test:
name: ${{ matrix.os }}/py${{ matrix.python-version }}/pip
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
MPLBACKEND: agg
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 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: Display versions of Python and Pip
run: python -V; pip -V
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
conda-channels: conda-forge
- name: Check conda version
run: conda --version
- name: Install depedencies and package
shell: bash
run: pip install -U -e .'[tests]'; conda install match-series
- name: Run tests
run: pytest --cov=pymatchseries --pyargs pymatchseries
- name: Generate line coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
run: coverage report --show-missing
- name: Upload coverage to Coveralls
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true

coveralls-finish:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- name: Coveralls finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
tags
examples/data/**
examples/sample_data_HAADF
examples/tester
**.hdf5

# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<p align="center">
<a href="https://github.com/din14970/pyMatchSeries/actions"><img alt="Actions Status" src="https://github.com/din14970/pyMatchSeries/workflows/build/badge.svg"></a>
<a href="https://coveralls.io/github/din14970/pyMatchSeries?branch=master"><img alt="Coverage Status" src="https://coveralls.io/repos/github/din14970/pyMatchSeries/badge.svg?branch=master"></a>
<a href="https://pypi.org/project/pyMatchSeries/"><img alt="PyPI" src="https://img.shields.io/pypi/v/pyMatchSeries.svg?style=flat"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
</p>

# Description
This is a tool for non-rigid registration, primarily for atomic resolution STEM images, and is a python wrapper of the [match-series](https://github.com/berkels/match-series) code developed by B. Berkels. When using this tool, please cite the papers mentioned in that repository.

The goal of match-series is to remove slow and fast scan noise in STEM image stacks by comparing the various images against each other. The output of the code are X and Y deformation fields for each image in the stack. These deformations can then be applied to stacks of images or to EDX/EELS spectum maps that were acquired frame by frame. The goal of pymatchseries is to facilitate the set-up of the calculation and to work with the results in python. It is intended to use this tool mainly semi-interactively in a Jupyter notebook, see [the example](https://github.com/din14970/pyMatchSeries/blob/master/examples/example.ipynb).

Try it out here:
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/din14970/pyMatchSeries/master)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/din14970/pyMatchSeries/testing)

To install, simply pip install:
```
Expand All @@ -16,3 +23,9 @@ Note that, since it directly tries to call the matchSeries binary in a subproces
```
$ conda install -c conda-forge match-series
```

# Changelog

## v0.1.0
* Significantly simplified the API and made code more future proof
* Trying out CI/CD pipelines
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ dependencies:
- temmeta
- pywget
- match-series
- pip
- pip:
- pyMatchSeries
284 changes: 284 additions & 0 deletions examples/example-minimal.ipynb

Large diffs are not rendered by default.

0 comments on commit 242e92e

Please sign in to comment.