Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
2561593
Test on Python 3.12
jlumpe Dec 6, 2023
4b2eb31
Better error messages when opening invalid signatures file
jlumpe Jan 28, 2024
d65a558
Update changelog
jlumpe Jan 28, 2024
9febe5b
Update biopython requirement to 1.79
jlumpe May 8, 2024
e2ca902
Require Python 3.9
jlumpe Jan 28, 2024
5fc2c16
Remove singledispatchmethod py3.7 backport
jlumpe Jan 28, 2024
a23543d
Add additional info to signatures info command
jlumpe Jul 3, 2024
0a53a8f
Minor edits to CLI code
jlumpe Jul 3, 2024
7267f0a
Structure tests/ dir as package
jlumpe Jul 10, 2024
aa821a2
Transition to src/ project layout
jlumpe Jul 10, 2024
152d0c0
Specify build-backend in pyproject.toml
jlumpe Jul 10, 2024
cbff5d7
Update github actions
jlumpe Jul 10, 2024
f98b098
Update dependencies
jlumpe Jul 12, 2024
f07cfad
Move gambit.sigs.test module to test code dir
jlumpe Jul 12, 2024
d3517f3
Move gambit.test module to tests/
jlumpe Jul 12, 2024
6f3cdb8
Relocate test function
jlumpe Jul 14, 2024
36fac50
Type hints
jlumpe Jul 14, 2024
6a93bab
Remove is_importable func
jlumpe Jan 28, 2024
81b3c61
Update to zip_strict() func
jlumpe Jul 14, 2024
48ca065
Possibly make JSON dumping faster
jlumpe Jul 14, 2024
f2eed72
Simplifications to "archive" results format code
jlumpe Jul 14, 2024
f3e4353
Remove gambit.util.typing module
jlumpe Jul 14, 2024
6b4052e
Remove gambit.util.dev module
jlumpe Jul 14, 2024
f1ac019
Fixes to API docs
jlumpe Jul 14, 2024
973bac7
More unused code removal
jlumpe Jul 14, 2024
3a8a753
Type annotations
jlumpe Jul 19, 2024
fd7f312
Remove gambit.sigs.convert module
jlumpe Jul 25, 2024
ed2c502
Update readme
jlumpe Jul 25, 2024
933ddf8
Update CLI description
jlumpe Jul 4, 2024
19d98a0
TestDB type hints and minor updates
jlumpe Jul 12, 2024
181e489
Clean up test code for CLI query
jlumpe Aug 4, 2024
39936de
Clean up CLI dist command tests
jlumpe Aug 4, 2024
25f7877
Fix CLI error message
jlumpe Aug 4, 2024
6c511eb
Proper error message on pytest CLI test failure
jlumpe Aug 4, 2024
411f729
Type hints
jlumpe Aug 4, 2024
e92374c
Minor updates to signature calculation tests
jlumpe Aug 4, 2024
3fc70b2
Type hints in tests
jlumpe Aug 4, 2024
e5f2d70
Move gambit.results.test module to tests/
jlumpe Aug 4, 2024
427ee1c
Convert gambit.results from package to module
jlumpe Aug 4, 2024
f25d3ac
Move gambit.cli.test to tests/
jlumpe Aug 4, 2024
fed9466
Remove reference to unused pytest marker
jlumpe Aug 4, 2024
5d844da
Remove unused import
jlumpe Aug 4, 2024
084fbe0
Remove database migrations module
jlumpe Aug 4, 2024
2ec997b
Remove removed modules from API docs
jlumpe Aug 4, 2024
0f846ff
Fix deprecated setup.cfg option
jlumpe Aug 4, 2024
ebb993b
Set Cython compiler directives globally
jlumpe Aug 4, 2024
3a9258f
Update Cython integer <-> kmer funcs
jlumpe Aug 4, 2024
460bf51
Use Cython 3
jlumpe Aug 4, 2024
c9ad98d
Fix type annotation and docstring
jlumpe Aug 4, 2024
429170b
Fix minor error
jlumpe Aug 4, 2024
84c363f
Remove Cython dependency on Numpy
jlumpe Aug 4, 2024
954a30f
Cython metric code accept unsigned dtypes only
jlumpe Aug 4, 2024
2e1e429
Intersphinx mappings
jlumpe Aug 4, 2024
23092ed
Fix cross-references in docs(trings)
jlumpe Aug 4, 2024
2d5675f
Type hinting fix
jlumpe Aug 4, 2024
f1f718a
Type aliases
jlumpe Aug 4, 2024
24525ee
Docstring formatting
jlumpe Aug 4, 2024
264b290
Typing updates/fixes in util.progress
jlumpe Jul 4, 2024
38336e5
Rework open_compressed() function
jlumpe Aug 4, 2024
719e0a9
Move query result comparison functions to tests/ code
jlumpe Aug 4, 2024
45a93f3
Fix nondeterministic warning message in query results
jlumpe Aug 4, 2024
007866b
Fix up results export test funcs
jlumpe Aug 4, 2024
892c795
WIP CLI query archive output format
jlumpe Aug 4, 2024
e80a295
Update tests for Python API query funcs
jlumpe Aug 5, 2024
fb77403
Minor typing and import fixes
jlumpe Aug 5, 2024
abec7ba
Documentation on testdb_210818 files
jlumpe Aug 14, 2024
b097e8f
Updates to TestDB class
jlumpe Aug 14, 2024
90fe8db
Update testdb results generation script to use TestDB class
jlumpe Aug 14, 2024
96b5edd
More results testing funcs
jlumpe Aug 14, 2024
7193124
Fix docstring
jlumpe Aug 14, 2024
ecb9751
parse_seqs() function
jlumpe Oct 6, 2022
5050e0b
WIP remove QueryInput class
jlumpe Aug 4, 2024
399057b
Update results exporters
jlumpe Aug 5, 2024
881c87c
WIP update test results generation script
jlumpe Dec 1, 2024
bc6e177
Additional updates to results tests
jlumpe Dec 1, 2024
ae9895e
Remove SequenceFile class
jlumpe Dec 1, 2024
44872be
query command --pretty flag
jlumpe Dec 1, 2024
c106305
Fix docstring
jlumpe Dec 1, 2024
8c44e12
Test on Python 3.13
jlumpe Dec 1, 2024
aee8039
Use common func for creating SQLAlchemy Sessions
jlumpe Dec 1, 2024
c0a0d9f
SQLAlchemy 2.0 compatibility
jlumpe Dec 1, 2024
229d027
CI test SQLAlchemy 1.4 and 2.0
jlumpe Dec 1, 2024
bd8f076
Bump version to 1.1.0
jlumpe Dec 1, 2024
a1dc586
Fix CI setup
jlumpe Dec 1, 2024
c1a5e63
setup.cfg formatting
jlumpe Dec 2, 2024
f5ad92d
Update changelog
jlumpe Dec 2, 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
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,33 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', 3.11]
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
sqla-version: ["~=2.0"]
include:
# Also test with SQLALchemy >=1.4, <2
- python-version: 3.12
sqla-version: "~=1.4"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
pyproject.toml
setup.cfg

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools pytest
python -m pip install setuptools pytest sqlalchemy${{ matrix.sqla-version }}

