Skip to content

Commit

Permalink
Packaging (#140)
Browse files Browse the repository at this point in the history
* packaging

* run ci on branch

* don't set shell

* coverage on linux only

* fixing future warning

* submodule

* coveragerc

* trying to get coverage to work

* coverage

* trying again

* install editable for coverage

* another

* how about now

* one more try

* specific path

* adding separate coverage workflow and wheels

* getting rid of yaml warning

* removing hanging coverage call

* words in docs

* update pip add changes
  • Loading branch information
dfm authored Feb 15, 2021
1 parent 4481968 commit 1c866e7
Show file tree
Hide file tree
Showing 935 changed files with 430 additions and 264,065 deletions.
29 changes: 0 additions & 29 deletions .appveyor.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .ci/build-paper.sh

This file was deleted.

17 changes: 0 additions & 17 deletions .ci/setup-tectonic.sh

This file was deleted.

2 changes: 0 additions & 2 deletions .ci/tectonic.config.toml

This file was deleted.

40 changes: 0 additions & 40 deletions .ci/travis.sh

This file was deleted.

4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[report]
[run]
omit =
docs/*
*__init__*
relative_files = True

[report]
exclude_lines =
pragma: no cover
raise NotImplementedError
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types:
- published
jobs:
tests:
name: "py${{ matrix.python-version }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Clone the repo
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up windows compilers
uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies
run: |
python -m pip install -U pip pytest
python -m pip install .
env:
DISTUTILS_USE_SDK: 1
MSSdk: 1
- name: Run tests
run: python -m pytest -v tests

coverage:
name: "Run tests with coverage"
runs-on: ubuntu-latest
steps:
- name: Clone the repo
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install -U pip pytest-cov
python -m pip install -e .
- name: Run tests
run: python -m pytest --cov george -v tests
- name: Coveralls
uses: AndreMiras/coveralls-python-action@v20201129

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: ilammy/msvc-dev-cmd@v1
- uses: joerick/[email protected]
env:
CIBW_BUILD: "cp3?-*"
CIBW_SKIP: "cp35-* *-win32 *-manylinux_i686"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
DISTUTILS_USE_SDK: 1
MSSdk: 1
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"
- name: Build sdist
run: |
python -m pip install -U pip
python -m pip install -U build
python -m build --sdist .
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

upload_pypi:
needs: [tests, build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ dist
build
*.cpp
.coverage
george/kernels.py
george/kerneldefs.pxd
george/solvers/kerneldefs.pxd
george/include/george/kernels.h
src/george/george_version.py
src/george/kernels.py
src/george/kerneldefs.pxd
src/george/solvers/kerneldefs.pxd
src/george/include/george/kernels.h
kernels/MyLocalGaussian.yml
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/eigen"]
path = vendor/eigen
url = https://gitlab.com/libeigen/eigen.git
3 changes: 3 additions & 0 deletions .rtd-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ dependencies:
- scipy
- pyyaml
- jinja2
- pip
- pip:
- .
64 changes: 0 additions & 64 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.. :changelog:
0.4.0 (2021-02-15)
++++++++++++++++++

- Updated packaging and installation issues
- Updated CI and Python version testing

0.3.1 (2018-01-08)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2017 Daniel Foreman-Mackey and contributors
Copyright (c) 2012-2021 Daniel Foreman-Mackey and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
8 changes: 5 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include README.rst LICENSE HISTORY.rst AUTHORS.rst
graft george/include
graft vendor

exclude .*
prune .github
prune docs
prune paper
12 changes: 5 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ George
.. image:: https://img.shields.io/badge/GitHub-dfm%2Fgeorge-blue.svg?style=flat
:target: https://github.com/dfm/george
.. image:: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
:target: https://github.com/dfm/george/blob/master/LICENSE
.. image:: http://img.shields.io/travis/dfm/george/master.svg?style=flat
:target: https://travis-ci.org/dfm/george
.. image:: https://ci.appveyor.com/api/projects/status/xy4ts3v3sk5lo5ll?svg=true&style=flat
:target: https://ci.appveyor.com/project/dfm/george
.. image:: https://coveralls.io/repos/github/dfm/george/badge.svg?branch=master&style=flat
:target: https://coveralls.io/github/dfm/george?branch=master
:target: https://github.com/dfm/george/blob/main/LICENSE
.. image:: https://github.com/dfm/george/workflows/Tests/badge.svg?style=flat
:target: https://github.com/dfm/george/actions?query=workflow%3ATests
.. image:: https://coveralls.io/repos/github/dfm/george/badge.svg?branch=main&style=flat
:target: https://coveralls.io/github/dfm/george?branch=main
.. image:: https://readthedocs.org/projects/george/badge/?version=latest
:target: http://george.readthedocs.io/en/latest/?badge=latest

Expand Down
Loading

0 comments on commit 1c866e7

Please sign in to comment.