GSTools 开源项目教程

GSTools 开源项目教程

GSToolsGSTools – A geostatistical toolbox: random fields, variogram estimation, covariance models, kriging and much more项目地址:https://gitcode.com/gh_mirrors/gs/GSTools

1. 项目的目录结构及介绍

GSTools 项目的目录结构如下:

  1. GSTools/

  2. ├── .github/

  3. │ └── workflows/

  4. ├── docs/

  5. │ ├── examples/

  6. │ └── _static/

  7. ├── gstools/

  8. │ ├── covariance/

  9. │ ├── field/

  10. │ ├── krige/

  11. │ ├── lgm/

  12. │ ├── random/

  13. │ ├── rng/

  14. │ ├── tools/

  15. │ └── __init__.py

  16. ├── tests/

  17. │ ├── data/

  18. │ └── test_covariance.py

  19. ├── .gitignore

  20. ├── .pre-commit-config.yaml

  21. ├── .readthedocs.yml

  22. ├── CHANGELOG.md

  23. ├── CODE_OF_CONDUCT.md

  24. ├── CONTRIBUTING.md

  25. ├── LICENSE

  26. ├── MANIFEST.in

  27. ├── README.md

  28. ├── pyproject.toml

  29. ├── setup.cfg

  30. └── setup.py

目录结构介绍

  • .github/workflows/: 包含 GitHub Actions 的工作流配置文件。
  • docs/: 包含项目的文档,包括示例和静态文件。
  • gstools/: 核心代码目录,包含各种模块如协方差、场、克里金等。
  • tests/: 包含测试代码和测试数据。
  • 根目录下的文件包括配置文件、许可证、贡献指南等。

2. 项目的启动文件介绍

GSTools 项目的启动文件主要是 setup.py,这是一个标准的 Python 包安装脚本。它负责安装项目的依赖项并构建项目。

  1. from setuptools import setup, find_packages

  2. setup(

  3. name="gstools",

  4. version="1.3.3",

  5. packages=find_packages(exclude=["tests"]),

  6. install_requires=[

  7. "numpy>=1.17",

  8. "scipy>=1.3",

  9. "hankel>=0.3.6",

  10. "emcee>=3.0",

  11. "pyevtk>=1.1.1",

  12. ],

  13. extras_require={

  14. "docs": ["sphinx", "sphinx_rtd_theme", "numpydoc"],

  15. "tests": ["pytest", "pytest-cov", "coverage"],

  16. },

  17. python_requires=">=3.6",

  18. author="Lukas Gonser, Sebastian Mueller",

  19. author_email="lukas.gonser@ufz.de, seb.mueller@ufz.de",

  20. description="GSTools - A geostatistical toolbox.",

  21. long_description=open("README.md").read(),

  22. long_description_content_type="text/markdown",

  23. license="GNU Lesser General Public License v3 or later (LGPLv3+)",

  24. url="https://github.com/GeoStat-Framework/GSTools",

  25. classifiers=[

  26. "Development Status :: 5 - Production/Stable",

  27. "Intended Audience :: Science/Research",

  28. "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",

  29. "Programming Language :: Python :: 3",

  30. "Programming Language :: Python :: 3.6",

  31. "Programming Language :: Python :: 3.7",

  32. "Programming Language :: Python :: 3.8",

  33. "Programming Language :: Python :: 3.9",

  34. ],

  35. )

启动文件介绍

  • setup.py: 定义了包的名称、版本、依赖项、作者信息、描述等。
  • install_requires: 列出了项目运行所需的基本依赖项。
  • extras_require: 提供了可选的依赖项,如文档生成和测试工具。

3. 项目的配置文件介绍

GSTools 项目的配置文件主要包括 setup.cfgpyproject.toml

setup.cfg

setup.cfg 是一个配置文件,用于存储 setuptools 的配置选项。

  1. [metadata]

  2. name = gstools

  3. version = attr: gstools.__version__

  4. description = GSTools - A geostatistical toolbox.

  5. long_description = file: README.md

  6. long_description_content_type = text/markdown

  7. author = Lukas Gonser, Sebastian Mueller

  8. 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

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...