Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
15b5c36
Add files via upload
dhhagan Apr 13, 2023
af8cf74
Added support for variable density
dhhagan Jul 4, 2023
4827590
Removed py312 from test matrix
dhhagan Jul 4, 2023
36b7e0e
Merge pull request #63 from quant-aq/dhhagan-variable-params
dhhagan Jul 4, 2023
5320f46
Adds support for hygroscopic growth corrections
dhhagan Jul 4, 2023
d973b5b
Merge pull request #64 from quant-aq/dhhagan-var-kappa
dhhagan Jul 4, 2023
b87c92a
remove broken travis link
dhhagan Jul 4, 2023
b26f0c2
Updated docs to include google-ish formatted docstrings and improved …
dhhagan Jul 7, 2023
a957d75
Update smps/models.py
dhhagan Jul 13, 2023
f150711
Update README.md
dhhagan Jul 13, 2023
77a2f1e
Update README.md
dhhagan Jul 13, 2023
044a9b6
Resolved recommendations from DMCC via review
dhhagan Jul 13, 2023
a166819
Fixed tests
dhhagan Jul 13, 2023
1b3999d
More updated for DMCC
dhhagan Jul 13, 2023
e929d72
Merge pull request #66 from quant-aq/dhhagan-docs
dhhagan Jul 13, 2023
a73d1cb
Update docs.yml
dhhagan Jul 14, 2023
693aa34
Updated gh-actions
dhhagan Jul 14, 2023
4093044
Update gh-actions
dhhagan Jul 14, 2023
8db879f
Updated gh-actions
dhhagan Jul 14, 2023
32fb35a
Update gh-actions
dhhagan Jul 14, 2023
f71c33f
Fix ci
dhhagan Jul 14, 2023
b7d184a
New token
dhhagan Jul 14, 2023
886903a
Fix ci
dhhagan Jul 14, 2023
121f600
Fix ci
dhhagan Jul 14, 2023
4e002d0
Bumped version for pypi
dhhagan Jul 14, 2023
933132c
Fix ci
dhhagan Jul 14, 2023
970e642
Updated the tests ci
dhhagan Jul 15, 2023
34630ff
statsmodels req
dhhagan Jul 15, 2023
b7f95f6
Updated gh-actions for ci
dhhagan Jul 15, 2023
7b87d09
Updated gh-actions for ci
dhhagan Jul 15, 2023
2c6f950
Update README.md to include all contributors
dhhagan Jul 19, 2023
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
18 changes: 10 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: workflow_dispatch
jobs:
build-docs:
name: Build docs and push to gh-pages
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
Expand All @@ -15,29 +15,31 @@ jobs:
python-version: 3.8

- name: Install poetry
uses: snok/install-poetry@v1.1.4
uses: snok/install-poetry@v1.3.3
with:
version: 1.1.4
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install dependencies
run: |
poetry install
run: poetry install

- name: Install pandoc
run: sudo apt-get install pandoc

- name: build docs
run: |
source .venv/bin/activate
cd docs
make clean
make guides
make html
cd ..

- name: deploy to gh-pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: david.hagan@quant-aq.com
build_dir: docs/_build/html
build_dir: docs/build/html
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
Expand All @@ -17,10 +17,12 @@ jobs:
python-version: 3.8

- name: Install poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1.3.3
with:
version: 1.1.4
create_virtualenvs: true
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install dependencies
run: poetry install
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/test-and-report.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: run tests and report results
on: [pull_request, workflow_dispatch]
name: ci.tests
on:
push:
pull_request:
branches:
- master
- staging
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10"]
python: ["3.8", "3.9", "3.10", "3.11"]
name: Python ${{ matrix.python }}
steps:
- name: Checkout branch
Expand All @@ -17,9 +22,12 @@ jobs:
python-version: ${{ matrix.python }}

