Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
847d7d4
Add cffconvert.yml to validate CITATION.cff
abelsiqueira Feb 3, 2022
ce47211
Update CITATION.cff cffversion to 1.2.0
abelsiqueira Feb 3, 2022
d31ff32
Fixed missing keyword in model dict
hechth Jun 20, 2023
eb6c603
Update SpectrumDocument.py
niekdejonge Aug 6, 2024
471e69e
Update setup.py
niekdejonge Aug 6, 2024
8a5b578
Update setup.py
niekdejonge Aug 6, 2024
0ee563d
Update setup.py
niekdejonge Aug 6, 2024
d4ee4e9
Update CI_build.yml
niekdejonge Aug 6, 2024
97432d3
Update test_spectrum_document.py
niekdejonge Aug 6, 2024
c602277
Remove add losses from integration test
niekdejonge Aug 6, 2024
427801e
Update test_spectrum_document.py
niekdejonge Aug 6, 2024
b12cd3d
Update SpectrumDocument.py
niekdejonge Aug 6, 2024
1540f95
Update test_spectrum_document.py
niekdejonge Aug 6, 2024
13033b5
Update test_spectrum_document.py
niekdejonge Aug 6, 2024
318641c
Update test_spectrum_document.py
niekdejonge Aug 6, 2024
96686af
Update README.rst
niekdejonge Aug 6, 2024
3f49ee5
Moved SpecDoc with losses to own class
hechth Aug 13, 2024
958d3a4
refactored tests
hechth Aug 13, 2024
153e856
Added sparse array type handling and tests
hechth Aug 13, 2024
69ede00
fixed warning in spec2vec test
hechth Aug 13, 2024
d4c706f
Added option to specify loss range and fixed test
hechth Aug 13, 2024
d5e0b17
lint
hechth Aug 13, 2024
b7d6f82
Merge remote-tracking branch 'origin/Add-loss_mz_from-and-loss_mz_to-…
hechth Aug 13, 2024
d65ee28
updated workflows
hechth Aug 13, 2024
a9b34e2
fixed documentation
hechth Aug 13, 2024
728d491
updated workflow with docs
hechth Aug 13, 2024
e1b9c21
Merge remote-tracking branch 'cffbots/cffbots-cffconvert' into compat…
hechth Aug 13, 2024
bd53cf4
Merge remote-tracking branch 'origin/patch-1' into compatability-updates
hechth Aug 13, 2024
c40f2b8
reintroduced meta.yaml
hechth Aug 13, 2024
210cfcf
removed losses from specdoc contrusctor
hechth Aug 14, 2024
10c5569
refactored model serialization and building tets and added new tests …
hechth Aug 14, 2024
059b84a
added test to check losses
hechth Aug 14, 2024
e4e9400
added test
hechth Aug 14, 2024
c255ad9
updated version and started working on import validation issues
hechth Aug 14, 2024
5acb2eb
fixed coverage run path
hechth Aug 14, 2024
6a22ce2
skip failing test case
hechth Aug 14, 2024
0194a81
linting
hechth Aug 14, 2024
10e34ab
linting spec2vec
niekdejonge Aug 14, 2024
c4c5fa6
linting test_spectrum_document
niekdejonge Aug 14, 2024
8ff67ce
disable sonarcloud
niekdejonge Aug 14, 2024
7c0aa29
Change python version in workflows to 3.10
niekdejonge Aug 14, 2024
15d7540
added twine to workflow setup
niekdejonge Aug 14, 2024
c6ae6dd
Quotes around 3.10 to prevent bug
niekdejonge Aug 14, 2024
25e1ba0
Remove scale
niekdejonge Aug 14, 2024
d707b3a
Remove cd readthedocs in workflow
niekdejonge Aug 14, 2024
3d52b18
move show pip list
niekdejonge Aug 14, 2024
f90f215
fixed doc building
hechth Aug 14, 2024
e2acd4d
updated conda envrionment to reflect poetry and updated CI
hechth Sep 2, 2024
abb733d
updated coumentation build
hechth Sep 3, 2024
e06e83d
changed meta.yaml version to current version
hechth Sep 3, 2024
dcab69a
switched to local build
hechth Sep 3, 2024
fe55d13
updated python version
hechth Sep 5, 2024
4ec0a58
updated build deps
hechth Sep 5, 2024
f249916
updated CI
hechth Sep 12, 2024
eb54db5
revert py dep
hechth Sep 12, 2024
52c58af
add poetry to host
hechth Sep 12, 2024
1f0c04e
Update gensim, matchms and Python
julianpollmann Oct 20, 2025
202da9b
Bumped Version + updated Changelog
julianpollmann Oct 20, 2025
2dc5b31
Fix conda build dependencies + channel order
julianpollmann Oct 29, 2025
ef11b49
Enable SonarQube Scan
julianpollmann Oct 29, 2025
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
60 changes: 30 additions & 30 deletions .github/workflows/CI_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ on:
jobs:

