diff --git a/Makefile b/Makefile deleted file mode 100644 index 405e8d0..0000000 --- a/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -PROJECT=mag2exp -IPYNBPATH=docs/*.ipynb -PYTHON?=python - -test-unittests: - $(PYTHON) -c "import sys; import $(PROJECT); sys.exit($(PROJECT).test())" - -test-coverage: - $(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 --sanitize-with nbval.cfg $(IPYNBPATH) - -test-pycodestyle: - $(PYTHON) -m pycodestyle --filename=*.py . - -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/* diff --git a/README.md b/README.md index 0b1621e..4be8c62 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # mag2exp -[Samuel Holt](https://github.com/samjrholt)1,2, James Loudon3, Thomas Hicken4, [David Cortés Ortuño](https://github.com/davidcortesortuno)5, [Martin Lang](https://github.com/lang-m)1, [Marijan Beg](https://github.com/marijanbeg)6,1, and [Hans Fangohr](https://github.com/fangohr)1,7,8 +[Samuel Holt](https://github.com/samjrholt)1,2, [Martin Lang](https://github.com/lang-m)1, James Loudon3, Thomas Hicken4, [Swapneel Amit Pathak](https://github.com/swapneelap)1,5, [David Cortés Ortuño](https://github.com/davidcortesortuno)6, [Marijan Beg](https://github.com/marijanbeg)7,1, and [Hans Fangohr](https://github.com/fangohr)1,5,8 1 *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, UK* 2 *Department of Physics, University of Warwick, Coventry CV4 7AL, UK* 3 *Department of Materials Science and Metallurgy, University of Cambridge, Cambridge, CB3 0FS, United Kingdom* 4 *Department of Physics, Durham University, Durham, DH1 3LE, United Kingdom* -5 *Paleomagnetic Laboratory Fort Hoofddijk, Utrecht University, Utrecht, 3584 CD, Netherlands* -6 *Department of Earth Science and Engineering, Imperial College London, London SW7 2AZ, UK* -7 *Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany* +5 *Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany* +6 *Paleomagnetic Laboratory Fort Hoofddijk, Utrecht University, Utrecht, 3584 CD, Netherlands* +7 *Department of Earth Science and Engineering, Imperial College London, London SW7 2AZ, UK* 8 *Center for Free-Electron Laser Science, Luruper Chaussee 149, 22761 Hamburg, Germany* @@ -27,7 +27,7 @@ | Platforms | [![Platforms](https://anaconda.org/conda-forge/mag2exp/badges/platforms.svg)](https://anaconda.org/conda-forge/mag2exp) | | Downloads | [![Downloads](https://anaconda.org/conda-forge/mag2exp/badges/downloads.svg)](https://anaconda.org/conda-forge/mag2exp) | | 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/67028400.svg)](https://zenodo.org/badge/latestdoi/67028400) | +| DOI | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3539461.svg)](https://doi.org/10.5281/zenodo.3539461) | ## About @@ -77,7 +77,7 @@ Licensed under the BSD 3-Clause "New" or "Revised" License. For details, please 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). -3. Samuel Holt, James Loudon, Thomas Hicken, David Cortés Ortuño, Martin Lang, Marijan Beg, and Hans Fangohr. mag2exp: Simulate experimental measurements for magnetic materials DOI: [10.5281/zenodo.3539461](http://doi.org/10.5281/zenodo.3539461) (2022). +3. Samuel Holt, Martin Lang, James Loudon, Thomas Hicken, Swapneel Amit Pathak, David Cortés Ortuño, Marijan Beg, and Hans Fangohr. mag2exp: Simulate experimental measurements for magnetic materials DOI: [10.5281/zenodo.3539461](http://doi.org/10.5281/zenodo.3539461) (2022). ## Acknowledgements diff --git a/make.bat b/make.bat deleted file mode 100644 index b1a59e9..0000000 --- a/make.bat +++ /dev/null @@ -1,23 +0,0 @@ -@ECHO OFF - -set PROJECT=mag2exp -set IPYNBPATH=docs/ipynb/*.ipynb -set PYTHON=python - -REM Command file for testing - - -%PYTHON% -c "import sys; import %PROJECT%; sys.exit(%PROJECT%.test())" - -REM test-coverage: -%PYTHON% -m pytest -v --cov=%PROJECT% --cov-report=xml --cov-config .coveragerc - -REM test-docs: -%PYTHON% -m pytest -v --doctest-modules --ignore=%PROJECT%/tests %PROJECT% - -REM test-ipynb: -%PYTHON% -m pytest -v --nbval %IPYNBPATH% - -%PYTHON% -m pycodestyle --filename=*.py . - - diff --git a/pyproject.toml b/pyproject.toml index e3e3e84..a6d65d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] -# 40.8.0 is the first version compatible with PEP 517 -requires = ["setuptools>=40.8.0", "wheel"] +requires = ["setuptools"] build-backend = "setuptools.build_meta" [project] @@ -13,10 +12,11 @@ license = {file = "LICENSE"} authors = [ {name = "Samuel Holt"}, + {name = "Martin Lang"}, {name = "James Loudon"}, {name = "Thomas Hicken"}, + {name = "Swapneel Amit Pathak"}, {name = "David Cortés Ortuño"}, - {name = "Martin Lang"}, {name = "Marijan Beg"}, {name = "Hans Fangohr"} ] @@ -60,8 +60,17 @@ repository = "https://github.com/ubermag/mag2exp" +[tool.black] +experimental-string-processing = true + +[tool.coverage.run] +omit = ["mag2exp/tests/*"] + +[tool.isort] +profile = "black" +skip_gitignore = true # ignores files listed in .gitignore + # to define additional information we use a custom table -# we need to own the entry for tool.NAME on PyPI # see: https://www.python.org/dev/peps/pep-0518/#tool-table [tool.ubermag] doi = "10.5281/zenodo.3539461" @@ -73,13 +82,3 @@ about = """ - the ability to perform "virtual" experiments, - the functionality to compare of real experimental results agaist simulated experiments. """ - -[tool.coverage.run] -omit = ["mag2exp/tests/*"] - -[tool.isort] -profile = "black" -skip_gitignore = true # ignores files listed in .gitignore - -[tool.black] -experimental-string-processing = true diff --git a/setup.cfg b/setup.cfg index f9ddbd6..a21188f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,41 +1,7 @@ -[metadata] -name = mag2exp -version = 0.61.1 -description = Simulate experimental measurements for magnetic materials -author = Samuel Holt, James Loudon, Thomas Hicken, David Cortés Ortuño, Martin Lang, Marijan Beg, and 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 = - oommfc>=0.62.0 - numpy>=1.19 - scipy>=1.6 include_package_data = True -[options.extras_require] -dev = build;invoke;nbval;pre-commit;pytest-cov;twine - - - [flake8] exclude = .git, diff --git a/tasks.py b/tasks.py index 36b6a2f..f7e575d 100644 --- a/tasks.py +++ b/tasks.py @@ -2,7 +2,6 @@ import os import shutil -import iniconfig import pytest import tomli from invoke import Collection, Exit, task @@ -106,13 +105,8 @@ def release(c): if e.code != pytest.ExitCode.OK: raise e - version = iniconfig.IniConfig("setup.cfg").get("metadata", "version") - # sanity checks while we have two places containing the version. with open("pyproject.toml", "rb") as f: - toml_version = tomli.load(f)["project"]["version"] - assert ( - toml_version == version - ), "Different versions in pyproject.toml and setup.cfg. Aborting." + version = tomli.load(f)["project"]["version"] c.run(f"git tag {version}") # fails if the tag exists c.run("git tag -f latest") # `latest` tag for binder