Skip to content

Commit

Permalink
Merge pull request #3 from ConorMacBride/configure-azure-pipeline
Browse files Browse the repository at this point in the history
Configure azure pipeline
  • Loading branch information
ConorMacBride committed Nov 9, 2020
2 parents 2a17af3 + cbc8c3c commit 8b72a82
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 25 deletions.
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ jobs:
include:
- name: "Python 3.8.0 on Xenial Linux"
python: 3.8
env: MCALF_DEPLOY=1
- name: "Python 3.7.4 on macOS"
os: osx
osx_image: xcode11.2
Expand All @@ -20,14 +19,5 @@ install:
- pip3 install -e .
script: python3 -m pytest --cov=mcalf || python -m pytest --cov=mcalf
after_script: cd ~
deploy:
provider: pypi
username: "__token__"
password:
secure: "uxdVaVDzDGLC2GzxI1xz4iFqNF1aSM39r1fP3Y5bRx7TTArZka96hoaUD38jNJndebUW/caVv9gkqrEUMdL6YKE6/1orpNNcqBug+mUsglwI8fR7pDaZGqubdf583qNbpWfvzaNR8FX1IQCHc1PQNhp1dPFHGUYkQY6ILX3bltcX1998/4xkkH6SOVuLNn63itW5i5L6sd2kRu4ooBWgQBIKEHQ31RsawkVeZtMcnsh7vi2iJW53sGj5D6PaBjxZ8kphe8bA4On7bIGe44i5JgPAu9ksuH9GbV6xks/0d4l2OrVFa2IrGKs35S8idwFpipXiPmti2u5sDhIhMxHTO2l3/jPYpbgXO/id5lTbUV3xvqaeugoFqiqiB5WkwN+6KHv0gSox3UPoPpkdoWltWBNHTjoxHnt7IKtmawD23Mu9SR4k5QfSET9a3awyzvrFRoFk6S5payBVNlvEdM/2V3c/YTBNDTrWbllXtBRbs2/Ej86GqR+JF3IFPaHi495Yegvdc9cT570m7IHvY/AUxrbm8aBGIsMIOwPXPmdC3+Y1RDDfTTmh+HxJmkHGonox6MoKMwB5YF6CuPHyI9PeKqi7yzK6dZ1bFFi6/GItUAklecHyfDB+cP60HPOhyj18LwkzdYtUPOLc8pYf4jtsjXQfp6INl7IIrLZ9mI0IHV8="
skip_existing: true
on:
tags: true
condition: $MCALF_DEPLOY = 1
after_success:
- bash <(curl -s https://codecov.io/bash)
33 changes: 26 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
MCALF: Multi-Component Atmospheric Line Fitting
===============================================

|Travis Status| |Codecov| |PyPI Version| |Zenodo DOI| |GitHub License|
|Travis Status| |Codecov| |PyPI Version| |Zenodo DOI| |Docs Status| |GitHub License|

MCALF is an open-source Python package for accurately constraining velocity
information from spectral imaging observations using machine learning
Expand Down Expand Up @@ -51,13 +51,29 @@ of being integrated into other Python packages.
Installation
------------

For easier package management we recommend using `Miniconda`_ (or `Anaconda`_)
and creating a `new conda environment`_ to install MCALF inside.
To install MCALF using `Miniconda`_, run the following commands in your
system's command prompt, or if you are using Windows, in the
'Anaconda Prompt':

.. code:: bash
$ pip install mcalf
$ conda config --add channels conda-forge
$ conda config --set channel_priority strict
$ conda install mcalf
MCALF is updated to the latest version by running:

.. code:: bash
We recommend installing this program inside a `virtual environment`_.
Alternatively, you can install Anaconda_ (or Miniconda_), and then install
the package using the above command inside an `new conda environment`_.
$ conda update mcalf
Alternatively, you can install MCALF using ``pip``:

.. code:: bash
$ pip install mcalf
Testing
-------
Expand All @@ -70,13 +86,14 @@ your installation,

.. code:: bash
$ python -m pytest
$ python -m pytest --cov=mcalf
Make sure you are inside the virtual environment where it was installed.

Getting Started
---------------

Documentation is `available here <https://mcalf.macbride.me/>`_.
Some examples are included `here <examples/>`_.
If you are interested in using this package in your research and would
like advice on how to use this package, please contact `Conor MacBride`_.
Expand Down Expand Up @@ -128,14 +145,16 @@ MCALF is licensed under the terms of the BSD 2-Clause license.
.. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3924527.svg
:target: https://doi.org/10.5281/zenodo.3924527
:alt: DOI
.. |Docs Status| image:: https://readthedocs.org/projects/mcalf/badge/?version=latest&style=flat
:target: https://mcalf.macbride.me/
:alt: Documentation
.. |GitHub License| image:: https://img.shields.io/github/license/ConorMacBride/mcalf
:target: LICENSE.rst
:alt: License
.. |Contributor Covenant| image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
:target: CODE_OF_CONDUCT.rst
:alt: Code of Conduct

.. _virtual environment: https://docs.python.org/3/tutorial/venv.html
.. _Anaconda: https://www.anaconda.com/products/individual#Downloads
.. _Miniconda: https://docs.conda.io/en/latest/miniconda.html
.. _new conda environment: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
Expand Down
27 changes: 27 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: ConorMacBride
name: OpenAstronomy/azure-pipelines-templates
ref: master
jobs:
- template: publish.yml@OpenAstronomy
parameters:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}:
pypi_connection_name: 'pypi_endpoint'
pypi_endpoint_name: 'mcalf'
libraries:
- libfftw3-dev
targets:
- sdist
- wheels_cp3[6-8]-macosx_x86_64
- wheels_cp3[6-8]-manylinux*
- wheels_cp3[6-8]-win_amd64
trigger:
branches:
include:
- '*'
tags:
include:
- 'v*'
32 changes: 25 additions & 7 deletions docs/guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
User Documentation
==================