- name: Install poetry
uses: snok/install-poetry@v1
uses: snok/install-poetry@v1.3.3
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install dependencies
run: poetry install --no-interaction
Expand Down
81 changes: 41 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
[![PyPI version](https://badge.fury.io/py/py-smps.svg)](https://badge.fury.io/py/py-smps)
[![Build Status](https://travis-ci.org/dhhagan/py-smps.svg?branch=master)](https://travis-ci.org/dhhagan/py-smps)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Coverage Status](https://coveralls.io/repos/github/dhhagan/py-smps/badge.svg?branch=master)](https://coveralls.io/github/dhhagan/py-smps?branch=master)
[![ci.tests](https://github.com/quant-aq/py-smps/actions/workflows/test-and-report.yml/badge.svg)](https://github.com/quant-aq/py-smps/actions/workflows/test-and-report.yml)


# py-smps
Python library for the analysis and visualization of data from a Scanning Mobility Particle Sizer (SMPS) and other particle sizing instruments (SEMS, OPC's).

## Dependencies
py-smps is a Python data analysis library built for analyzing size-resolved aerosol data from a variety of aerosol sizing instruments (e.g., Scanning Mobility Particle Sizer, Optical Particle Counters).

The full list of dependencies can be found in the `pyproject.toml` file and are summarized below:

```py
python = ">=3.8, <3.12"
statsmodels = "^0.13"
seaborn = "^0.10"
joblib = "^1.0"
requests = "^2.24"
scipy = "^1.9"
numpy = "^1.23.2"
pandas = "^1.4"
```

As of `v1.2.0a0`, the library should be compatible with Apple silicone (tested on both M1 and M2).

## Python Versions

Python3.8 through Python3.11 are currently supported.
**NOTE: As of `v1.2.0`, the library is compatible with Apple silicone (M1, M2 chips).**

## Installation
# Installation

To install from PyPi:
Official releases of `py-smps` can be installed from [PyPI](https://pypi.org/project/py-smps/):

$ pip install py-smps [--upgrade]

Expand All @@ -41,39 +25,56 @@ To install the edge release directly from GitHub:

pip install git+https://github.com/quant-aq/py-smps.git

## Unittests
# Dependencies

Unittests can be run by issuing the following command from within the main repo:
## Supported Python versions
- Python 3.8+

```sh
$ poetry run pytest -s tests/ --ignore=tests/datafiles
```
## Mandatory Dependencies

The full list of dependencies can be found in the [`pyproject.toml`](pyproject.toml) file.

## Documentation
# Development

Documentation is available [here](https://quant-aq.github.io/py-smps/). Docs are built using Sphinx and can be built locally by doing the following:
## Testing

Tests can be run by issuing the following command from within the main repo:

```sh
$ cd docs/
$ make clean
$ make guides
$ make html
$ cd ..
$ poetry run pytest -s tests/ --ignore=tests/datafiles
```

Then, you can navigate to your local directory at `docs/_build/html/` and open up the `index.html` file in your preferred browser window.


## Contributing to Development

We welcome all contributions from the community in the form of issues reporting, feature requests, bug fixes, etc.

If there is a feature you would like to see or a bug you would like to report, please open an issue. We will try to get to things as promptly as possible. Otherwise, feel free to send PR's!

### Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

## Colorbar Information

* [matplotlib colorbars](http://matplotlib.org/examples/color/colormaps_reference.html)
* [seaborn color palette](http://seaborn.pydata.org/tutorial/color_palettes.html)
# Documentation

Documentation is available [here](https://quant-aq.github.io/py-smps/). To build locally, you must first install [pandoc](https://pandoc.org/). Docs are built using Sphinx and can be built locally by doing the following:

```sh
# Activate the virtualenv
$ poetry shell

# Build the docs
$ cd docs/
$ make clean
$ make html
$ cd ..
```

Then, you can navigate to your local directory at `docs/build/html/` and open up the `index.html` file in your preferred browser window.
8 changes: 2 additions & 6 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
Expand All @@ -18,7 +18,3 @@ help:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: guides
guides:
make -C guides/
45 changes: 0 additions & 45 deletions docs/api/generated/smps.GenericParticleSizer.rst

This file was deleted.

23 changes: 0 additions & 23 deletions docs/api/generated/smps.fit.LogNormal.rst

This file was deleted.

24 changes: 0 additions & 24 deletions docs/api/generated/smps.fit.LogNormalFitResults.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs/api/generated/smps.models.AlphasenseOPCN2.rst

This file was deleted.

Loading