first_check:
name: first code check / python-3.8 / ubuntu-latest
name: first code check / python-3.10 / ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"
- name: Python info
run: |
which python
python --version
- name: Build package and create dev environment
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
python -m pip install --upgrade pip poetry
poetry install
- name: Show pip list
run: |
pip list
- name: Test with coverage
run: |
pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
poetry run pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
- name: Correct coverage paths
run: sed -i "s+$PWD/++g" coverage.xml
- name: Check style against standards using prospector
shell: bash -l {0}
run: prospector -o grouped -o pylint:pylint-report.txt
run: poetry run prospector -o grouped -o pylint:pylint-report.txt
- name: Check whether import statements are used consistently
shell: bash -l {0}
run: isort --check-only --diff --conda-env spec2vec-dev .
- name: SonarCloud Scan
run: poetry run isort --check-only --diff --conda-env spec2vec-dev .
- name: SonarQube Scan
if: github.repository == 'iomega/spec2vec'
uses: sonarsource/sonarcloud-github-action@master
uses: SonarSource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -53,15 +53,15 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.10']
exclude:
# already tested in first_check job
- python-version: 3.8
- python-version: "3.10"
os: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Python info
Expand All @@ -70,31 +70,31 @@ jobs:
python --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip poetry
- name: Build package
run: |
pip install wheel twine
python setup.py sdist bdist_wheel
poetry build
- name: Test package
run: |
pip install twine
python -m twine check dist/*
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: Show pip list
run: |
pip list
- name: Install development dependencies
run: |
pip install -e .[dev]
- name: Test
run: |
pytest
poetry run pytest
- name: Show environment variables
shell: bash -l {0}
run: |
env | sort
- name: Build documentation
shell: bash -l {0}
run: |
make coverage doctest html
poetry run make coverage doctest html
working-directory: readthedocs/
env:
SPHINXOPTS: "-n" # enable nit-picky mode
Expand All @@ -108,22 +108,22 @@ jobs:
echo "The code is sufficiently documented with ${UNCOVERED_MEMBERS} uncovered members out of ${UNCOVERED_MEMBERS_ALLOWED} allowed.";

anaconda_build:
name: Anaconda build / python-3.7 / ubuntu-latest
name: Anaconda build / python-3.10 / ubuntu-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
needs: first_check
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Create spec2vec-build environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: spec2vec-build
auto-update-conda: true
environment-file: conda/environment-build.yml
python-version: 3.8
python-version: "3.10"
- name: Show conda config
shell: bash -l {0}
run: |
Expand All @@ -148,11 +148,11 @@ jobs:
[ "$RUNNING_OS" = "Windows" ] && export BUILDDIR=$RUNNER_TEMP\\spec2vec\\_build\\
conda config --set anaconda_upload no
conda build --no-include-recipe \
--channel bioconda --channel conda-forge \
--channel conda-forge --channel bioconda \
--croot ${BUILDDIR} \
./conda
- name: Upload package artifact from build
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: conda-package-artifact
path: ${{ runner.temp }}/spec2vec/_build
19 changes: 19 additions & 0 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: cffconvert

on:
push:
paths:
- CITATION.cff

jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v2

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
with:
args: "--validate"
22 changes: 6 additions & 16 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@ on:
types: [published]

jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pylint-report.txt
xunit-result.xml
.scannerwork/

docs/_build
docs/apidocs
readthedocs/_build
readthedocs/api

# ide
.idea
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.9.0] - 2025-10-20
### Changed
- Added loss_mz_from and loss_mz_to to SpectrumDocument [#95](https://github.com/iomega/spec2vec/pull/95)
- Updated required matchms version to >=0.27.0 [#95](https://github.com/iomega/spec2vec/pull/95)
- Updated required Python version to >=3.10 [#95](https://github.com/iomega/spec2vec/pull/95)
- Moved to poetry [#95](https://github.com/iomega/spec2vec/pull/95)
- Updated CI_build workflow to use poetry and actions [#95](https://github.com/iomega/spec2vec/pull/95)
- Added sparse array type handling and tests [#95](https://github.com/iomega/spec2vec/pull/95)

### Fixed

- Fixed missing keyword in model dict [#95](https://github.com/iomega/spec2vec/pull/95)
- Fixed documentation [#95](https://github.com/iomega/spec2vec/pull/95)

## [0.8.1] - 2024-08-06
### Changed
- Set max matchms to 0.26.4
Expand Down Expand Up @@ -147,7 +161,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fossa configuration
- Flowchart

[Unreleased]: https://github.com/iomega/spec2vec/compare/0.8.0...HEAD
[Unreleased]: https://github.com/iomega/spec2vec/compare/0.9.0...HEAD
[0.9.0]: https://github.com/iomega/spec2vec/compare/0.8.1...0.9.0
[0.8.1]: https://github.com/iomega/spec2vec/compare/0.8.0...0.8.1
[0.8.0]: https://github.com/iomega/spec2vec/compare/0.6.0...0.7.0
[0.7.0]: https://github.com/iomega/spec2vec/compare/0.6.0...0.7.0
[0.6.0]: https://github.com/iomega/spec2vec/compare/0.5.0...0.6.0
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ authors:
given-names: Maksym
orcid: "https://orcid.org/0000-0003-2056-8018"

cff-version: "1.1.0"
cff-version: 1.2.0
keywords:
- Word2Vec
- "similarity measures"
Expand Down
4 changes: 1 addition & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Thanks!

.. |ReadTheDocs Badge| image:: https://readthedocs.org/projects/spec2vec/badge/?version=latest
:alt: Documentation Status
:scale: 100%
:target: https://spec2vec.readthedocs.io/en/latest/?badge=latest

.. |Sonarcloud Quality Gate Badge| image:: https://sonarcloud.io/api/project_badges/measure?project=iomega_spec2vec&metric=alert_status
Expand Down Expand Up @@ -139,7 +138,6 @@ dataset.
s = msfilters.normalize_intensities(s)
s = msfilters.reduce_to_number_of_peaks(s, n_required=10, ratio_desired=0.5, n_max=500)
s = msfilters.select_by_mz(s, mz_from=0, mz_to=1000)
s = msfilters.add_losses(s, loss_mz_from=10.0, loss_mz_to=200.0)
s = msfilters.require_minimum_number_of_peaks(s, n_required=10)
return s

Expand All @@ -150,7 +148,7 @@ dataset.
spectrums = [s for s in spectrums if s is not None]

# Create spectrum documents
reference_documents = [SpectrumDocument(s, n_decimals=2) for s in spectrums]
reference_documents = [SpectrumDocument(s, n_decimals=2, loss_mz_from=10.0, loss_mz_to=200.0) for s in spectrums]

model_file = "references.model"
model = train_new_word2vec_model(reference_documents, iterations=[10, 20, 30], filename=model_file,
Expand Down
2 changes: 1 addition & 1 deletion conda/environment-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dependencies:
- anaconda-client
- conda-build
- conda-verify
- python >=3.7
- python >=3.10
22 changes: 15 additions & 7 deletions conda/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ channels:
- bioconda
- conda-forge
- defaults
- nlesc
dependencies:
- gensim >=4.2.0
- matchms >=0.6.2
- numba >=0.51
- python
- gensim >=4.4.0
- matchms >=0.27.0
- numba
- numpy
- pip
- python >=3.7
- scipy
- tqdm
- pip:
- -e ..[dev]
- bump2version
- isort>=5.1.0
- pylint<2.12.0
- prospector
- pytest
- pytest-cov
- sphinx>=4.0.0
- sphinx_rtd_theme
- sphinxcontrib-apidoc
- yapf

13 changes: 0 additions & 13 deletions conda/environment.yml

This file was deleted.

Loading