|Travis Status| |Codecov| |PyPI Version| |Zenodo DOI| |GitHub License|
|Travis Status| |Codecov| |PyPI Version| |Zenodo DOI| |Docs Status| |GitHub License|

MCALF is an open-source Python package for accurately constraining velocity
information from spectral imaging observations using machine learning
Expand Down Expand Up @@ -51,13 +51,29 @@ of being integrated into other Python packages.
Installation
------------

For easier package management we recommend using `Miniconda`_ (or `Anaconda`_)
and creating a `new conda environment`_ to install MCALF inside.
To install MCALF using `Miniconda`_, run the following commands in your
system's command prompt, or if you are using Windows, in the
'Anaconda Prompt':

.. code:: bash
$ pip install mcalf
$ conda config --add channels conda-forge
$ conda config --set channel_priority strict
$ conda install mcalf
MCALF is updated to the latest version by running:

.. code:: bash
We recommend installing this program inside a `virtual environment`_.
Alternatively, you can install Anaconda_ (or Miniconda_), and then install
the package using the above command inside an `new conda environment`_.
$ conda update mcalf
Alternatively, you can install MCALF using ``pip``:

.. code:: bash
$ pip install mcalf
Testing
-------
Expand All @@ -70,7 +86,7 @@ your installation,

.. code:: bash
$ python -m pytest
$ python -m pytest --cov=mcalf
Make sure you are inside the virtual environment where it was installed.

Expand Down Expand Up @@ -138,14 +154,16 @@ MCALF is licensed under the terms of the BSD 2-Clause license.
.. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3924527.svg
:target: https://doi.org/10.5281/zenodo.3924527
:alt: DOI
.. |Docs Status| image:: https://readthedocs.org/projects/mcalf/badge/?version=latest&style=flat
:target: https://mcalf.macbride.me/
:alt: Documentation
.. |GitHub License| image:: https://img.shields.io/github/license/ConorMacBride/mcalf
:target: ../license.rst
:alt: License
.. |Contributor Covenant| image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
:target: ../code_of_conduct.rst
:alt: Code of Conduct

.. _virtual environment: https://docs.python.org/3/tutorial/venv.html
.. _Anaconda: https://www.anaconda.com/products/individual#Downloads
.. _Miniconda: https://docs.conda.io/en/latest/miniconda.html
.. _new conda environment: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def read(file_name):
"pyyaml>=5.1", "pathos>=0.2.5", "scikit-learn>=0.21",
"matplotlib>=3.1", "astropy>=3.2", "pytest", "pytest-cov"],

ext_modules=[CTypes("mcalf.profiles.ext_voigtlib", [f"cextern/voigt{is_nt}.c"])],
ext_modules=[CTypes("mcalf.profiles.ext_voigtlib", ["cextern/voigt{}.c".format(is_nt)])],
cmdclass={'build_ext': build_ext},

author="Conor MacBride",
Expand Down

0 comments on commit 8b72a82

Please sign in to comment.