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

Add Parquet I/O #122

Merged
merged 15 commits into from
Jun 26, 2024
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
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ max-complexity = 10
docstring-convention = google
per-file-ignores =
tests/*:S101,S301,S403
tests/unit_tests/test_parquet.py:B908,DAR101
noxfile.py:DAR101
spectrum_io/raw/thermo_raw.py:S603,S404
spectrum_io/raw/msraw.py:S405,S314
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: [3.8, 3.9]
python: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Install pip
run: |
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,47 @@ jobs:
matrix:
include:
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "pre-commit",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "safety",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "mypy",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "tests",
}
- {
python-version: 3.8,
python-version: 3.9,
os: windows-latest,
session: "tests",
}
- {
python-version: 3.8,
python-version: 3.9,
os: macos-latest,
session: "tests",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "typeguard",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "xdoctest",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "docs-build",
}
Expand Down Expand Up @@ -136,10 +136,10 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Install Poetry
run: |
Expand Down
8 changes: 8 additions & 0 deletions docs/spectrum_io.file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ spectrum\_io.file.hdf5 module
:undoc-members:
:show-inheritance:

spectrum\_io.file.parquet module
-----------------------------

.. automodule:: spectrum_io.file.parquet
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
sys.exit(1)

package = "spectrum_io"
python_versions = ["3.8", "3.9"]
python_versions = ["3.9", "3.10"]
nox.options.sessions = (
"pre-commit",
"safety",
Expand Down Expand Up @@ -125,9 +125,10 @@ def precommit(session: Session) -> None:
@session(python=python_versions)
def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
to_ignore = "--ignore=70612"
requirements = session.poetry.export_requirements()
session.install("safety")
session.run("safety", "check", "--full-report", f"--file={requirements}")
session.run("safety", "check", "--full-report", f"--file={requirements}", to_ignore)


@session(python=python_versions)
Expand Down
1,953 changes: 1,071 additions & 882 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ packages = [
{ include = "spectrum_io" },
]
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]


[tool.poetry.dependencies]
python = ">=3.8.0,<3.11.0"
python = ">=3.9.0,<3.11.0"
click = ">=8.0.0"
rich = ">=10.3.0"
PyYAML = ">=5.4.1"
numpy = "^1.18.1"
pandas = "^1.3.0"
h5py = "^3.1.0"
pyarrow = ">=16.0.0"
pymzml = "^2.5.0"
pyteomics = "^4.3.3"
lxml= '>=4.5.2,<6.0.0'
Expand All @@ -37,7 +37,7 @@ sortedcontainers = "^2.4.0"
pytest = ">=6.2.3"
coverage = {extras = ["toml"], version = ">=5.3"}
safety = ">=1.9.0"
typeguard = ">=2.12.0"
typeguard = ">=3.0.0"
xdoctest = {extras = ["colors"], version = ">=0.15.0"}
sphinx = ">=4.0.2"
sphinx-autobuild = ">=2021.3.14"
Expand Down
85 changes: 43 additions & 42 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
alphatims==1.0.8 ; python_version >= "3.8" and python_full_version < "3.11.0"
click==8.1.7 ; python_version >= "3.8" and python_full_version < "3.11.0"
colorama==0.4.6 ; python_version >= "3.8" and python_full_version < "3.11.0" and platform_system == "Windows"
contourpy==1.1.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
cycler==0.12.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
fonttools==4.51.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
h5py==3.11.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
importlib-metadata==7.1.0 ; python_version >= "3.8" and python_version < "3.9"
importlib-resources==6.4.0 ; python_version >= "3.8" and python_version < "3.10"
joblib==1.4.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
kiwisolver==1.4.5 ; python_version >= "3.8" and python_full_version < "3.11.0"
llvmlite==0.41.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
lxml==4.9.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
markdown-it-py==3.0.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
matplotlib==3.7.5 ; python_version >= "3.8" and python_full_version < "3.11.0"
mdurl==0.1.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
moepy==1.1.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
numba==0.58.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
numpy==1.24.4 ; python_version >= "3.8" and python_full_version < "3.11.0"
packaging==24.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
pandas==1.5.3 ; python_version >= "3.8" and python_full_version < "3.11.0"
pillow==10.3.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
psutil==5.9.8 ; python_version >= "3.8" and python_full_version < "3.11.0"
pygments==2.17.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
pymzml==2.5.9 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
pyparsing==3.1.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
pyteomics==4.7.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_full_version < "3.11.0"
pytz==2024.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
pyyaml==6.0.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
pyzstd==0.15.10 ; python_version >= "3.8" and python_full_version < "3.11.0"
regex==2024.4.16 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
rich==13.7.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
scikit-learn==1.3.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
scipy==1.10.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
six==1.16.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
sortedcontainers==2.4.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
spectrum-fundamentals==0.5.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
threadpoolctl==3.4.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
tqdm==4.66.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
typing-extensions==4.11.0 ; python_version >= "3.8" and python_version < "3.9"
zipp==3.18.1 ; python_version >= "3.8" and python_version < "3.10"
alphatims==1.0.8 ; python_version >= "3.9" and python_full_version < "3.11.0"
click==8.1.7 ; python_version >= "3.9" and python_full_version < "3.11.0"
colorama==0.4.6 ; python_version >= "3.9" and python_full_version < "3.11.0" and platform_system == "Windows"
contourpy==1.1.1 ; python_version >= "3.9" and python_full_version < "3.11.0"
cycler==0.12.1 ; python_version >= "3.9" and python_full_version < "3.11.0"
fonttools==4.51.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
h5py==3.11.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.9"
importlib-resources==6.4.0 ; python_version >= "3.9" and python_version < "3.10"
joblib==1.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
kiwisolver==1.4.5 ; python_version >= "3.9" and python_full_version < "3.11.0"
llvmlite==0.41.1 ; python_version >= "3.9" and python_full_version < "3.11.0"
lxml==4.9.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
markdown-it-py==3.0.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
matplotlib==3.7.5 ; python_version >= "3.9" and python_full_version < "3.11.0"
mdurl==0.1.2 ; python_version >= "3.9" and python_full_version < "3.11.0"
moepy==1.1.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
numba==0.58.1 ; python_version >= "3.9" and python_full_version < "3.11.0"
numpy==1.24.4 ; python_version >= "3.9" and python_full_version < "3.11.0"
packaging==24.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
pandas==1.5.3 ; python_version >= "3.9" and python_full_version < "3.11.0"
pillow==10.3.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
psutil==5.9.8 ; python_version >= "3.9" and python_full_version < "3.11.0"
pyarrow==16.1.0 ; python_full_version >= "3.9" and python_full_version < "3.11.0"
pygments==2.17.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
pymzml==2.5.9 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
pyparsing==3.1.2 ; python_version >= "3.9" and python_full_version < "3.11.0"
pyteomics==4.7.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_full_version < "3.11.0"
pytz==2024.1 ; python_version >= "3.9" and python_full_version < "3.11.0"
pyyaml==6.0.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
pyzstd==0.15.10 ; python_version >= "3.9" and python_full_version < "3.11.0"
regex==2024.4.16 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
rich==13.7.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
scikit-learn==1.3.2 ; python_version >= "3.9" and python_full_version < "3.11.0"
scipy==1.10.1 ; python_version >= "3.9" and python_full_version < "3.11.0"
six==1.16.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
sortedcontainers==2.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
spectrum-fundamentals==0.5.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"
threadpoolctl==3.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0"
tqdm==4.66.2 ; python_version >= "3.9" and python_full_version < "3.11.0"
typing-extensions==4.11.0 ; python_version >= "3.9" and python_version < "3.9"
zipp==3.18.1 ; python_version >= "3.9" and python_version < "3.10"
2 changes: 1 addition & 1 deletion spectrum_io/file/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

import logging

from . import csv, hdf5
from . import csv, hdf5, parquet

logger = logging.getLogger(__name__)
Loading
Loading