- name: Build package
run: |
pip install .

- name: Test with pytest
env:
PY_IGNORE_IMPORTMISMATCH: 1
run: |
pytest
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Changelog


## 1.1.0

* Command line interface:
* Better error reporting when database file(s) not found
* Add more details to output of `gambit signatures info` command.
* Major overhaul of internal Python API and tests (see full release notes on GitHub)
* Many fixes to API documentation
* Increase minimum Python version to 3.9
* Make compatible with SQLAlchemy 2.0


## 1.0.1

* Significant documentation updates.
* Better error reporting:
* When database files cannot be found (in CLI and API).
* On attempting to open an invalid signatures file.
* Misc
* Better error reporting when database files cannot be found (in CLI and API).
* Minor documentation updates.
* Run tests on Python 3.11 and 3.12.


## 1.0.0
Expand Down
5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Alembic
include gambit/db/migrate/alembic.ini
recursive-include gambit/db/migrate *.py
graft src
graft docs
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ See below for basic installation and usage instructions, or check out the
a basic tutorial.


## About

Copyright © 2016-2024 Jared Lumpe

GAMBIT has been a personal project of mine for many years. Although there have been numerous
contributors to the publication, it is not a product of any lab or institution.

GAMBIT is provided as free software under the terms of the [AGPLv3 license](LICENSE).
It is not covered by any type of software patent.


### Publication

Lumpe J, Gumbleton L, Gorzalski A, Libuit K, Varghese V, et al. (2023) GAMBIT (Genomic Approximation
Expand Down
6 changes: 0 additions & 6 deletions docs/source/api/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,3 @@ gambit.db.sqla
.. autoclass:: ReadOnlySession
:exclude-members: __init__, __new__
:no-members:


gambit.db.migrate
-----------------

.. automodule:: gambit.db.migrate
8 changes: 2 additions & 6 deletions docs/source/api/kmers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ gambit.sigs.base
----------------------

.. automodule:: gambit.sigs.base
:exclude-members: AbstractSignatureArray

.. autoclass:: AbstractSignatureArray
:special-members: +__eq__
Expand All @@ -38,16 +39,11 @@ gambit.sigs.calc
.. automodule:: gambit.sigs.calc


gambit.sigs.convert
-------------------------

.. automodule:: gambit.sigs.convert


gambit.sigs.hdf5
----------------------

.. automodule:: gambit.sigs.hdf5
:exclude-members: HDF5Signatures

.. autoclass:: HDF5Signatures
:special-members: +__bool__
4 changes: 0 additions & 4 deletions docs/source/api/metric.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ gambit.metric
-------------

.. automodule:: gambit.metric

.. autofunction:: gambit.metric.jaccard

.. autofunction:: gambit.metric.jaccarddist
16 changes: 4 additions & 12 deletions docs/source/api/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ gambit.util.misc
.. automodule:: gambit.util.misc


gambit.util.typing
------------------

.. automodule:: gambit.util.typing


gambit.util.io
--------------

Expand All @@ -36,15 +30,13 @@ gambit.util.indexing
--------------------

.. automodule:: gambit.util.indexing
:exclude-members: AdvancedIndexingMixin

.. autoclass:: AdvancedIndexingMixin
:private-members: _check_index, _getitem_int, _getitem_slice, _getitem_int_array, _getitem_bool_array


gambit.util.progress
--------------------

.. automodule:: gambit.util.progress


gambit.util.dev
----------------

.. automodule:: gambit.util.dev
24 changes: 0 additions & 24 deletions docs/source/api/results.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,3 @@ gambit.results
-----------------

.. automodule:: gambit.results


gambit.results.base
----------------------

.. automodule:: gambit.results.base


gambit.results.json
----------------------

.. automodule:: gambit.results.json


gambit.results.csv
---------------------

.. automodule:: gambit.results.csv


gambit.results.archive
-------------------------

.. automodule:: gambit.results.archive
26 changes: 24 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------

project = 'GAMBIT'
copyright = '2021 - 2023, Jared Lumpe'
copyright = '2021 - 2024, Jared Lumpe'
author = 'Jared Lumpe'

# The full version, including alpha/beta/rc tags
release = '1.0.1'
release = '1.1.0'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -50,6 +50,17 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# When debugging broken cross references using nitpick mode (-n option), ignore these errors.
# This mostly relates to external libraries that have not been linked to using intersphinx.
nitpick_ignore_regex = [
('py:.*', r'click\..*'),
('py:.*', r'sqlalchemy\..*'),
('py:.*', r'h5py\..*'),
('py:.*', r'scipy\..*'),
# TypeVar
('py:.*', r'(.*\.)?T\d?'),
]


# -- Options for HTML output -------------------------------------------------

Expand Down Expand Up @@ -77,4 +88,15 @@
autodoc_member_order = 'groupwise'
autodoc_typehints = 'description'

autodoc_type_aliases = {
'FilePath': 'FilePath',
'DNASeq': 'DNASeq',
}

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'Bio': ('https://biopython.org/docs/latest/', None),
}

todo_include_todos = True
11 changes: 0 additions & 11 deletions gambit/_cython/kmers.pxd

This file was deleted.

42 changes: 0 additions & 42 deletions gambit/_cython/threads.pyx

This file was deleted.

Loading
Loading