Skip to content
Snippets Groups Projects
Commit d45ba26b authored by Alexandre Beelen's avatar Alexandre Beelen
Browse files

fix(install) Updated template and fix installation on python 3.10

parent a833cfb4
No related branches found
No related tags found
No related merge requests found
Pipeline #10869 failed
# GitHub Actions workflow that runs on a cron schedule.
name: Cron Scheduled CI Tests
on:
schedule:
# run at 6am UTC on Mondays
- cron: '0 6 * * 1'
jobs:
# Testing links in documents is a good example of something to run on a schedule
# to catch links that stop working for some reason.
doc_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python to build docs with sphinx
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Check links in docs using tox
run: |
tox -e linkcheck
# GitHub Actions workflow for testing and continuous integration.
#
# This file performs testing using tox and tox.ini to define and configure the test environments.
name: CI Tests
on:
push:
branches:
- main # GitHub now defaults to 'main' as the name of the primary branch. Change this as needed.
# tags: # run CI if specific tags are pushed
pull_request:
# branches: # only build on PRs against 'main' if you need to further limit when CI is run.
# - main
jobs:
# Github Actions supports ubuntu, windows, and macos virtual environments:
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
ci_tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Code style checks
os: ubuntu-latest
python: 3.x
toxenv: codestyle
- name: Python 3.7 with minimal dependencies
os: ubuntu-latest
python: 3.7
toxenv: py37-test
- name: Python 3.8 with all optional dependencies and coverage checking
os: ubuntu-latest
python: 3.8
toxenv: py38-test-alldeps-cov
- name: macOS - Python 3.8 with all optional dependencies
os: macos-latest
python: 3.8
toxenv: py38-test-alldeps
- name: Windows - Python 3.8 with all optional dependencies
os: windows-latest
python: 3.8
toxenv: py38-test-alldeps
# - name: Python 3.7 with oldest supported version of all dependencies
# os: ubuntu-16.04
# python: 3.7
# toxenv: py37-test-oldestdeps
# - name: Python 3.8 with latest dev versions of key dependencies
# os: ubuntu-latest
# python: 3.8
# toxenv: py38-test-devdeps
# - name: Test building of Sphinx docs
# os: ubuntu-latest
# python: 3.x
# toxenv: build_docs
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up python ${{ matrix.python }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox codecov
- name: Test with tox
run: |
tox -e ${{ matrix.toxenv }}
# This is an example of how to upload coverage to codecov
# - name: Upload coverage to codecov
# if: "contains(matrix.toxenv, '-cov')"
# uses: codecov/codecov-action@v2
# with:
# file: ./coverage.xml
......@@ -33,12 +33,16 @@ docs/_build
.floo
.flooignore
# Visual Studio Code project files
.vscode
# Packages/installer info
*.egg
*.egg-info
dist
build
eggs
.eggs
parts
bin
var
......
version: 2
build:
image: latest
os: ubuntu-20.04
tools:
python: '3.7"
python:
version: 3.7
install:
- method: pip
path: .
......
[build-system]
requires = ["setuptools",
requires = ["setuptools>=42.0.0",
"setuptools_scm",
"wheel",
"extension-helpers",
"oldest-supported-numpy",
"cython==0.29.14"]
"oldest-supported-numpy",]
#"cython==0.29.14"]
build-backend = 'setuptools.build_meta'
......@@ -3,27 +3,27 @@ name = powspec
author = Alexandre Beelen
author_email = alexandre.beelen@lam.fr
license = BSD 3-Clause
license_file = licenses/LICENSE.rst
license_files = licenses/LICENSE.rst
url = http://docs.astropy.org/projects/package-template/
description = Power Spectrum
long_description = file: README.rst
long_description_content_type = text/x-rst
edit_on_github = False
edit_on_github = yes
github_project = abeelen/powspec
[options]
zip_safe = False
packages = find:
python_requires = >=3.6
python_requires = >=3.7
setup_requires = setuptools_scm
install_requires =
astropy
scipy
# [options.entry_points]
# console_scripts =
# astropy-package-template-example = packagename.example_mod:main
#
[options.entry_points]
console_scripts =
astropy-package-template-example = packagename.example_mod:main
[options.extras_require]
test =
pytest-astropy
......
......@@ -10,11 +10,15 @@ requires =
setuptools >= 30.3.0
pip >= 19.3.1
isolated_build = true
indexserver =
NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple
[testenv]
# Suppress display of matplotlib plots generated during docs build
setenv = MPLBACKEND=agg
# Pass through the following environment variables which may be needed for the CI
passenv = HOME WINDIR LC_ALL LC_CTYPE CC CI TRAVIS
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI,TRAVIS
# Run the tests in a temporary directory to make sure that we don't import
# this package from the source tree
......@@ -44,6 +48,7 @@ description =
# The following provides some specific pinnings for key packages
deps =
cov: coverage
numpy116: numpy==1.16.*
numpy117: numpy==1.17.*
numpy118: numpy==1.18.*
......@@ -52,7 +57,7 @@ deps =
astropy40: astropy==4.0.*
astropylts: astropy==4.0.*
devdeps: git+https://github.com/numpy/numpy.git#egg=numpy
devdeps: :NIGHTLY:numpy
devdeps: git+https://github.com/astropy/astropy.git#egg=astropy
# The following indicates which extras_require from setup.cfg will be installed
......@@ -64,6 +69,7 @@ commands =
pip freeze
!cov: pytest --pyargs powspec {toxinidir}/docs {posargs}
cov: pytest --pyargs powspec {toxinidir}/docs --cov powspec --cov-config={toxinidir}/setup.cfg {posargs}
cov: coverage xml -o {toxinidir}/coverage.xml
[testenv:build_docs]
changedir = docs
......@@ -71,7 +77,7 @@ description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -b html . _build/html
sphinx-build -W -b html . _build/html
[testenv:linkcheck]
changedir = docs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment