Skip to content

Commit

Permalink
Merge pull request #63 from ubermag/metadata-update
Browse files Browse the repository at this point in the history
metadata-update
  • Loading branch information
lang-m authored Sep 21, 2021
2 parents 011a7af + 59e51d4 commit bf7603e
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 73 deletions.
2 changes: 0 additions & 2 deletions .coveragerc

This file was deleted.

15 changes: 15 additions & 0 deletions .github/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: conda-environment

channels:
- conda-forge

dependencies:
- python==3.8
- pip
- oommf
- pip:
- git+https://github.com/ubermag/ubermagutil.git
- git+https://github.com/ubermag/ubermagtable.git
- git+https://github.com/ubermag/discretisedfield.git
- git+https://github.com/ubermag/micromagneticmodel.git
- git+https://github.com/ubermag/micromagnetictests.git
13 changes: 4 additions & 9 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: conda

on:
push:
schedule:
- cron: '0 0 * * 1' # run every Monday

Expand All @@ -18,6 +17,8 @@ jobs:
steps:
- name: Initialisation
uses: actions/checkout@v2
with:
ref: stable

- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
Expand All @@ -29,12 +30,6 @@ jobs:
- name: Install testing packages
run: python -m pip install --upgrade pip pytest-cov nbval pycodestyle

- name: Unit tests
run: make test-unittests

- name: Documentation tests
run: make test-docs
- name: Test all
run: make test-all

- name: Jupyter notebook tests
run: make test-ipynb
if: matrix.os != 'windows-latest'
20 changes: 10 additions & 10 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: workflow

on:
push:
branches-ignore:
- 'stable'
schedule:
- cron: '0 0 * * 1' # run every Monday

Expand All @@ -11,7 +13,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8]
defaults:
run:
shell: bash -l {0}
Expand All @@ -24,10 +25,8 @@ jobs:
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- name: Install OOMMF
run: conda install --channel conda-forge oommf
activate-environment: conda-environment
environment-file: .github/environment.yml

- name: Install testing packages
run: python -m pip install --upgrade pip pytest-cov nbval pycodestyle
Expand All @@ -37,21 +36,22 @@ jobs:

- name: Unit tests
run: make test-unittests
if: matrix.os != 'ubuntu-latest'

- name: Unit tests with coverage
run: make test-coverage
if: matrix.os == 'ubuntu-latest'

- name: Documentation tests
run: make test-docs

- name: Jupyter notebook tests
run: make test-ipynb
if: matrix.os != 'windows-latest'

- name: Python code style
run: make test-pycodestyle

- name: Tests coverage
run: make test-coverage
if: matrix.os == 'ubuntu-latest'

- name: Upload coverage to Codecov.io
uses: codecov/codecov-action@v1
if: matrix.os == 'ubuntu-latest'

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ build/
dist/
*.egg-info/
_autosummary/

1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ test-unittests:
$(PYTHON) -c "import sys; import $(PROJECT); sys.exit($(PROJECT).test())"

test-coverage:
$(PYTHON) -m pytest -v --cov=$(PROJECT) --cov-report=xml --cov-config .coveragerc
$(PYTHON) -m pytest -v --cov=$(PROJECT) --cov-report=xml

test-docs:
$(PYTHON) -m pytest -v --doctest-modules --ignore=$(PROJECT)/tests $(PROJECT)

test-ipynb:
$(PYTHON) -m pytest -v --nbval-lax $(IPYNBPATH)
$(PYTHON) -m pytest -v --nbval $(IPYNBPATH)

test-pycodestyle:
$(PYTHON) -m pycodestyle --filename=*.py .

test-all: test-unittests test-coverage test-docs test-ipynb test-pycodestyle
test-all: test-unittests test-docs test-ipynb test-pycodestyle

build-dists:
rm -rf dist/
$(PYTHON) setup.py sdist bdist_wheel

release: build-dists
twine upload dist/*

42 changes: 25 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
# oommfc
Marijan Beg<sup>1,2</sup>, Martin Lang<sup>1</sup>, Ryan A. Pepper<sup>1</sup>, Thomas Kluyver<sup>2</sup>, and Hans Fangohr<sup>1,2,3</sup>
[Marijan Beg](https://github.com/marijanbeg)<sup>1,2</sup>, [Martin Lang](https://github.com/lang-m)<sup>2</sup>, [Ryan A. Pepper](https://github.com/rpep)<sup>3</sup>, [Thomas Kluyver](https://github.com/takluyver)<sup>4</sup>, [Samuel Holt](https://github.com/samjrholt)<sup>5</sup>, [Hans Fangohr](https://github.com/fangohr)<sup>2,6,7</sup>

<sup>1</sup> *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, United Kingdom*
<sup>2</sup> *European XFEL GmbH, Holzkoppel 4, 22869 Schenefeld, Germany*
<sup>3</sup> *Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany*
<sup>1</sup> *Department of Earth Science and Engineering, Imperial College London, London SW7 2AZ, UK*
<sup>2</sup> *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, UK*
<sup>3</sup> *Research Software Group, University of Birmingham, Birmingham B15 2TT, UK*
<sup>4</sup> *European XFEL GmbH, Holzkoppel 4, 22869 Schenefeld, Germany*
<sup>5</sup> *Department of Physics, University of Warwick, Coventry CV4 7AL, UK*
<sup>6</sup> *Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany*
<sup>7</sup> *Center for Free-Electron Laser Science, Luruper Chaussee 149, 22761 Hamburg, Germany*

| Description | Badge |
| --- | --- |
| Tests | [![workflow](https://github.com/ubermag/oommfc/workflows/workflow/badge.svg)](https://github.com/ubermag/oommfc/actions?query=workflow%3Aworkflow) |
| Tests | [![Build status](https://github.com/ubermag/oommfc/workflows/workflow/badge.svg)](https://github.com/ubermag/oommfc/actions?query=workflow%3Aworkflow) |
| | [![conda](https://github.com/ubermag/oommfc/workflows/conda/badge.svg)](https://github.com/ubermag/oommfc/actions?query=workflow%3Aconda) |
| Releases | [![PyPI version](https://badge.fury.io/py/oommfc.svg)](https://badge.fury.io/py/oommfc) |
| | [![Anaconda-Server Badge](https://anaconda.org/conda-forge/oommfc/badges/version.svg)](https://anaconda.org/conda-forge/oommfc) |
| Coverage | [![codecov](https://codecov.io/gh/ubermag/oommfc/branch/master/graph/badge.svg?token=oEecfcBueV)](https://codecov.io/gh/ubermag/oommfc) |
| Documentation | [![Documentation Status](https://readthedocs.org/projects/oommfc/badge/?version=latest)](https://oommfc.readthedocs.io/en/latest/?badge=latest) |
| Coverage | [![codecov](https://codecov.io/gh/ubermag/oommfc/branch/master/graph/badge.svg?token=hcK4fofmrL)](https://codecov.io/gh/ubermag/oommfc) |
| Documentation | [![Documentation](https://img.shields.io/badge/Docs-ubermag.github.io-blue)](https://ubermag.github.io/documentation/oommfc.html) |
| YouTube | [![YouTube](https://img.shields.io/badge/YouTube-ubermag-blue)](https://www.youtube.com/channel/UC7MSqVQSMFV42R1jAYmKGLg) |
| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ubermag/oommfc/HEAD?filepath=docs%2Fipynb%2Findex.ipynb) |
| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ubermag/oommfc/stable?filepath=docs%2Fipynb%2Findex.ipynb) |
| Platforms | [![Platforms](https://anaconda.org/conda-forge/oommfc/badges/platforms.svg)](https://anaconda.org/conda-forge/oommfc) |
| Downloads | [![Downloads](https://anaconda.org/conda-forge/oommfc/badges/downloads.svg)](https://anaconda.org/conda-forge/oommfc) |
| License | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
| DOI | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3539494.svg)](https://doi.org/10.5281/zenodo.3539494) |
| DOI | [![DOI](https://zenodo.org/badge/67028400.svg)](https://zenodo.org/badge/latestdoi/67028400) |

## About

`oommfc` is a Python package providing:
`oommfc` is a Python package, integrated with Jupyter, providing:

- An Object Oriented MicroMagnetic Framework [OOMMF](https://math.nist.gov/oommf/) calculator for computational magnetism models defined with `micromagneticmodel`.


It is available on Windows, MacOS, and Linux. It requires Python 3.8+.

## Documentation
Expand Down Expand Up @@ -54,24 +59,27 @@ All contributions are welcome, however small they are. If you would like to cont

**Contributors**:

- Mark Vousden ([@mvousden](https://github.com/mvousden)), University of Southampton, United Kingdom
- Sergii Mamedov ([@sergii-mamedov](https://github.com/sergii-mamedov)), European XFEL, Germany
- Rebecca Carey ([@rlc2v07](https://github.com/rlc2v07)), University of Southampton, United Kingdom
- Marc-Antonio Bisotti ([@logicabrity](https://github.com/logicabrity)), University of Southampton, United Kingdom
- Vanessa Nehruji ([@vanessanehruji](https://github.com/vanessanehruji)), University of Southampton, United Kingdom
- [Mark Vousden](https://github.com/mvousden)
- [Sergii Mamedov](https://github.com/sergii-mamedov)
- [Rebecca Carey](https://github.com/rlc2v07)
- [Marc-Antonio Bisotti](https://github.com/logicabrity)
- [Vanessa Nehruji](https://github.com/vanessanehruji)

## License

Licensed under the BSD 3-Clause "New" or "Revised" License. For details, please refer to the [LICENSE](LICENSE) file.

## How to cite

1. M. Beg, R. A. Pepper, and H. Fangohr. User interfaces for computational science: A domain specific language for OOMMF embedded in Python. [*AIP Advances* **7**, 56025](http://aip.scitation.org/doi/10.1063/1.4977225) (2017).
1. M. Beg, M. Lang, and H. Fangohr. Ubermag: Towards more effective micromagnetic workflows. [*IEEE Transactions on Magnetics*](https://doi.org/10.1109/TMAG.2021.3078896) (2021).

2. M. Beg, R. A. Pepper, and H. Fangohr. User interfaces for computational science: A domain specific language for OOMMF embedded in Python. [*AIP Advances* **7**, 56025](http://aip.scitation.org/doi/10.1063/1.4977225) (2017).

2. M. Beg, M. Lang, R. A. Pepper, T. Kluyver, and H. Fangohr. oommfc: OOMMF calculator. DOI: [10.5281/zenodo.3539494](http://doi.org/10.5281/zenodo.3539494) (2021).
3. Marijan Beg, Martin Lang, Ryan A. Pepper, Thomas Kluyver, Samuel Holt, Hans Fangohr. oommfc: OOMMF calculator. DOI: [10.5281/zenodo.3539461](http://doi.org/10.5281/zenodo.3539461) (2021).

## Acknowledgements

- [OpenDreamKit](http://opendreamkit.org/) – Horizon 2020 European Research Infrastructure project (676541)

- EPSRC Programme Grant on [Skyrmionics](http://www.skyrmions.ac.uk) (EP/N032128/1)

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[build-system]
# 40.8.0 is the first version compatible with PEP 517
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -64,3 +65,6 @@ contributors = [
about = """
- An Object Oriented MicroMagnetic Framework [OOMMF](https://math.nist.gov/oommf/) calculator for computational magnetism models defined with `micromagneticmodel`.
"""

[tool.coverage.run]
omit = ["oommfc/tests/*"]
35 changes: 35 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[metadata]
name = oommfc
version = 0.10.1
description = OOMMF calculator.
author = Marijan Beg, Martin Lang, Ryan A. Pepper, Thomas Kluyver, Samuel Holt, Hans Fangohr
long_description = file: README.md
long_description_content_type = text/markdown
url = https://ubermag.github.io
licence = BSD 3-Clause License
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Education
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Natural Language :: English
Operating System :: MacOS
Operating System :: Microsoft :: Windows
Operating System :: Unix
Programming Language :: Python :: 3 :: Only
Topic :: Scientific/Engineering :: Physics
Topic :: Scientific/Engineering :: Mathematics
Topic :: Scientific/Engineering :: Visualization

[options]
packages = find:
python_requires >= 3.8
install_requires =
micromagnetictests==0.3.1
ubermagtable==0.6.1
include_package_data = True

[options.entry_points]


34 changes: 2 additions & 32 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
# This content is needed for editable install via pip.
import setuptools

with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()

setuptools.setup(
name='oommfc',
version='0.10.1',
description='OOMMF calculator.',
author=('Marijan Beg, Martin Lang, Ryan A. Pepper, '
'Thomas Kluyver, and Hans Fangohr'),
long_description=long_description,
long_description_content_type='text/markdown',
url='https://ubermag.github.io',
packages=setuptools.find_packages(),
include_package_data=True,
python_requires='>=3.8',
install_requires=['micromagnetictests==0.3.1',
'ubermagtable==0.6.1'],
classifiers=['Development Status :: 5 - Production/Stable',
'Intended Audience :: Education',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Visualization']
)
setuptools.setup()

0 comments on commit bf7603e

Please sign in to comment.