Skip to content

Commit

Permalink
New install (#129)
Browse files Browse the repository at this point in the history
* ENH: use pyproject.toml
* udpate license file
* DEV: 0.1 version
  • Loading branch information
mmagnuski authored Oct 29, 2023
1 parent 85f336d commit 77554cc
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 68 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018 Mikołaj Magnuski
Copyright 2018-2023, Mikołaj Magnuski

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
2 changes: 1 addition & 1 deletion borsar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.1.dev1'
__version__ = '0.1'

from borsar import (channels, cluster, csd, freq, project, stats, utils, viz)

Expand Down
5 changes: 2 additions & 3 deletions borsar/cluster/tests/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,9 +860,8 @@ def test_cluster_ignore_dims():

# make sure image data is correct
data = np.array(axs[0].images[0].get_array())

# FIXME: fix this later, for some reason it not always works
# assert (clst.stat[5:7].mean(axis=0) == data).all()
assert ((clst.stat[5:7].mean(axis=0) == data).all()
or (clst.stat[4:6].mean(axis=0) == data).all())

# (B) we request all channels reduced
axs = clst.plot(picks=0, dims=['freq', 'time'], chan='100%')
Expand Down
2 changes: 2 additions & 0 deletions borsar/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def _compute_threshold_via_permutations(data, paired, tail, stat_fun,
Note that the permutations are implemented via shuffling of the condition
labels, not randomization of independent condition orders.
'''
from .utils import progressbar

if paired:
# concatenate condition dimension if needed
if isinstance(data, (list, tuple)):
Expand Down
1 change: 1 addition & 0 deletions borsar/tests/test_freq.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_compute_rest_psd():
assert (freqs2 == freqs).all()


# @pytest.mark.skip(reason="borsar.freq.PSD will be deprecated soon")
def test_psd_class():
mne_version = version.parse(mne.__version__)
# get data
Expand Down
57 changes: 57 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[project]
name = "borsar"
version = "0.1"
description = "tools for electrophysiological analysis, especially cluster-based tests."
maintainers = [
{ name = "Mikołaj Magnuski", email = "[email protected]" },
]

license = { text = "BSD-3-Clause" }
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.8"
keywords = [
"neuroscience",
"neuroimaging",
"MEG",
"EEG",
"brain",
]

dependencies = [
"numpy >= 1.15.4",
"scipy >= 1.7.1",
"matplotlib >= 3.5.0",
"pandas",
"scikit-image",
"mne >= 1.0.0",
"tqdm",
"h5io",
"h5py"
]

classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
]

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project.urls]
Homepage = "https://github.com/mmagnuski/borsar"

[tool.setuptools.packages.find]
where = ["borsar"]

[tool.setuptools.package-data]
borsar = ["data/*.mat", "data/*.fif"]
63 changes: 0 additions & 63 deletions setup.py

This file was deleted.

0 comments on commit 77554cc

Please sign in to comment.