Skip to content

Commit

Permalink
Shield url and images (#34)
Browse files Browse the repository at this point in the history
* Shield url and images

* Using skbuild setup because CMake no work on macos

* Update conan dependencies

* Bump to 2.2.1
  • Loading branch information
mdavezac authored Nov 25, 2020
1 parent e24068b commit 0ebe933
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: create package with fpic=${{matrix.fpic}} cfitsio=${{matrix.cfitsio}}
shell: bash
run: |
if [ "${{ github.ref }}" = "refs/tags/v2.2.0" ]; then
if [ "${{ github.ref }}" = "refs/tags/v2.2.1" ]; then
channel="stable"
else
channel="testing"
Expand All @@ -55,4 +55,4 @@ jobs:
CONAN_PASSWORD: ${{secrets.BINTRAY_TOKEN}}
CONAN_LOGIN_USERNAME: astroinformaticsci
CONAN_REMOTE_URL: https://api.bintray.com/conan/astro-informatics/astro-informatics
run: conan upload s2let/2.2.0 -c --all -r=astro-informatics
run: conan upload s2let/2.2.1 -c --all -r=astro-informatics
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ jobs:
mv source-distribution/*.tar.gz wheel-*/*.whl dist
- name: Publish distribution 📦 to Test PyPI
if: ${{ github.ref != 'refs/tags/v2.2.0' }}
if: ${{ github.ref != 'refs/tags/v2.2.1' }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution 📦 to PyPI
if: ${{ github.ref == 'refs/tags/v2.2.0' }}
if: ${{ github.ref == 'refs/tags/v2.2.1' }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ cmake_minimum_required(VERSION 3.12)

project(
s2let
VERSION "2.2.0"
VERSION "2.2.1"
DESCRIPTION "Fast wavelets on the sphere"
HOMEPAGE_URL "http://astro-informatics.github.io/s2let/"
LANGUAGES C)

option(tests "Enable testing" ON)
option(python "Creates python package only" OFF)
option(cfitsio "Links to cfitsio" OFF)
option(fPIC "Compile with fPIC" ON)
option(conan_deps "Download dependencies using conan" OFF)
Expand Down Expand Up @@ -48,12 +47,9 @@ if(tests)
add_subdirectory(src/test/c)
endif()

if(NOT python)
if(NOT SKBUILD)
include("exporting")
else()
include("python-setup")
find_python()
setup_skbuild()
find_package(PythonExtensions REQUIRED)
find_package(Cython REQUIRED)
find_package(NumPy REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[docs-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-url]: https://astro-informatics.github.io/s2let/
[bintray-img]: https://img.shields.io/bintray/v/astro-informatics/astro-informatics/s2let:astro-informactics?label=C%20package
[bintray-url]: https://bintray.com/astro-informatics/astro-informatics/s2let:astro-informatics/2.2.0:stable/link
[bintray-img]: https://img.shields.io/bintray/v/astro-informatics/astro-informatics/s2let:astro-informatics?label=C%20package
[bintray-url]: https://bintray.com/astro-informatics/astro-informatics/s2let:astro-informatics/2.2.1:stable/link
[pypi-img]: https://badge.fury.io/py/pys2let.svg
[pypi-url]: https://badge.fury.io/py/pys2let
[codefactor-img]: https://www.codefactor.io/repository/github/astro-informatics/s2let/badge/main
Expand Down
4 changes: 2 additions & 2 deletions cmake/conan_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ elseif(NOT CONAN_OPTIONS)
endif()
if(NOT CONAN_EDITABLE_MODE)
if(NOT CONAN_DEPS)
set(CONAN_DEPS "so3/1.3.0@astro-informatics/stable")
set(CONAN_DEPS "so3/1.3.1@astro-informatics/stable")
endif()
list(APPEND CONAN_OPTIONS "so3:fPIC=${fpic_value}")
endif()
if(cfitsio)
list(APPEND CONAN_DEPS "cfitsio/3.480")
list(APPEND CONAN_DEPS "cfitsio/3.490")
list(APPEND CONAN_OPTIONS "cfitsio:shared=False" "cfitsio:fPIC=${fpic_value}")
endif()
if(NOT CONAN_BUILD)
Expand Down
30 changes: 0 additions & 30 deletions cmake/python-setup.cmake

This file was deleted.

6 changes: 3 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class S2letConan(ConanFile):
name = "s2let"
version = "2.2.0"
version = "2.2.1"
license = "GPL-2.0"
url = "https://github.com/astro-informatics/s2let"
homepage = "https://github.com/astro-informatics/s2let"
Expand Down Expand Up @@ -32,9 +32,9 @@ def configure(self):

def requirements(self):
location = "astro-informatics/stable" if self.in_local_cache else "user/testing"
self.requires(f"so3/1.3.0@{location}")
self.requires(f"so3/1.3.1@{location}")
if self.options.with_cfitsio:
self.requires("cfitsio/3.480")
self.requires("cfitsio/3.490")

@property
def cmake(self):
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h2>News</h2>
<img src="https://img.shields.io/badge/docs-stable-blue.svg">
</a>

<a href="https://bintray.com/astro-informatics/astro-informatics/so3:astro-informatics/">
<img src="https://img.shields.io/bintray/v/astro-informatics/astro-informatics/so3:astro-informatics?label=C%20package">
<a href="https://bintray.com/astro-informatics/astro-informatics/s2let:astro-informatics/2.2.1:stable/link">
<img src="https://img.shields.io/bintray/v/astro-informatics/astro-informatics/s2let:astro-informatics?label=C%20package"/>
</a>

<a href="https://badge.fury.io/py/pys2let">
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ UNAME := $(shell uname)

# Compilers and options for C
CC = gcc
OPT = -Wall -g -fPIC -fopenmp -DS2LET_VERSION=\"2.2.0\" -DS2LET_BUILD=\"`git rev-parse HEAD`\"
OPT = -Wall -g -fPIC -fopenmp -DS2LET_VERSION=\"2.2.1\" -DS2LET_BUILD=\"`git rev-parse HEAD`\"

# Compilers and options for Fortran
FCC = gfortran
Expand Down
6 changes: 5 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[bumpversion]
current_version = 2.2.0
current_version = 2.2.1
commit = False
tag = False

[bumpversion:file:src/doxygen.config]

[bumpversion:file:docs/index.html]
search = {current_version}:stable
replace = {new_version}:stable

[bumpversion:file:README.md]

[bumpversion:file:setup.py]
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from skbuild import setup

cmake_args = [
"-Dpython:BOOL=ON",
"-Dtests:BOOL=OFF",
"-Dconan_deps:BOOL=ON",
"-Dcfitsio:BOOL=OFF",
Expand All @@ -21,7 +20,7 @@

setup(
name="pys2let",
version="2.2.0",
version="2.2.1",
author=["Boris Leistedt", "Martin Büttner", "Jennifer Chan", "Jason McEwen"],
install_requires=["numpy"],
extras_require={
Expand Down
2 changes: 1 addition & 1 deletion src/doxygen.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PROJECT_NAME = S2LET
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 2.2.0
PROJECT_NUMBER = 2.2.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
Expand Down
2 changes: 1 addition & 1 deletion src/main/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if(fPIC)
set_target_properties(s2let PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
endif()

if(NOT python)
if(NOT SKBUILD)
install(
TARGETS s2let
EXPORT S2letTargets
Expand Down
5 changes: 3 additions & 2 deletions src/main/pys2let/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
add_cython_target(cython_sources pys2let.pyx C PY3)

python3_add_library(pys2let MODULE ${cython_sources})
add_library(pys2let MODULE ${cython_sources})
python_extension_module(pys2let)
if(WIN32)
target_compile_definitions(pys2let PRIVATE MS_WIN64)
endif()

target_link_libraries(pys2let PUBLIC s2let)
target_link_libraries(pys2let s2let)
target_include_directories(pys2let PUBLIC "${PROJECT_SOURCE_DIR}/include"
${NumPy_INCLUDE_DIRS})
install(TARGETS pys2let LIBRARY DESTINATION src/main/pys2let/)

0 comments on commit 0ebe933

Please sign in to comment.