Skip to content

Commit

Permalink
Merge pull request #162 from nabobalis/master
Browse files Browse the repository at this point in the history
test and coverage reporting to azure
  • Loading branch information
Cadair authored Apr 18, 2019
2 parents d9d75e4 + 1f0bb8d commit d421dee
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ distribute-*.tar.gz

# Mac OSX
.DS_Store

# changelog
docs/whatsnew/latest_changelog.txt
2 changes: 0 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ New Features
- NDCubeSequence plot mixin can now animate a cube as a 1-D line if a single
axis number is supplied to plot_axis_indices kwarg.



API Changes
-----------
- Replaced API of what was previously ``utils.wcs.get_dependent_axes``,
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ jobs:
parameters:
name: Linux_36_offline
os: linux
tox: py36-offline
tox: py36-offline --

- template: azure-templates.yml
parameters:
name: pycodestyle
os: linux
tox: pycodestyle
tox: pycodestyle --

- template: azure-templates.yml
parameters:
name: macOS_37_offline
os: macos
tox: py37-offline
tox: py37-offline --

- template: azure-templates.yml
parameters:
name: Windows_36_offline
os: windows
tox: py36-offline
tox: py36-offline --

- template: azure-templates.yml
parameters:
name: Linux_36_Conda_offline
os: linux
tox: conda
tox: conda --
15 changes: 14 additions & 1 deletion azure-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,24 @@ jobs:
- script: pip install --upgrade tox-conda
displayName: install tox-conda

- script: tox -e ${{ parameters.tox }}
- script: tox -e ${{ parameters.tox }} --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html
displayName: run tox

- script: |
pip install --upgrade codecov
codecov --name ${{ format(parameters.name) }}
displayName: run codecov
condition: succeededOrFailed()
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for ${{ format(parameters.name) }}'

- ${{ if contains(parameters.tox, 'online') }}:
- task: PublishCodeCoverageResults@1
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
33 changes: 33 additions & 0 deletions changelog/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
=========
Changelog
=========

.. note::

This README was adapted from the pytest changelog readme under the terms of the MIT licence.

This directory contains "news fragments" which are short files that contain a small **ReST**-formatted text that will be added to the next ``CHANGELOG``.

The ``CHANGELOG`` will be read by users, so this description should be aimed at SunPy users instead of describing internal changes which are only relevant to the developers.

Make sure to use full sentences with correct case and punctuation, for example::

Add support for Helioprojective coordinates in `sunpy.coordinates.frames`.

Please try to use Sphinx intersphinx using backticks.

Each file should be named like ``<PULL REQUEST>.<TYPE>.rst``, where ``<PULL REQUEST>`` is a pull request number, and ``<TYPE>`` is one of:

* ``breaking``: A change which requires users to change code and is not backwards compatible. (Not to be used for removal of deprecated features.)
* ``feature``: New user facing features and any new behavior.
* ``bugfix``: Fixes a reported bug.
* ``doc``: Documentation addition or improvement, like rewording an entire session or adding missing docs.
* ``removal``: Feature deprecation and/or feature removal.
* ``trivial``: A change which has no user facing effect or is tiny change.

So for example: ``123.feature.rst``, ``456.bugfix.rst``.

If you are unsure what pull request type to use, don't hesitate to ask in your PR.

Note that the ``towncrier`` tool will automatically reflow your text, so it will work best if you stick to a single paragraph, but multiple sentences and links are OK and encouraged.
You can install ``towncrier`` and then run ``towncrier --draft`` if you want to get a preview of how your change will look in the final release notes.
12 changes: 12 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,15 @@

# -- Resolving issue number to links in changelog -----------------------------
github_issues_url = 'https://github.com/{0}/issues/'.format(setup_cfg['github_project'])

"""
Write the latest changelog into the documentation.
"""
target_file = os.path.abspath("./whatsnew/latest_changelog.txt")
try:
from sunpy.util.towncrier import generate_changelog_for_docs
generate_changelog_for_docs("../", target_file)
except:
# If we can't generate it, we need to make sure it exists or else sphinx
# will complain.
open(target_file, 'a').close()
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package designed for handling n-dimensional datacubes described
by a WCS (World Coordinate System) translation.

.. toctree::
:maxdepth: 3
:maxdepth: 2

introduction
installation
Expand All @@ -16,3 +16,4 @@ by a WCS (World Coordinate System) translation.
contributing
getting_help
api
whatsnew/index
8 changes: 8 additions & 0 deletions docs/whatsnew/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _changelog:

**************
Full Changelog
**************

.. include:: latest_changelog.txt
.. include:: ../../CHANGELOG.rst
8 changes: 8 additions & 0 deletions docs/whatsnew/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
***************
Release History
***************

.. toctree::
:maxdepth: 1

changelog

0 comments on commit d421dee

Please sign in to comment.