GSTools 开源项目教程
GSToolsGSTools – A geostatistical toolbox: random fields, variogram estimation, covariance models, kriging and much more项目地址:https://gitcode.com/gh_mirrors/gs/GSTools
1. 项目的目录结构及介绍
GSTools 项目的目录结构如下:
GSTools/
├── .github/
│ └── workflows/
├── docs/
│ ├── examples/
│ └── _static/
├── gstools/
│ ├── covariance/
│ ├── field/
│ ├── krige/
│ ├── lgm/
│ ├── random/
│ ├── rng/
│ ├── tools/
│ └── __init__.py
├── tests/
│ ├── data/
│ └── test_covariance.py
├── .gitignore
├── .pre-commit-config.yaml
├── .readthedocs.yml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── pyproject.toml
├── setup.cfg
└── setup.py
目录结构介绍
.github/workflows/
: 包含 GitHub Actions 的工作流配置文件。docs/
: 包含项目的文档,包括示例和静态文件。gstools/
: 核心代码目录,包含各种模块如协方差、场、克里金等。tests/
: 包含测试代码和测试数据。- 根目录下的文件包括配置文件、许可证、贡献指南等。
2. 项目的启动文件介绍
GSTools 项目的启动文件主要是 setup.py
,这是一个标准的 Python 包安装脚本。它负责安装项目的依赖项并构建项目。
from setuptools import setup, find_packages
setup(
name="gstools",
version="1.3.3",
packages=find_packages(exclude=["tests"]),
install_requires=[
"numpy>=1.17",
"scipy>=1.3",
"hankel>=0.3.6",
"emcee>=3.0",
"pyevtk>=1.1.1",
],
extras_require={
"docs": ["sphinx", "sphinx_rtd_theme", "numpydoc"],
"tests": ["pytest", "pytest-cov", "coverage"],
},
python_requires=">=3.6",
author="Lukas Gonser, Sebastian Mueller",
author_email="lukas.gonser@ufz.de, seb.mueller@ufz.de",
description="GSTools - A geostatistical toolbox.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
license="GNU Lesser General Public License v3 or later (LGPLv3+)",
url="https://github.com/GeoStat-Framework/GSTools",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)
启动文件介绍
setup.py
: 定义了包的名称、版本、依赖项、作者信息、描述等。install_requires
: 列出了项目运行所需的基本依赖项。extras_require
: 提供了可选的依赖项,如文档生成和测试工具。
3. 项目的配置文件介绍
GSTools 项目的配置文件主要包括 setup.cfg
和 pyproject.toml
。
setup.cfg
setup.cfg
是一个配置文件,用于存储 setuptools
的配置选项。
[metadata]
name = gstools
version = attr: gstools.__version__
description = GSTools - A geostatistical toolbox.
long_description = file: README.md
long_description_content_type = text/markdown
author = Lukas Gonser, Sebastian Mueller
author_email = lukas.gonser@ufz.de
GSToolsGSTools – A geostatistical toolbox: random fields, variogram estimation, covariance models, kriging and much more项目地址:https://gitcode.com/gh_mirrors/gs/GSTools