Skip to content
Snippets Groups Projects
Commit b4d050fc authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

New version plus testing restructure.

parent a2fcf03c
Branches
Tags
No related merge requests found
......@@ -4,7 +4,7 @@ build-job:
stage: build
script:
- conda install conda-build
- conda build -c conda-forge FieldTools
- conda build -c conda-forge ./tests/FieldTools
- conda build purge
- conda build -c local -c conda-forge ./
- conda build purge
......
{ pkgs ? import
(builtins.fetchTarball {
name = "nixpkgs-20.09";
url = "https://github.com/NixOS/nixpkgs/archive/edb26126d98bc696f4f3e206583faa65d3d6e818.tar.gz";
sha256 = "1cl4ka4kk7kh3bl78g06dhiidazf65q8miyzaxi9930d6gwyzkci";
})
{
overlays = [
(self: super:
rec {
python37 = super.python37.override
{
packageOverrides = self: super: {
matplotlib = super.matplotlib.overrideAttrs
(oldAttrs: rec {
version = "3.2.1";
src = super.fetchPypi
{
inherit version;
inherit (oldAttrs) pname;
sha256 = "ffe2f9cdcea1086fc414e82f42271ecf1976700b8edd16ca9d376189c6d93aee";
};
});
orthopoly = super.callPackage ./tests/nix/orthopoly.nix { };
pyfield = super.callPackage ./tests/nix/pyfield.nix { };
pymagglobal = super.callPackage ./pymagglobal.nix { };
};
};
python37Packages = python37.pkgs;
}
)
];
}
}:
pkgs.mkShell {
buildInputs = with pkgs.python37Packages;
[ ipython pyfield pymagglobal cartopy matplotlib numpy scipy orthopoly ];
}
conda build FieldTools
conda build ./
conda build -c conda-forge ./
conda install pymagglobal -c local
......@@ -5,12 +5,11 @@
, scipy
, pandas
, matplotlib
, cartopy
, pyfield }:
, cartopy }:
buildPythonPackage rec {
pname = "pymagglobal";
version = "0.0.4";
version = "0.1.0;
format = "other";
src = ./.;
......@@ -30,13 +29,12 @@ buildPythonPackage rec {
pandas
matplotlib
cartopy
pyfield
];
meta = with lib; {
description = "TODO";
description = "Python interface for global geomagnetic field models.";
license = licenses.lgpl3;
maintainers = "Maximilian Schanner";
maintainers = [ maintainers.arthus ];
};
}
......@@ -30,4 +30,4 @@ models = built_in_models()
listing names and paths to the included models.
'''
__version__ = '0.0.5'
__version__ = '0.1.0'
......@@ -24,10 +24,6 @@
};
});
orthopoly = super.callPackage ./orthopoly.nix { };
pyfield = super.callPackage ./FieldTools/pyfield.nix { };
pymagglobal = super.callPackage ./pymagglobal.nix { };
};
......@@ -46,5 +42,5 @@
}:
pkgs.mkShell {
buildInputs = with pkgs.python37Packages;
[ ipython pyfield pymagglobal cartopy matplotlib numpy scipy orthopoly ];
[ pymagglobal cartopy matplotlib numpy scipy ];
}
package:
name: pyfield
version: 0.1.3i # Does not math the tarball's version
# FIXME "0.1.2 interim-2" is invalid as a version string
# TODO Use templating with jinja to grab the version number e.g.
#version: {{ load_setup_py_data().version }} for the latest version
# or as an alternative for specific version
#{% set version = "0.1.3i" %}
#version: {{ version }}
# and also use it for the download
#url: .../fieldtools-{{ version }}.tar.gz
source:
# Get a tarball from GFZ data services
url: ftp://datapub.gfz-potsdam.de/download/10.5880.FIDGEO.2019.033/fieldtools-i2.tar.gz
sha256: b297d853f30abdca968af2e3f52a5f62f0991485b23590897b7149c7171f3127
build:
# Not quite sure about $PYTHON; Docs are just using bare 'python'
script:
- export CPPFLAGS='-Wno-deprecated'
- $PYTHON setup.py build
- $PYTHON setup.py install
requirements:
build:
- {{ compiler('cxx') }}>=9.3 # XXX Versioning scheme only compatible with GCC
- swig
- numpy # setup.py relies on numpy
- pkg-config
- eigen
host:
- python
- setuptools
- numpy
- eigen # Not sure if required
run:
- python
- numpy
- eigen # Not sure if required
test:
commands:
- $PYTHON -c 'import pyfield; import doctest; doctest.testmod(pyfield)'
- $PYTHON -c 'import pyfieldcore; import doctest; doctest.testmod(pyfieldcore)'
imports:
- pyfield
about:
license: GPLv3
license_file: LICENSE
# SPDX-FileCopyrightText: 2020 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences, Germany (https://www.gfz-potsdam.de/)
#
# SPDX-License-Identifier: CC0-1.0
{ buildPythonPackage
, lib
, fetchPypi
, numpy
, scipy
}:
buildPythonPackage rec {
pname = "orthopoly";
version = "0.7";
src = fetchPypi {
inherit pname version;
sha256 = "1hn9pz3xhld6ymam4jnj25axg9bzvjp0zlqv11icd5y9fj8jxvhd";
};
propagatedBuildInputs = [ numpy scipy ];
pythonImportsCheck = [ "orthopoly" ];
meta = with lib; {
description = "This is a package for using sets of orthogonal functions/polynomials.";
license = licenses.mit;
homepage = "https://github.com/wordsworthgroup/orthopoly";
maintainers = [ maintainers.arthus ];
};
}
{ python, buildPythonPackage, lib , numpy, pkg-config, eigen, swig, openmpi, gcc, setuptools}:
buildPythonPackage rec {
pname = "pyfield";
version = "0.1.3";
format = "other";
src = builtins.fetchTarball {
url = "ftp://datapub.gfz-potsdam.de/download/10.5880.FIDGEO.2019.033/fieldtools-i2.tar.gz";
sha256 = "0ybszbd9jqv7ky1v3b5lb462w4gfki3p4hwgav9zsnyfsndgdr6f";
};
buildPhase = "${python.interpreter} ./setup.py build";
installPhase = ''${python.interpreter} ./setup.py install --prefix="$out"'';
nativeBuildInputs = [
pkg-config
swig
gcc
];
propagatedBuildInputs = [
numpy
eigen
openmpi
setuptools
];
meta = with lib; {
description = "Toolbox for manipulating vector fields on the sphere";
license = licenses.lgpl3;
homepage = "http://doi.org/10.5880/fidgeo.2019.033";
maintainers = "Hannes Matuschek";
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment