Skip to content

Commit

Permalink
Merge pull request #9 from AstarVienna/hb/pyproject
Browse files Browse the repository at this point in the history
Use pyproject.toml and DevOps workflow
  • Loading branch information
hugobuddel authored Jul 8, 2023
2 parents 17adab9 + 8d558bb commit 79b0b31
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 173 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/markdown_link_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check Markdown links

on:
push:
schedule:
- # Run every day at 5:00 UTC
- cron: "0 5 * * *"

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
25 changes: 25 additions & 0 deletions .github/workflows/minimumdependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Minimum Dependencies
# Installs the minimum versions of the dependencies and runs the tests.
# This test will lower the chance that users botch their installation by
# only upgrading this project but not the dependencies.

on:
push:
branches:
- master
- dev_master
pull_request:
branches:
- master
- dev_master

# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:

schedule:
- # Run every day at 5:00 UTC.
- cron: "0 5 * * *"

jobs:
call-minimum-dependencies:
uses: AstarVienna/DevOps/.github/workflows/minimumdependencies.yml@master
33 changes: 0 additions & 33 deletions .github/workflows/tests.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tests

on:
push:
branches:
- master
- dev_master
pull_request:
branches:
- master
- dev_master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
call-tests:
uses: AstarVienna/DevOps/.github/workflows/tests.yml@master
23 changes: 23 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.9"

sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
path: .
extra_requirements:
- docs

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats: [] # ignore htmlzip. html is always run
24 changes: 0 additions & 24 deletions .readthedocs.yml

This file was deleted.

File renamed without changes.
13 changes: 0 additions & 13 deletions docs/requirements.txt

This file was deleted.

64 changes: 59 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,61 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
[project]
name = "speXtra"
version = "0.34-alpha"
description = "Tool to manage and manipulate astronomical spectra"
readme = "README.md"
requires-python = ">=3.8"
# When updating the version, also update the versions in .github/workflows/*
license = {text = "License :: OSI Approved :: MIT License"}
authors = [
{name = "Miguel Verdugo", email="[email protected]"},
]
maintainers = [
{name = "Kieran Leschinski", email="[email protected]"},
{name = "Hugo Buddelmeijer", email="[email protected]"},
]
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Astronomy",
]
dependencies = [
# Try to keep the dependencies on lower versions that have a wheel
# package on PyPI, for minimumdependencies.yml
"numpy>=1.18.0",
"astropy>=4.0",
"synphot>=1.1.0",
"pyyaml>5.2",
"scipy>=1.4.0",
]
build-backend = "setuptools.build_meta"

[project.optional-dependencies]
test = [
"pytest>=5.0.0",
"pytest-cov",
"matplotlib>=3.2.0",
]
docs = [
"sphinx>=4.3.0",
"sphinx-rtd-theme>=0.5.1",
"jupyter_sphinx==0.2.3",
"sphinxcontrib-apidoc",
"nbsphinx",
"numpydoc",
]

[project.urls]
"Homepage" = "https://spextra.readthedocs.io/en/latest/"
"Source" = "https://github.com/AstarVienna/speXtra"
"Bug Reports" = "https://github.com/AstarVienna/speXtra/issues"

[tool.setuptools]
packages = ["spextra"]

[tool.pytest.ini_options]
addopts = "--strict-markers"
markers = [
"webtest: marks tests as requiring network (deselect with '-m \"not webtest\"')",
]
17 changes: 0 additions & 17 deletions requirements.txt

This file was deleted.

78 changes: 0 additions & 78 deletions setup.py

This file was deleted.

5 changes: 2 additions & 3 deletions spextra/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# THIS FILE GENERATED BY speXtra setup.py
version = '0.33'
date = '2023-03-21'
from importlib import metadata
version = metadata.version(__package__)

0 comments on commit 79b0b31

Please sign in to comment.