Skip to content

CI/CD pipeline change and various refactoring/dev #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Oct 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .circleci/config.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Documentation

on:
push:
paths:
- "docs/**"
- "README.md"
- "CONTRIBUTING.md"
pull_request:
paths:
- "docs/**"
- "README.md"
- "CONTRIBUTING.md"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Install dependencies
run: |
sudo apt-get install pandoc
python -m pip install --upgrade pip setuptools wheel
pip install -e ".[docs, jupyter]"
- name: Build documentation
run: sphinx-build -a -b html -W docs/source/ docs/build/
13 changes: 13 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- uses: psf/black@stable
31 changes: 31 additions & 0 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Test with pytest
run: |
pytest -v
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ cython_debug/
# Temporary data for demo datasets
docs/source/tutorials/notebooks/demo_data/
!.gitkeep
local_test_data/
local_test_data/
local_dev_notebooks/
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1 # Replace by any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# PyEEM

[![pypi version](https://img.shields.io/pypi/v/pyeem.svg 'pypi version')](https://pypi.org/project/pyeem/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyeem.svg)](https://pypi.org/project/pyeem/)
[![CircleCI](https://circleci.com/gh/drewmee/PyEEM.svg?style=shield&circle-token=ccdb16078dcb8ee4e4c9b923f547fc7cb2742aae)](https://app.circleci.com/pipelines/github/drewmee/PyEEM)
![Test](https://github.com/drewmee/PyEEM/workflows/Test/badge.svg)
[![Read the Docs](https://readthedocs.org/projects/pyeem/badge/?version=latest)](https://pyeem.readthedocs.io/)
[![PyPi version](https://img.shields.io/pypi/v/pyeem.svg 'pypi version')](https://pypi.org/project/pyeem/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyeem.svg)](https://pypi.org/project/pyeem/)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/drewmee/PyEEM/master?filepath=docs%2Fsource%2Ftutorials%2Fnotebooks)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/drewmee/PyEEM/blob/master/LICENSE)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/drewmee/PyEEM/blob/master/LICENSE)
[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
<!--- Badge for codecov -->

Python library for the preprocessing, analysis, and visualization of Excitation Emission Matrices (EEMs).
Expand Down
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.augmentation.create_mixture_spectra.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
create_mixture_spectra
======================

.. currentmodule:: pyeem.augmentation

.. autofunction:: create_mixture_spectra
6 changes: 0 additions & 6 deletions docs/source/api/pyeem.augmentation.create_mixtures.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/pyeem.augmentation.prototypical_spectrum.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/pyeem.augmentation.single_source.rst

This file was deleted.

37 changes: 37 additions & 0 deletions docs/source/api/pyeem.instruments.tecan.Spark.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Spark
=====

.. currentmodule:: pyeem.instruments.tecan

.. autoclass:: Spark
:show-inheritance:

.. rubric:: Attributes Summary

.. autosummary::

~Spark.manufacturer
~Spark.name
~Spark.supported_models

.. rubric:: Methods Summary

.. autosummary::

~Spark.load_absorbance
~Spark.load_eem
~Spark.load_spectral_corrections
~Spark.load_water_raman

.. rubric:: Attributes Documentation

.. autoattribute:: manufacturer
.. autoattribute:: name
.. autoattribute:: supported_models

.. rubric:: Methods Documentation

.. automethod:: load_absorbance
.. automethod:: load_eem
.. automethod:: load_spectral_corrections
.. automethod:: load_water_raman
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.absorbance_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
absorbance_plot
===============

.. currentmodule:: pyeem.plots

.. autofunction:: absorbance_plot
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.calibration_curves_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
calibration_curves_plot
=======================

.. currentmodule:: pyeem.plots

.. autofunction:: calibration_curves_plot
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.model_history_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
model_history_plot
==================

.. currentmodule:: pyeem.plots

.. autofunction:: model_history_plot
6 changes: 0 additions & 6 deletions docs/source/api/pyeem.plots.plot_calibration_curves.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/pyeem.plots.plot_preprocessing.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/pyeem.plots.plot_prototypical_spectra.rst

This file was deleted.

6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.prediction_parity_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
prediction_parity_plot
======================

.. currentmodule:: pyeem.plots

.. autofunction:: prediction_parity_plot
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.preprocessing_routine_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
preprocessing_routine_plot
==========================

.. currentmodule:: pyeem.plots

.. autofunction:: preprocessing_routine_plot
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.prototypical_spectra_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
prototypical_spectra_plot
=========================

.. currentmodule:: pyeem.plots

.. autofunction:: prototypical_spectra_plot
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.water_raman_peak_animation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
water_raman_peak_animation
==========================

.. currentmodule:: pyeem.plots

.. autofunction:: water_raman_peak_animation
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.water_raman_peak_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
water_raman_peak_plot
=====================

.. currentmodule:: pyeem.plots

.. autofunction:: water_raman_peak_plot
6 changes: 6 additions & 0 deletions docs/source/api/pyeem.plots.water_raman_timeseries.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
water_raman_timeseries
======================

.. currentmodule:: pyeem.plots

.. autofunction:: water_raman_timeseries
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fill_missing_values
===================

.. currentmodule:: pyeem.preprocessing.filters

.. autofunction:: fill_missing_values
9 changes: 8 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
Release Notes
*************

Version 0.1 (2020-08-DD)
Version 0.1.1 (2020-08-26)
--------------------------

**New Features**:

- Minor bug fixes.

Version 0.1.0 (2020-08-19)
--------------------------

**New Features**:
Expand Down
12 changes: 6 additions & 6 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
Contributing
************

PyEEM is an open-source project and contributions are always welcome from anyone. Feel free to open a pull request on `GitHub <https://github.com/drewmee/PyEEM>`_ or file a new feature request or bug report on our `issue tracker <https://github.com/drewmee/PyEEM/issues>`_.
PyEEM is an open-source project and contributions are always welcome from anyone. Feel free to open a pull request on `GitHub <https://github.com/drewmee/PyEEM>`__ or file a new feature request or bug report on our `issue tracker <https://github.com/drewmee/PyEEM/issues>`__.


==================
Contributing guide
==================

If you are new to working with forks, check out `GitHub's working with forks article <https://help.github.com/articles/working-with-forks/>`_.
If you are new to working with forks, check out `GitHub's working with forks article <https://help.github.com/articles/working-with-forks/>`__.


Step 1: Creating a new issue
============================

- If you don't already have a `GitHub <http://www.github.com>`_ account, create one
- Go to the `PyEEM GitHub page <https://github.com/drewmee/PyEEM>`_ and create a new issue by clicking on the "Issues" tab and then the "New issue" button
- If you don't already have a `GitHub <http://www.github.com>`__ account, create one
- Go to the `PyEEM GitHub page <https://github.com/drewmee/PyEEM>`__ and create a new issue by clicking on the "Issues" tab and then the "New issue" button

.. image:: _static/open-new-issue.png

Expand Down Expand Up @@ -139,7 +139,7 @@ The output should be
Step 6: Install local copy of PyEEM
======================================

Next, you'll want to make sure that Python imports your local version of PyEEM. This can be done by ``pip`` installing your local PyEEM repository in `editable mode <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>`_
Next, you'll want to make sure that Python imports your local version of PyEEM. This can be done by ``pip`` installing your local PyEEM repository in `editable mode <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>`__

.. code-block:: bash

Expand Down Expand Up @@ -219,7 +219,7 @@ Finally, you can go to your copy of PyEEM on GitHub and submit a pull
request by clicking the "Compare & pull request" button!

If you're new to writing pull requests, see GitHub's `How to write the perfect
pull request <https://blog.github.com/2015-01-21-how-to-write-the-perfect-pull-request/>`_
pull request <https://blog.github.com/2015-01-21-how-to-write-the-perfect-pull-request/>`__
article for a list of some best practices.

.. image:: _static/pull-request-button.png
1 change: 1 addition & 0 deletions docs/source/subpackages/instruments/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The *instruments* subpackage provides functions to load demo and custom datasets

agilent/index
horiba/index
tecan/index

.. automodapi:: pyeem.instruments
:no-inheritance-diagram:
6 changes: 6 additions & 0 deletions docs/source/subpackages/instruments/tecan/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Tecan (pyeem.instruments.tecan)
=================================
The *instruments.tecan* package provides...

.. automodapi:: pyeem.instruments.tecan
:no-inheritance-diagram:
Empty file.
Loading