Skip to content

Commit

Permalink
Features/setuptools scm (#2)
Browse files Browse the repository at this point in the history
* setup: adapting setuptools-scm
* ci: workflow adaption
* ci: update maturin

Co-authored-by: Marius Isken <marius.isken@gfz-potsdam.de>
  • Loading branch information
miili and Marius Isken authored Nov 21, 2022
1 parent 0d3894b commit e255fe7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 51 deletions.
44 changes: 17 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,52 @@ name: build

on:
push:
branches: [main]
tags:
- v*
pull_request:

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: messense/maturin-action@v1
- uses: actions/checkout@v3
- uses: PyO3/maturin-action@v1
with:
manylinux: auto
command: build
args: --release -o dist
args: --release --sdist -o dist --find-interpreter

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: messense/maturin-action@v1
- uses: actions/checkout@v3
- uses: PyO3/maturin-action@v1
with:
command: build
args: --release --no-sdist -o dist
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - uses: messense/maturin-action@v1
# - uses: actions/checkout@v3
# - uses: PyO3/maturin-action@v1
# with:
# command: build
# args: --release --no-sdist -o dist --universal2
# args: --release -o dist --universal2 --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
Expand All @@ -69,11 +59,11 @@ jobs:
# needs: [ macos, windows, linux ]
needs: [ windows, linux ]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Lint

on: [push, pull_request]
on:
push:
tags:
- v*
pull_request:

jobs:
pre-commit:
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

![PyPI](https://img.shields.io/pypi/v/lightguide)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lightguide)](https://pypi.org/project/lightguide)
[![CI](https://github.com/pyrocko/lightguide/actions/workflows/build.yml/badge.svg)](https://github.com/pyrocko/lightguide/actions/workflows/build.yml)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
[![CI](https://github.com/pyrocko/lightguide/actions/workflows/build.yml/badge.svg)](https://github.com/pyrocko/lightguide/actions/workflows/build.yml)

Lightguide is a package for handling, filtering and modelling distributed acoustic sensing (DAS) data. The package interfaces handling and processing routines of DAS data to the [Pyrocko framework](https://pyrocko.org). Through Pyrocko's I/O engine :rocket: lightguide supports handling the following DAS data formats:

Expand Down Expand Up @@ -54,13 +55,13 @@ The filtering performance of the AFK filter, applied to an earthquake recording

Lightguide can be cited as:

> Marius Paul Isken, Sebastian Heimann, Christopher Wollin, Hannes Bathke, & Torsten Dahm. (2022). Lightguide - Seismological Tools for DAS data. Zenodo. https://doi.org/10.5281/zenodo.6580579
> Marius Paul Isken, Sebastian Heimann, Christopher Wollin, Hannes Bathke, & Torsten Dahm. (2022). Lightguide - Seismological Tools for DAS data. Zenodo. <https://doi.org/10.5281/zenodo.6580579>
[![DOI](https://zenodo.org/badge/495774991.svg)](https://zenodo.org/badge/latestdoi/495774991)

Details of the adaptive frequency filter are published here:

> Marius Paul Isken, Hannes Vasyura-Bathke, Torsten Dahm, Sebastian Heimann, De-noising distributed acoustic sensing data using an adaptive frequency-wavenumber filter, Geophysical Journal International, 2022;, ggac229, https://doi.org/10.1093/gji/ggac229
> Marius Paul Isken, Hannes Vasyura-Bathke, Torsten Dahm, Sebastian Heimann, De-noising distributed acoustic sensing data using an adaptive frequency-wavenumber filter, Geophysical Journal International, 2022;, ggac229, <https://doi.org/10.1093/gji/ggac229>
[![DOI](https://img.shields.io/badge/DOI-10.1093%2Fgji%2Fggac229-blue)](https://doi.org/10.1093/gji/ggac229)

Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[build-system]
requires = ["maturin>=0.12,<0.13"]
requires = ["maturin>=0.14,<0.15", "setuptools_scm[toml]>=6.2"]
build-backend = "maturin"

[project]
name = "lightguide"
description = "Tools for distributed acoustic sensing and modelling."
dynamic = ["version"]
requires-python = ">=3.8"
authors = [
{name = "Marius Paul Isken"},
Expand All @@ -26,5 +27,9 @@ GitHub = "https://github.com/pyrocko/lightguide"
Issues = "https://github.com/pyrocko/lightguide/issues"

[project.optional-dependencies]
formating = ["flake8", "black"]
tests = ["pytest-benchmark", "pytest"]
dev = [
"flake8",
"black",
"pytest-benchmark",
"pytest"
]
17 changes: 0 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,7 @@
long_description = fh.read()

setuptools.setup(
name="lightguide",
version="0.2.1",
author="Marius Paul Isken",
author_email="mi@gfz-potsdam.de",
description="DAS Tools for Pyrocko",
zip_safe=False,
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pyrocko/lightguide",
project_urls={
"Bug Tracker": "https://github.com/pyrocko/lightguide/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
rust_extensions=[
RustExtension(
"lightguide.afk_filter",
Expand All @@ -31,5 +15,4 @@
)
],
packages=["lightguide"],
python_requires=">=3.8",
)

0 comments on commit e255fe7

Please sign in to comment.