From 194c6d8143c63492369df51c436fe88596836890 Mon Sep 17 00:00:00 2001 From: Mijian Xu Date: Thu, 29 Feb 2024 22:22:49 +0800 Subject: [PATCH] change theme to furo --- .github/workflows/doc_build.yml | 29 +++++++++++++++++------ environment.yml | 4 +--- source/conf.py | 41 ++++++++++++++++++--------------- source/examples/ex-harmo.md | 2 +- source/index.md | 12 +++++----- source/usage/ccp.rst | 2 +- source/usage/pickrf.md | 2 ++ 7 files changed, 55 insertions(+), 37 deletions(-) diff --git a/.github/workflows/doc_build.yml b/.github/workflows/doc_build.yml index 4e1c3f56..5e11a9b2 100644 --- a/.github/workflows/doc_build.yml +++ b/.github/workflows/doc_build.yml @@ -12,7 +12,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - deploy: + build and deploy: runs-on: macos-latest defaults: run: @@ -20,14 +20,17 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: Set branch name + id: vars + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo ::set-output name=branch::${{ github.event.pull_request.head.ref }} + else + echo ::set-output name=branch::"dev" + fi - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.9.1 - - name: Checkout - uses: actions/checkout@v2.4.0 - with: - ref: docs - - name: Setup Mambaforge uses: conda-incubator/setup-miniconda@v2.1.1 with: @@ -35,7 +38,19 @@ jobs: environment-file: environment.yml # miniforge-variant: Mambaforge # use-mamba: true - + + - name: Install Seispy + uses: actions/checkout@v2.4.0 + with: + ref: ${{ steps.vars.outputs.branch }} + run: | + pip install -e . + + - name: Checkout to docs branch + uses: actions/checkout@v2.4.0 + with: + ref: docs + - name: Build documentation run: | make html diff --git a/environment.yml b/environment.yml index 1a008627..aa21f564 100644 --- a/environment.yml +++ b/environment.yml @@ -3,14 +3,12 @@ channels: - conda-forge - nodefaults dependencies: - - python=3.10 - - seispy - pip - sphinx - sphinx-copybutton - sphinx-design - myst-nb - - pydata-sphinx-theme=0.8.1 + - furo - obspy - numpydoc - pip: diff --git a/source/conf.py b/source/conf.py index b4735808..6029bc61 100644 --- a/source/conf.py +++ b/source/conf.py @@ -21,14 +21,14 @@ # -- Project information ----------------------------------------------------- -project = 'seispy' +project = 'Seispy' copyright = '2020, Mijian Xu' author = 'Mijian Xu' # The short X.Y version -version = '' +version = '1.3.5' # The full version, including alpha/beta/rc tags -release = 'latest' +release = version # -- General configuration --------------------------------------------------- @@ -101,16 +101,14 @@ # html_baseurl = "seispy.xumijian.me" -# html_theme = 'classic' -html_theme = 'pydata_sphinx_theme' +html_theme = 'furo' +# html_theme = 'pydata_sphinx_theme' # html_theme_path = [lsst_dd_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} - # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". @@ -126,19 +124,24 @@ # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. html_theme_options = { - "icon_links": [ - { - # Label for this link - "name": "GitHub", - # URL where the link will redirect - "url": "https://github.com/xumi1993/seispy", # required - # Icon class (if "type": "fontawesome"), or path to local image (if "type": "local") - "icon": "fab fa-github-square", - # Whether icon should be a FontAwesome class, or a local file - # "type": "fontawesome OR local", # Default is fontawesome - } - ] +# "icon_links": [ +# { +# # Label for this link +# "name": "GitHub", +# # URL where the link will redirect +# "url": "https://github.com/xumi1993/seispy", # required +# # Icon class (if "type": "fontawesome"), or path to local image (if "type": "local") +# "icon": "fab fa-github-square", +# # Whether icon should be a FontAwesome class, or a local file +# # "type": "fontawesome OR local", # Default is fontawesome +# } +# ], + "light_css_variables": { + "color-brand-primary": "#0080C4", + "color-brand-content": "#0080C4", + }, } + # # html_sidebars = {} html_favicon = os.path.abspath(os.path.join('.', '_static', 'seispy_100.png')) diff --git a/source/examples/ex-harmo.md b/source/examples/ex-harmo.md index d4aa08e8..456bed0a 100644 --- a/source/examples/ex-harmo.md +++ b/source/examples/ex-harmo.md @@ -3,7 +3,7 @@ ## Background Harmonic decomposition is an effective technique to separate anisotropic and dipping components from radius and transverse RFs ([Bianchi et al., 2010](https://doi.org/10.1029/2009JB007061])). This technique not only used to estimate azimuthal crustal anisotropy and crustal layer dipping , but used to extract isotropic component of RF for 1D RF inversion. In the Seispy, the command `rfharmo` is accessible for computing the harmonic decomposition, plotting different components after the decomposition, and save the isotropic component to a local SAC file. -```Code +``` usage: Harmonic decomposition for extracting anisotropic and isotropic features from the radial and transverse RFs [-h] [-t tb/te] [-s dt] [-o outpath] [-e enf] [-p figure_path] rfpath positional arguments: diff --git a/source/index.md b/source/index.md index f19b4f88..f0c13625 100644 --- a/source/index.md +++ b/source/index.md @@ -5,10 +5,10 @@ # Seispy Documentation -[![License](https://img.shields.io/github/license/xumi1993/seispy)]() -[![](https://img.shields.io/github/last-commit/xumi1993/seispy)]() -[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/xumi1993/seispy)]() -[![GitHub repo size](https://img.shields.io/github/repo-size/xumi1993/seispy)]() +![License](https://img.shields.io/github/license/xumi1993/seispy) +![Last commit](https://img.shields.io/github/last-commit/xumi1993/seispy) +![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/xumi1993/seispy) +![GitHub repo size](https://img.shields.io/github/repo-size/xumi1993/seispy) [![DOI](https://zenodo.org/badge/41006349.svg)](https://zenodo.org/badge/latestdoi/41006349) [![CRV test](https://github.com/xumi1993/seispy/actions/workflows/test.yml/badge.svg?branch=dev)](https://github.com/xumi1993/seispy/actions/workflows/test.yml) @@ -26,8 +26,8 @@ [![PyPI](https://img.shields.io/pypi/v/python-seispy)](https://pypi.org/project/python-seispy/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-seispy)](https://pypi.org/project/python-seispy/) -[![GitHub stars](https://img.shields.io/github/stars/xumi1993/seispy?style=social)]() -[![](https://img.shields.io/github/forks/xumi1993/seispy?style=social)]() +[![GitHub stars](https://img.shields.io/github/stars/xumi1993/seispy?style=social)](https://github.com/xumi1993/seispy) +[![](https://img.shields.io/github/forks/xumi1993/seispy?style=social)](https://github.com/xumi1993/seispy) Seispy is a graphical interface Python module for receiver function (RF) calculation and post-processing in seismological research. Automated workflows of RF calculations facilitate processing large volumes of different types of seismic data. The graphic user interface enables an intuitive and straightforward evaluation of RF quality control. Seispy contains the basic RF-based methods. Five main modules for the post-processing of RF are H-k stacking, crustal anisotropic estimation, harmonic decomposition, 2D and 3D common conversion point (CCP) stacking. The CCP staking in the different application scenarios can be handled by rich modules, such as time-to-depth conversion, 2D or 3D CCP stacking, and adaptive station or bin selection for CCP stacking profiles in a dense seismic array or a linear seismic array. As a Python module, functions in the Seispy can be called easily in python scripts for other purposes. The modular design allows new functionality to be added in a collaborative development environment. Seispy licensed under GPLv3 can be open accessed on [Github repository](https://github.com/xumi1993/seispy). diff --git a/source/usage/ccp.rst b/source/usage/ccp.rst index 7fafe02c..31b6395f 100644 --- a/source/usage/ccp.rst +++ b/source/usage/ccp.rst @@ -165,7 +165,7 @@ The output structure would be saved as a ``.npy`` file, which can be read with ` .. note:: - The layer_num was determined by field ``[depth]`` in parameter file. + The ``layer_num`` was determined by field ``[depth]`` in parameter file. CCP Stack PRFs along a profile ================================ diff --git a/source/usage/pickrf.md b/source/usage/pickrf.md index d93f8714..00ebd410 100644 --- a/source/usage/pickrf.md +++ b/source/usage/pickrf.md @@ -42,7 +42,9 @@ When you have selected all PRFs, please click `finish` button to delete all 'poo - Magnitude - Gaussian factor +```{note} This list file is **very important** for derived method such as H-k stacking and CCP stacking. +``` ## Other functions