Skip to content
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

Clean code #15

Merged
merged 37 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c0361da
added ability to set a peak intensity threshold for fitting initial p…
j-brady Jan 26, 2024
2fb83f0
now using bokeh contours
j-brady Jan 29, 2024
2a6cb33
removed bug in which pdf.savefig() call breaks interactive 3D plot
j-brady Jan 29, 2024
e27cb4b
updates
j-brady Jan 29, 2024
577ee50
changed styles
j-brady Jan 30, 2024
94b70f4
black
j-brady Jan 30, 2024
2ea3632
added --reference-plane-index for selecting planes for initial linesh…
j-brady Jan 30, 2024
ac42030
added all peakipy fit options to bokeh interface
j-brady Feb 2, 2024
0c022f9
some refactoring, added some tests, updated bokeh app
j-brady Feb 11, 2024
202c68b
refactored check code and added plotly 3D surface and wireframe
j-brady Feb 12, 2024
ae0924f
addded data validation for peakipy check and plotly flag
j-brady Feb 13, 2024
8acd68e
very beta check panel
j-brady Feb 14, 2024
37587e0
fixed bug with paths and dummy assignments - needs further cleaning
j-brady Feb 14, 2024
93b45ce
interactive check panel peakipy-check
j-brady Feb 15, 2024
51bdb1b
refactoring and adding tests
j-brady Feb 17, 2024
f5debf4
refactoring and adding unit tests
j-brady Feb 19, 2024
13d53bc
refactoring and adding tests
j-brady Feb 19, 2024
ea82927
fixed bug for amplitude estimation after selecting reference planes. …
j-brady Feb 20, 2024
b07703e
major refactor
j-brady Feb 25, 2024
1c4bafc
more re-factoring added jackknife error
j-brady Feb 26, 2024
933810c
prototype edit and check panel
j-brady Feb 27, 2024
ed1e58e
prototype edit and check panel
j-brady Feb 27, 2024
66f1d11
upgrading fit and check panels
j-brady Feb 29, 2024
e024885
remove clusters larger than max_cluster_size
j-brady Mar 5, 2024
305c18d
trailing white space
j-brady Mar 18, 2024
a31da53
added residual plot and cleaned up a little
j-brady Mar 19, 2024
e5f0220
refactored config code and added tests
j-brady Mar 21, 2024
2a1afe2
fixed vclist bug and added test
j-brady Apr 1, 2024
bb64a99
added more tests
j-brady May 6, 2024
09655d3
fixed dataclass factory
j-brady May 6, 2024
3ca2acd
added tests and coverage
j-brady May 12, 2024
5c33de2
major refactoring and increased test coverage
j-brady May 26, 2024
1ceb4fb
added more tests
j-brady May 27, 2024
2a5e97f
more tests and refactoring
j-brady May 27, 2024
d901e91
added simulation and tests
j-brady May 28, 2024
76e19e8
refactored
j-brady May 30, 2024
68a0703
adding coverage badge
j-brady May 30, 2024
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
python -m pip install --upgrade pip
pip install .
pip install pytest
pip install coverage
- name: Run tests
run: |
pytest test/test_core.py
pytest test/test_cli.py
make coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ site/
# Tests
test/test_protein_L/tmp/
## pytest
.pytest_cache
.pytest_cache
.coverage
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.PHONY: coverage

coverage:
coverage run -m pytest test/test_fitting.py \
test/test_lineshapes.py \
test/test_io.py \
test/test_utils.py \
test/test_main.py \
test/test_cli.py \
test/test_simulation.py \
test/test_plotting.py

coverage-html:
coverage html
firefox htmlcov/index.html

test: coverage coverage-html
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Peakipy - NMR peak integration/deconvolution using python

![Test](https://github.com/j-brady/peakipy/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/j-brady/peakipy/graph/badge.svg?token=1F90QI5WMS)](https://codecov.io/gh/j-brady/peakipy)


[peakipy documentation](https://j-brady.github.io/peakipy)

Expand All @@ -26,7 +28,7 @@ should have been added to your path.

## Inputs

1. Peak list (NMRPipe, Analysis v2.4, Sparky)
1. Peak list (NMRPipe, Analysis v2.4, Sparky)
2. NMRPipe frequency domain dataset (2D or Pseudo 3D)

There are four main commands:
Expand Down
2 changes: 1 addition & 1 deletion ccpn_macros/selected_to_peakipy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Export selected peaks to TSV file """

import os
from pathlib import Path
import pandas as pd
Expand Down Expand Up @@ -84,7 +85,6 @@ def peakipy_check():


if __name__ == "__main__":

peaks = current.peaks
df = PeaksToDataFrame(peaks)
column_order = [
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Requirements

=== "Latest"

The latest version (1.1.2) of `peakipy` requires Python 3.10 or above (see `pyproject.toml` for details).
The latest version (1.1.3) of `peakipy` requires Python 3.10 or above (see `pyproject.toml` for details).

=== "0.2.0"

Expand Down
Loading
Loading