diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b0f3ecb..3c5096c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest"] - python-version: ["3.10"] + python-version: ["3.12"] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -39,10 +39,9 @@ jobs: run: | conda info conda config --add channels conda-forge - conda install obspy cartopy libstdcxx-ng + conda install obspy spectrum pip install stdb - pip install spectrum - pip install -e . + pip install . # - name: Tests # shell: bash -l {0} @@ -54,7 +53,7 @@ jobs: # bash <(curl -s https://codecov.io/bash) - name: Make docs - if: matrix.python-version == '3.10' + if: matrix.python-version == '3.12' shell: bash -l {0} run: | cd docs @@ -65,7 +64,7 @@ jobs: cd .. - name: Deploy 🚀 - if: matrix.python-version == '3.10' + if: matrix.python-version == '3.12' uses: JamesIves/github-pages-deploy-action@3.7.1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/docs/rfpy.rst b/docs/rfpy.rst index 53a34d4..da3095e 100644 --- a/docs/rfpy.rst +++ b/docs/rfpy.rst @@ -31,15 +31,13 @@ Installation Dependencies ------------ -The current version has been tested using **Python > 3.6** \ +The current version has been tested using **Python > 3.9** \ Also, the following packages are required: - `stdb `_ +- `obspy `_ - `spectrum `_ -Other required packages (e.g., ``obspy``) -will be automatically installed by ``stdb``. - Conda environment ----------------- @@ -48,7 +46,7 @@ where ``RfPy`` can be installed along with some of its dependencies. .. sourcecode:: bash - conda create -n rfpy "python=3.10" "setuptools=60" obspy spectrum -c conda-forge + conda create -n rfpy -c conda-forge python=3.12 obspy spectrum Activate the newly created environment: @@ -56,7 +54,7 @@ Activate the newly created environment: conda activate rfpy -Install remaining dependencies using ``pip`` inside the ``rfpy`` environment: +Install the `StDb` dependency using ``pip`` inside the ``rfpy`` environment: .. sourcecode:: bash diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..00981a9 --- /dev/null +++ b/meson.build @@ -0,0 +1,30 @@ +project('rfpy', 'c', + version : '0.2.0', + license: 'MIT', + meson_version: '>=0.64.0', +) + +py_mod = import('python') +py = py_mod.find_installation() +py_dep = py.dependency() + +py.install_sources( + 'rfpy/rfdata.py', + 'rfpy/plotting.py', + 'rfpy/hk.py', + 'rfpy/harmonics.py', + 'rfpy/binning.py', + 'rfpy/utils.py', + 'rfpy/ccp.py', + 'rfpy/__init__.py', + 'rfpy/scripts/rfpy_calc.py', + 'rfpy/scripts/rfpy_recalc.py', + 'rfpy/scripts/rfpy_plot.py', + 'rfpy/scripts/rfpy_hk.py', + 'rfpy/scripts/rfpy_harmonics.py', + 'rfpy/scripts/rfpy_ccp.py', + 'rfpy/scripts/__init__.py', + pure: false, + preserve_path: true, + ) + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..dec229e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[build-system] +build-backend = "mesonpy" +requires = ["meson-python>0.15.0", "numpy >= 1.25.0"] + + +[project] +name = "rfpy" +version = "0.2.0" +description = "Python package for calculating and post-processing receiver functions" +authors = [ + { name = "Pascal Audet", email = "pascal.audet@uottawa.ca" } +] +maintainers = [ + { name = "Pascal Audet", email = "pascal.audet@uottawa.ca" } +] +requires-python = ">=3.9" +readme = "README.md" +dependencies = ["numpy>=1.25", "obspy", "spectrum"] +classifiers = [ + "Development Status :: 5 - Stable", + "Environment :: Console", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Scientific/Engineering :: Physics", +] + +[project.urls] +Homepage = "https://github.com/paudetseis/RfPy" +Documentation = "https://paudetseis.github.io/RfPy" +"Bug Tracker" = "https://github.com/paudetseis/RfPy/issues" + +[project.scripts] +rfpy_calc = "rfpy.scripts.rfpy_calc:main" +rfpy_recalc = "rfpy.scripts.rfpy_recalc:main" +rfpy_plot = "rfpy.scripts.rfpy_plot:main" +rfpy_hk = "rfpy.scripts.rfpy_hk:main" +rfpy_harmonics = "rfpy.scripts.rfpy_harmonics:main" +rfpy_ccp = "rfpy.scripts.rfpy_ccp:main" diff --git a/rfpy/__init__.py b/rfpy/__init__.py index ccb57c1..93019d7 100644 --- a/rfpy/__init__.py +++ b/rfpy/__init__.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -__version__ = '0.1.4' +__version__ = '0.2.0' __author__ = 'Pascal Audet' diff --git a/setup.py b/setup.py deleted file mode 100644 index be10bb2..0000000 --- a/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -import setuptools -import os.path -from os import listdir -import re -from setuptools import setup -from pathlib import Path - - -def find_version(*paths): - fname = os.path.join(os.path.dirname(__file__), *paths) - with open(fname) as fp: - code = fp.read() - match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", code, re.M) - if match: - return match.group(1) - raise RuntimeError("Unable to find version string.") - - -setup( - name='rfpy', - version=find_version('rfpy', '__init__.py'), - description='Python Module for Teleseismic Receiver Functions', - author='Pascal Audet', - author_email='pascal.audet@uottawa.ca', - maintainer='Pascal Audet', - maintainer_email='pascal.audet@uottawa.ca', - url='https://github.com/paudetseis/RfPy', - classifiers=[ - 'Development Status :: 3 - Alpha', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10'], - install_requires=['numpy', 'obspy', 'stdb>=0.2.0'], - python_requires='>=3.7', - packages=setuptools.find_packages(), - entry_points={'console_scripts': [ - 'rfpy_calc=rfpy.scripts.rfpy_calc:main', - 'rfpy_recalc=rfpy.scripts.rfpy_recalc:main', - 'rfpy_plot=rfpy.scripts.rfpy_plot:main', - 'rfpy_harmonics=rfpy.scripts.rfpy_harmonics:main', - 'rfpy_hk=rfpy.scripts.rfpy_hk:main', - 'rfpy_ccp=rfpy.scripts.rfpy_ccp:main']})