summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-29 09:39:15 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-29 09:39:15 +0000
commitf2e329819af985fdf44670d7ee89245e32a9c1aa (patch)
tree01a3204a69cf23009d33bca70d2fff4ab705d30b
parent0b0f11c38538cb420e835d3a0aab5a87dcc53f21 (diff)
automatic import of python-spacegrids
-rw-r--r--.gitignore1
-rw-r--r--python-spacegrids.spec114
-rw-r--r--sources1
3 files changed, 116 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..52d27b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/spacegrids-1.9.tar.gz
diff --git a/python-spacegrids.spec b/python-spacegrids.spec
new file mode 100644
index 0000000..131f6b9
--- /dev/null
+++ b/python-spacegrids.spec
@@ -0,0 +1,114 @@
+%global _empty_manifest_terminate_build 0
+Name: python-spacegrids
+Version: 1.9
+Release: 1
+Summary: numpy array with grids and associated operations
+License: BSD
+URL: https://github.com/willo12/spacegrids
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/27/2f/ae92422f65f2c76c9c9a5fcdaff39df466b7d223f241eb6ddfda50ca2238/spacegrids-1.9.tar.gz
+BuildArch: noarch
+
+
+%description
+Spacegrids is an open source library providing a Numpy array with grids, labelled axes and associated grid-related mathematical methods such as regridding and integration. Spacegrids provides an object data model of Netcdf data that ensures consistency between a Numpy data array and its grid under common operations (and so avoiding common pitfalls related to axis interpretation), and much more. It is a write less do more library for everyday use.
+These `interactive plots from Netcdf data <https://willospace.pythonanywhere.com/>`_ are based on Spacegrids.
+The Field, Gr (grid) and Coord objects make everyday use easy:
+ >>> import spacegrids as sg
+ >>> D = sg.info(nonick = True)
+ >>> P = sgPproject(D['my_project'] , nonick = True)
+ >>> P.load(['temperature','u'])
+ >>> # obtain the axes objects under their names T,X,Y,Z:
+ >>> for c in P['some_experiment'].axes:
+ >>> exec c.name + ' = c' # now we can refer to X,Y
+ >>> TEMP = P['some_experiment']['temperature']
+ >>> U = P['some_experiment']['u'] # zonal velocity
+ >>> TEMP_sliced = TEMP[Y,:50] # slice. Note Y axis object
+ >>> m_TEMP = TEMP_sliced/(X*Y) # take hor. mean
+ >>> TEMP_regridded = TEMP.regrid(U.gr) # U grid differs
+
+%package -n python3-spacegrids
+Summary: numpy array with grids and associated operations
+Provides: python-spacegrids
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-spacegrids
+Spacegrids is an open source library providing a Numpy array with grids, labelled axes and associated grid-related mathematical methods such as regridding and integration. Spacegrids provides an object data model of Netcdf data that ensures consistency between a Numpy data array and its grid under common operations (and so avoiding common pitfalls related to axis interpretation), and much more. It is a write less do more library for everyday use.
+These `interactive plots from Netcdf data <https://willospace.pythonanywhere.com/>`_ are based on Spacegrids.
+The Field, Gr (grid) and Coord objects make everyday use easy:
+ >>> import spacegrids as sg
+ >>> D = sg.info(nonick = True)
+ >>> P = sgPproject(D['my_project'] , nonick = True)
+ >>> P.load(['temperature','u'])
+ >>> # obtain the axes objects under their names T,X,Y,Z:
+ >>> for c in P['some_experiment'].axes:
+ >>> exec c.name + ' = c' # now we can refer to X,Y
+ >>> TEMP = P['some_experiment']['temperature']
+ >>> U = P['some_experiment']['u'] # zonal velocity
+ >>> TEMP_sliced = TEMP[Y,:50] # slice. Note Y axis object
+ >>> m_TEMP = TEMP_sliced/(X*Y) # take hor. mean
+ >>> TEMP_regridded = TEMP.regrid(U.gr) # U grid differs
+
+%package help
+Summary: Development documents and examples for spacegrids
+Provides: python3-spacegrids-doc
+%description help
+Spacegrids is an open source library providing a Numpy array with grids, labelled axes and associated grid-related mathematical methods such as regridding and integration. Spacegrids provides an object data model of Netcdf data that ensures consistency between a Numpy data array and its grid under common operations (and so avoiding common pitfalls related to axis interpretation), and much more. It is a write less do more library for everyday use.
+These `interactive plots from Netcdf data <https://willospace.pythonanywhere.com/>`_ are based on Spacegrids.
+The Field, Gr (grid) and Coord objects make everyday use easy:
+ >>> import spacegrids as sg
+ >>> D = sg.info(nonick = True)
+ >>> P = sgPproject(D['my_project'] , nonick = True)
+ >>> P.load(['temperature','u'])
+ >>> # obtain the axes objects under their names T,X,Y,Z:
+ >>> for c in P['some_experiment'].axes:
+ >>> exec c.name + ' = c' # now we can refer to X,Y
+ >>> TEMP = P['some_experiment']['temperature']
+ >>> U = P['some_experiment']['u'] # zonal velocity
+ >>> TEMP_sliced = TEMP[Y,:50] # slice. Note Y axis object
+ >>> m_TEMP = TEMP_sliced/(X*Y) # take hor. mean
+ >>> TEMP_regridded = TEMP.regrid(U.gr) # U grid differs
+
+%prep
+%autosetup -n spacegrids-1.9
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-spacegrids -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 1.9-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..555cf01
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+64345c263dc711ce1a89ba00f7284990 spacegrids-1.9.tar.gz