From 40dbaab96c4fd59fdf9569d767bc46c6b3f37e99 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 21:15:00 -0400 Subject: [PATCH 1/8] organizing stuff for release --- mesmerize_core/VERSION | 1 + mesmerize_core/__init__.py | 5 ++++ pyproject.toml | 3 +++ setup.py | 47 ++++++++++++++++++++++++++++++++++---- 4 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 mesmerize_core/VERSION create mode 100644 pyproject.toml diff --git a/mesmerize_core/VERSION b/mesmerize_core/VERSION new file mode 100644 index 0000000..acbf640 --- /dev/null +++ b/mesmerize_core/VERSION @@ -0,0 +1 @@ +0.1.0b1 diff --git a/mesmerize_core/__init__.py b/mesmerize_core/__init__.py index 07b72f4..02f9674 100644 --- a/mesmerize_core/__init__.py +++ b/mesmerize_core/__init__.py @@ -5,6 +5,11 @@ create_batch, ) from .caiman_extensions import * +from pathlib import Path + + +with open(Path(__file__).parent.joinpath("VERSION"), "r") as f: + __version__ = f.read().split("\n")[0] __all__ = [ "set_parent_raw_data_path", diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4d957ae --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] + diff --git a/setup.py b/setup.py index dfd018d..c60637e 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,51 @@ from setuptools import setup, find_packages +from pathlib import Path + + +install_requires = [ + "pandas>=1.5.0" + "pytest", + "requests", + "tqdm", + "numpy", + "matplotlib", + "click", + "psutil", + "pims", + "jupyterlab", +] + + +with open(Path(__file__).parent.joinpath("README.md")) as f: + readme = f.read() + +with open(Path(__file__).parent.joinpath("mesmerize_core", "VERSION"), "r") as f: + ver = f.read().split("\n")[0] + + +classifiers = \ + [ + "Programming Language :: Python :: 3", + "LICENSE :: OSI APPROVED :: APACHE SOFTWARE LICENSE", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows :: Windows 10", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Topic :: Scientific/Engineering :: Image Recognition", + "Topic :: Scientific/Engineering :: Information Analysis", + "Intended Audience :: Science/Research" + ] + setup( name="mesmerize-core", - version="0.0", + description="High level pandas-based API for batch analysis of Calcium Imaging data using CaImAn", + long_description=readme, + classifiers=classifiers, + version=ver, packages=find_packages(), url="https://github.com/nel-lab/mesmerize-core", - license="Apache", - author="Kushal Kolar, Arjun Putcha", + license="Apache-Software-License", + author="Kushal Kolar, Caitlin Lewis, Arjun Putcha", author_email="", - description="Mesmerize core backend", ) From 862d898da7af2948e83512dce7cf60230356cb88 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 21:22:15 -0400 Subject: [PATCH 2/8] update CI piplines, environment.yml --- .github/workflows/conda-windows.yml | 1 - .github/workflows/python-app.yml | 2 -- .github/workflows/python-package-conda.yml | 3 +-- environment.yml | 8 +++++++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/conda-windows.yml b/.github/workflows/conda-windows.yml index 87390fc..20664bc 100644 --- a/.github/workflows/conda-windows.yml +++ b/.github/workflows/conda-windows.yml @@ -35,6 +35,5 @@ jobs: conda activate mescore mamba install pytest caimanmanager.py install - pip install "pandas==1.5.0rc0" pip install . DOWNLOAD_GROUND_TRUTHS=1 pytest -s . diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 81017f5..ede1c6d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -41,8 +41,6 @@ jobs: - name: Install mesmerize-core run: | - pip install -r requirements.txt - pip install pytest pip install . - name: Test with pytest diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 555d7f0..63ac580 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -38,10 +38,9 @@ jobs: run: | mamba env update -n base --file environment.yml caimanmanager.py install - pip install "pandas==1.5.0rc0" pip install . - name: Test with pytest run: | - mamba install pytest DOWNLOAD_GROUND_TRUTHS=1 pytest -s . + diff --git a/environment.yml b/environment.yml index 65e486b..15a889e 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,13 @@ channels: - conda-forge dependencies: - caiman >= 1.9.10 - - pandas + - pandas >= 1.5.0 - requests - click + - jupyterlab + - tqdm + - pims + - psutil + - pytest - pydata-sphinx-theme + From 8cbae8bdaa791ab812abf27c382b55ea49642ce2 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 21:27:44 -0400 Subject: [PATCH 3/8] forgot to actually use --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index c60637e..77c8956 100644 --- a/setup.py +++ b/setup.py @@ -43,6 +43,7 @@ long_description=readme, classifiers=classifiers, version=ver, + install_requires=install_requires, packages=find_packages(), url="https://github.com/nel-lab/mesmerize-core", license="Apache-Software-License", From db29285f4a1a3e9b8a4254e67cc6c1ffd41f4cfb Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 21:33:10 -0400 Subject: [PATCH 4/8] missing a comma --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 77c8956..86e94da 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ install_requires = [ - "pandas>=1.5.0" + "pandas>=1.5.0", "pytest", "requests", "tqdm", From fa3ad0a513353dcd2bf811f5c5778ad56fc43a77 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 21:44:27 -0400 Subject: [PATCH 5/8] new file: MANIFEST.in --- MANIFEST.in | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..b91c9ef --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include mesmerize_core/VERSION + From ac28266f3f1c4d1a079d7e4aa9606464c58a16af Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 22:07:22 -0400 Subject: [PATCH 6/8] setup.py include_package_data=True --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 86e94da..563d9bd 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ version=ver, install_requires=install_requires, packages=find_packages(), + include_package_data=True, url="https://github.com/nel-lab/mesmerize-core", license="Apache-Software-License", author="Kushal Kolar, Caitlin Lewis, Arjun Putcha", From b1c797b8638a4974e7c93aabf1c04064916723fc Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 22:19:34 -0400 Subject: [PATCH 7/8] . --- .github/workflows/{python-package-conda.yml => linux-conda.yml} | 2 +- .github/workflows/{python-app.yml => linux-pip.yml} | 2 +- .github/workflows/{conda-windows.yml => windows-conda.yml} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{python-package-conda.yml => linux-conda.yml} (97%) rename .github/workflows/{python-app.yml => linux-pip.yml} (98%) rename .github/workflows/{conda-windows.yml => windows-conda.yml} (98%) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/linux-conda.yml similarity index 97% rename from .github/workflows/python-package-conda.yml rename to .github/workflows/linux-conda.yml index 63ac580..eac764c 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/linux-conda.yml @@ -9,7 +9,7 @@ on: branches: [ master ] jobs: - build-linux: + build-linux-conda: runs-on: ubuntu-latest strategy: max-parallel: 5 diff --git a/.github/workflows/python-app.yml b/.github/workflows/linux-pip.yml similarity index 98% rename from .github/workflows/python-app.yml rename to .github/workflows/linux-pip.yml index ede1c6d..0ff32cd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/linux-pip.yml @@ -15,7 +15,7 @@ permissions: contents: read jobs: - build: + build-linux-pip: runs-on: ubuntu-latest diff --git a/.github/workflows/conda-windows.yml b/.github/workflows/windows-conda.yml similarity index 98% rename from .github/workflows/conda-windows.yml rename to .github/workflows/windows-conda.yml index 20664bc..17925a3 100644 --- a/.github/workflows/conda-windows.yml +++ b/.github/workflows/windows-conda.yml @@ -9,7 +9,7 @@ on: branches: [ master ] jobs: - build: + build-windows: name: windows conda runs-on: "windows-latest" steps: From 687bec27c2aefc2561af298d4574928a416632a8 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 19 Sep 2022 22:31:04 -0400 Subject: [PATCH 8/8] added macos action --- .github/workflows/macos-conda.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/macos-conda.yml diff --git a/.github/workflows/macos-conda.yml b/.github/workflows/macos-conda.yml new file mode 100644 index 0000000..ae31845 --- /dev/null +++ b/.github/workflows/macos-conda.yml @@ -0,0 +1,46 @@ +name: MacOS Conda + +on: + pull_request: + branches: + - master + - dev + push: + branches: [ master ] + +jobs: + build-macos-conda: + runs-on: macos-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python '3.10' + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + + - name: Install mamba + run: | + conda install -c conda-forge mamba + conda clean -a + + # - name: install caiman + # run: | + # mamba install -c conda-forge caiman + + - name: install mesmerize-core + run: | + mamba env update -n base --file environment.yml + caimanmanager.py install + pip install . + + - name: Test with pytest + run: | + DOWNLOAD_GROUND_TRUTHS=1 pytest -s . +