diff --git a/.coveragerc b/.coveragerc
deleted file mode 100644
index 7699c6ae..00000000
--- a/.coveragerc
+++ /dev/null
@@ -1,2 +0,0 @@
-[run]
-omit = oommfc/tests/*
diff --git a/.github/environment.yml b/.github/environment.yml
new file mode 100644
index 00000000..b444b2f0
--- /dev/null
+++ b/.github/environment.yml
@@ -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
diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml
index 9cbba9af..c7e35880 100644
--- a/.github/workflows/conda.yml
+++ b/.github/workflows/conda.yml
@@ -1,7 +1,6 @@
name: conda
on:
- push:
schedule:
- cron: '0 0 * * 1' # run every Monday
@@ -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
@@ -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'
diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index 6dce3f81..d908a164 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -2,6 +2,8 @@ name: workflow
on:
push:
+ branches-ignore:
+ - 'stable'
schedule:
- cron: '0 0 * * 1' # run every Monday
@@ -11,7 +13,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- python-version: [3.8]
defaults:
run:
shell: bash -l {0}
@@ -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
@@ -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'
+
diff --git a/.gitignore b/.gitignore
index a85a437c..ca273933 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ build/
dist/
*.egg-info/
_autosummary/
+
diff --git a/LICENSE b/LICENSE
index 5985dfce..eb102884 100644
--- a/LICENSE
+++ b/LICENSE
@@ -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.
+
diff --git a/Makefile b/Makefile
index e9cab01a..67180741 100644
--- a/Makefile
+++ b/Makefile
@@ -6,18 +6,18 @@ 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/
@@ -25,3 +25,4 @@ build-dists:
release: build-dists
twine upload dist/*
+
diff --git a/README.md b/README.md
index 3fc91ffd..ee635afb 100644
--- a/README.md
+++ b/README.md
@@ -1,31 +1,36 @@
# oommfc
-Marijan Beg1,2, Martin Lang1, Ryan A. Pepper1, Thomas Kluyver2, and Hans Fangohr1,2,3
+[Marijan Beg](https://github.com/marijanbeg)1,2, [Martin Lang](https://github.com/lang-m)2, [Ryan A. Pepper](https://github.com/rpep)3, [Thomas Kluyver](https://github.com/takluyver)4, [Samuel Holt](https://github.com/samjrholt)5, [Hans Fangohr](https://github.com/fangohr)2,6,7
-1 *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, United Kingdom*
-2 *European XFEL GmbH, Holzkoppel 4, 22869 Schenefeld, Germany*
-3 *Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany*
+1 *Department of Earth Science and Engineering, Imperial College London, London SW7 2AZ, UK*
+2 *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, UK*
+3 *Research Software Group, University of Birmingham, Birmingham B15 2TT, UK*
+4 *European XFEL GmbH, Holzkoppel 4, 22869 Schenefeld, Germany*
+5 *Department of Physics, University of Warwick, Coventry CV4 7AL, UK*
+6 *Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany*
+7 *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
@@ -54,11 +59,11 @@ 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
@@ -66,12 +71,15 @@ Licensed under the BSD 3-Clause "New" or "Revised" License. For details, please
## 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)
+
diff --git a/pyproject.toml b/pyproject.toml
index f122baa5..468917cf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -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"
@@ -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/*"]
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 00000000..d01782b3
--- /dev/null
+++ b/setup.cfg
@@ -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]
+
+
diff --git a/setup.py b/setup.py
index 38a24ae7..b58b1623 100644
--- a/setup.py
+++ b/setup.py
@@ -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()