Skip to content

Commit

Permalink
Move GI to GitHub actions (#138)
Browse files Browse the repository at this point in the history
* Move CI to GitHub Actions

* Get tests running

* Add change log.
  • Loading branch information
samaloney authored Feb 20, 2024
1 parent e7cfc20 commit 2257afb
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 112 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:


jobs:
core:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
submodules: false
coverage: codecov
envs: |
- linux: py39
test:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
submodules: false
coverage: codecov
envs: |
- windows: py39
- macos: py39
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

docs:
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
pytest: false
libraries: |
apt:
- graphviz
envs: |
- linux: build_docs
108 changes: 0 additions & 108 deletions azure-pipelines.yml

This file was deleted.

1 change: 1 addition & 0 deletions changelog/138.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move CI to GitHub actions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build-backend = 'setuptools.build_meta'
package = "sunkit_spex"
filename = "CHANGELOG.rst"
directory = "changelog/"
issue_format = "`#{issue} <https://github.com/sunpy/sunxspex/pull/{issue}>`__"
issue_format = "`#{issue} <https://github.com/sunpy/sunkit-spex/pull/{issue}>`__"
title_format = "{version} ({project_date})"

[[tool.towncrier.type]]
Expand Down
16 changes: 16 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ remote_data_strict = False
# Pin junit behaviour; we might want to update this to xunit2 at some point
junit_family=xunit1
filterwarnings =
error
# https://github.com/pytest-dev/pytest-cov/issues/557
# It was fixed and released but it does not seem to be fixed
ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning
# Raised by sunpy.coordinates.transformations and will be removed in sunpy 6.1
ignore:.*module is deprecated, as it was designed for internal use
# https://github.com/pandas-dev/pandas/issues/54466
# Should stop when pandas 3.0.0 is released
ignore:(?s).*Pyarrow will become a required dependency of pandas:DeprecationWarning
# TODO review and fix just getting test running
ignore:numpy.ndarray size changed.*:RuntimeWarning
ignore:Some input energy values outside valid range.*:UserWarning
ignore:invalid value encountered in.*:RuntimeWarning
ignore:divide by zero encountered in.*:RuntimeWarning
ignore:The truth value of an empty array is ambiguous..*:DeprecationWarning
ignore:LinAlgError when calculating the hessian. Errors may not be calculated.:UserWarning

[pycodestyle]
max_line_length = 100
Expand Down
6 changes: 3 additions & 3 deletions sunkit_spex/sunxspex_fitting/fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def complicated_model(T1, EM1, C, something_complicated, energies=None):
self.rParams["Status"], self.rParams["Value"], self.rParams["Bounds"], self.rParams["Error"] = list(_rps.param_status), list(_rps.param_value), list(_rps.param_bounds), list(_rps.param_error)

def add_photon_model(self, function, overwrite=False):
""" Add user photon model to fitting namespace.
r"""Add user photon model to fitting namespace.
Takes a user defined function intended to be used as a model or model component when
giving a
Expand Down Expand Up @@ -3277,7 +3277,7 @@ def _plot_1spec(self,
res.axhline(0, linestyle=':', color='k')
res.set_ylim(self.res_ylim)
# res.set_ylabel('(y$_{Data}$ - y$_{Model}$)/$\sigma_{Error}$')
res.set_ylabel('($D - M$)/$\sigma$')
res.set_ylabel(r'($D - M$)/$\sigma$')
res.set_xlim(self.plot_xlims)
res.set_xlabel("Energy [keV]")

Expand Down Expand Up @@ -3458,7 +3458,7 @@ def _plot_from_dict(self, subplot_axes_grid):
res.axhline(0, linestyle=':', color='k')
res.set_ylim(self.res_ylim)
# res.set_ylabel('(y$_{Data}$ - y$_{Model}$)/$\sigma_{Error}$')
res.set_ylabel('($D - M$)/$\sigma$')
res.set_ylabel(r'($D - M$)/$\sigma$')
res.set_xlim(self.plot_xlims)
res.set_xlabel("Energy [keV]")

Expand Down

0 comments on commit 2257afb

Please sign in to comment.