From 807e1161579f1e441d0ee9a56ce8b3ada3a6d46d Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Wed, 4 Dec 2019 12:46:49 +0100 Subject: [PATCH 1/5] Templating with Jinja; XXX needs numpy in base --- FieldTools/meta.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/FieldTools/meta.yaml b/FieldTools/meta.yaml index 8124f84..e33bfbf 100644 --- a/FieldTools/meta.yaml +++ b/FieldTools/meta.yaml @@ -1,11 +1,15 @@ +{% set data = load_setup_py_data() %} + package: name: pyfield - version: "0.1.3" + version: {{ data.get('version') }} source: - # Alternative: Get a tarball from a -- to be assigned -- DOI + # Get it from GIT git_url: https://gitup.uni-potsdam.de/matusche/fieldtools.git git_tag: master # Until we merged it to master; shall become a tag + # Alternative: Get a tarball from a -- to be assigned -- DOI + #url: http://www.math.uni-potsdam.de/~mauerberger/fieldtools-master.tar.gz build: # Not quite sure about $PYTHON; Docs are just using bare 'python' @@ -30,6 +34,13 @@ requirements: - eigen # Not sure if required test: + commands: + - $PYTHON -c 'import pyfield; pyfield.lm2i(1,1)' imports: - pyfield +about: + home: {{ data.get('url') }} + description: {{ data.get('description') }} + license: {{ data.get('license') }} + license_file: LICENSE -- GitLab From 473b83ff05046af3ee4cccc2474d75be3ad75046 Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Wed, 4 Dec 2019 12:49:31 +0100 Subject: [PATCH 2/5] Numpy is needed to parse setup.py with Jinja --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index dc72096..b3c2ee8 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ graph LR; ParameterFile-->Exploration-->Integration-->Evaluation; ``` -`CORBASS` uses parameter files, which include among other things a link to -datasets, in a format similar to the [GEOMAGIA](http://geomagia.gfz-potsdam.de/) +`CORBASS` uses parameter files, which include among other things a link to +datasets, in a format similar to the [GEOMAGIA](http://geomagia.gfz-potsdam.de/) output. Thus a first step is to create such a file for your data. You can find an [example](Example_Parfile.py) in the [*examples* section]. @@ -22,7 +22,7 @@ in the [*examples* section]. Once you have a parameter file, the recommended way to run `CORBASS` is to use ```console -(CORBASS)$ python run.py +(CORBASS)$ python run.py ``` This way the `CORBASS` posterior model coefficients, the NEZ- and DIF-field models @@ -30,7 +30,7 @@ and down component and intensity at the CMB are calculated and provided as `.txt files. The output location is specified in the parameter file. Under the hood, `CORBASS` first explores the model parameter space by using the -`exploration` module. This way the region of interest, i.e. where the +`exploration` module. This way the region of interest, i.e. where the probability mass is concentrated, is found and can be accessed by the `integration` module. The output can then be used to calculate further results, using the `evaluation` module. @@ -41,29 +41,29 @@ each model in the [*examples* section]. [*examples* section]: (examples) Cite as -> Schanner, M. and Mauerberger, S. (2019) -> CORBASS: CORrelation Based Archeomagnetic SnapShot model. V. 1.0. -> GFZ Data Services. http://doi.org/XXX +> Schanner, M. and Mauerberger, S. (2019) +> CORBASS: CORrelation Based Archeomagnetic SnapShot model. V. 1.0. +> GFZ Data Services. http://doi.org/XXX TODO: #10 # Installation -0. Clone the repository +0. Clone the repository ```console $ git clone https://gitext.gfz-potsdam.de/arthus/corbass.git ``` In the following `` refers to the path you cloned the `CORBASS` repository into. 1. Download and install [Miniconda](https://conda.io/miniconda.html) for Python 3. - By default, the installation directory `` is `~/miniconda3/`. + By default, the installation directory `` is `~/miniconda3/`. If you let conda modify your `bash.rc`, `/bin/conda` may be replaced by `conda`. 2. Build and install [FieldTools] - 1. Install `conda-build` (to base) + 1. Install `conda-build` and `numpy` (to base) ```console - $ /bin/conda install conda-build + $ /bin/conda install conda-build numpy ``` 2. Navigate to `` and build [FieldTools] @@ -81,7 +81,7 @@ TODO: #10 $ source /bin/activate CORBASS ``` - Careful with tcshell, you have to use activate.csh. + Careful with tcshell, you have to use activate.csh. When you are done, deactivate the environment by ```console (CORBASS)$ conda deactivate`. @@ -103,7 +103,7 @@ TODO: #10 # License GNU General Public License, Version 3, 29 June 2007 -Copyright (C) 2019 Maximilian Schanner, GFZ Potsdam +Copyright (C) 2019 Maximilian Schanner, GFZ Potsdam Copyright (C) 2019 Stefan Mauerberger, University of Potsdam CORBASS is free software: you can redistribute it and/or modify @@ -120,15 +120,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . # Contact -* [Maximilian Schanner](mailto:arthus@gfz-potsdam.de) -Helmholtz Centre Potsdam German Research Centre for Geoscienes GFZ -Section 2.3: Geomagnetism -Telegrafenberg +* [Maximilian Schanner](mailto:arthus@gfz-potsdam.de) +Helmholtz Centre Potsdam German Research Centre for Geoscienes GFZ +Section 2.3: Geomagnetism +Telegrafenberg 14473 Potsdam, Germany -* [Stefan Mauerberger](mailto:mauerber@uni-potsdam.de) -Institut of mathematics -University of Potsdam -Campus Golm, Haus 9 -Karl-Liebknecht-Str. 24-25 -14476 Potsdam OT Golm, Germany \ No newline at end of file +* [Stefan Mauerberger](mailto:mauerber@uni-potsdam.de) +Institut of mathematics +University of Potsdam +Campus Golm, Haus 9 +Karl-Liebknecht-Str. 24-25 +14476 Potsdam OT Golm, Germany -- GitLab From 9f37cf9ec2e1bc619f3fe54b70ef069d82a3e655 Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Thu, 5 Dec 2019 16:21:32 +0100 Subject: [PATCH 3/5] Revert Jinja; Use interim branch --- FieldTools/meta.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/FieldTools/meta.yaml b/FieldTools/meta.yaml index e33bfbf..3c4b6b4 100644 --- a/FieldTools/meta.yaml +++ b/FieldTools/meta.yaml @@ -1,13 +1,12 @@ -{% set data = load_setup_py_data() %} package: name: pyfield - version: {{ data.get('version') }} + version: 0.1.2 source: # Get it from GIT git_url: https://gitup.uni-potsdam.de/matusche/fieldtools.git - git_tag: master # Until we merged it to master; shall become a tag + git_tag: i1 # interim # Alternative: Get a tarball from a -- to be assigned -- DOI #url: http://www.math.uni-potsdam.de/~mauerberger/fieldtools-master.tar.gz @@ -19,6 +18,7 @@ requirements: build: - {{ compiler('cxx') }} - swig + - numpy # setup.py relies on numpy - pkg-config - eigen @@ -35,12 +35,11 @@ requirements: test: commands: - - $PYTHON -c 'import pyfield; pyfield.lm2i(1,1)' + - $PYTHON -c 'import pyfield; import doctest; doctest.testmod(pyfield)' + - $PYTHON -c 'import pyfieldcore; import doctest; doctest.testmod(pyfieldcore)' imports: - pyfield about: - home: {{ data.get('url') }} - description: {{ data.get('description') }} - license: {{ data.get('license') }} + license: GPLv3 license_file: LICENSE -- GitLab From 3c816686fd666b06243a7b906e077238d386fcf8 Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Fri, 17 Jan 2020 12:30:58 +0100 Subject: [PATCH 4/5] Get FieldTools from GFZ Data Services --- FieldTools/meta.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/FieldTools/meta.yaml b/FieldTools/meta.yaml index 3c4b6b4..7d14f4c 100644 --- a/FieldTools/meta.yaml +++ b/FieldTools/meta.yaml @@ -1,14 +1,14 @@ package: name: pyfield - version: 0.1.2 + version: 0.1.2 source: - # Get it from GIT - git_url: https://gitup.uni-potsdam.de/matusche/fieldtools.git - git_tag: i1 # interim - # Alternative: Get a tarball from a -- to be assigned -- DOI - #url: http://www.math.uni-potsdam.de/~mauerberger/fieldtools-master.tar.gz + # Get it from GIT XXX Git not yet public + #git_url: https://gitup.uni-potsdam.de/matusche/fieldtools.git + #git_tag: i1 # interim branch + # Get a tarball from GFZ data services + url: ftp://datapub.gfz-potsdam.de/download/10.5880.FIDGEO.2019.033/fieldtools-i1.tar.gz build: # Not quite sure about $PYTHON; Docs are just using bare 'python' @@ -18,7 +18,7 @@ requirements: build: - {{ compiler('cxx') }} - swig - - numpy # setup.py relies on numpy + - numpy # setup.py relies on numpy - pkg-config - eigen -- GitLab From c23638c8d9973dc55d5949180b2a0fefce02eec5 Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Mon, 3 Feb 2020 09:39:16 +0100 Subject: [PATCH 5/5] Path to GFZ data services --- FieldTools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FieldTools/meta.yaml b/FieldTools/meta.yaml index 7d14f4c..0b34c36 100644 --- a/FieldTools/meta.yaml +++ b/FieldTools/meta.yaml @@ -8,7 +8,7 @@ source: #git_url: https://gitup.uni-potsdam.de/matusche/fieldtools.git #git_tag: i1 # interim branch # Get a tarball from GFZ data services - url: ftp://datapub.gfz-potsdam.de/download/10.5880.FIDGEO.2019.033/fieldtools-i1.tar.gz + url: ftp://datapub.gfz-potsdam.de/download/10.5880.FIDGEO.2019.033/fieldtools.tar.gz build: # Not quite sure about $PYTHON; Docs are just using bare 'python' -- GitLab