diff --git a/.github/actions/conda_build_publish_package/Dockerfile b/.github/actions/conda_build_publish_package/Dockerfile deleted file mode 100644 index 1acbcfd8..00000000 --- a/.github/actions/conda_build_publish_package/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM continuumio/miniconda3:4.7.10 - -LABEL "repository"="https://github.com/m0nhawk/conda-package-publish-action" -LABEL "maintainer"="Andrew Prokhorenkov " - -RUN conda install -y anaconda-client conda-build - - -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/conda_build_publish_package/README.md b/.github/actions/conda_build_publish_package/README.md deleted file mode 100644 index da267334..00000000 --- a/.github/actions/conda_build_publish_package/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Build and Publish Anaconda Package - -A Github Action to publish your software package to an Anaconda repository. - -### Example workflow to publish to conda every time you make a new release - -```yaml -name: publish_conda - -on: - release: - types: [published] - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: publish-to-conda - uses: maxibor/conda-package-publish-action@v1.1 - with: - subDir: 'conda' - AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} - platforms: 'win-64 osx-64 linux-64' - python: '3.6 3.8' -``` - -### Example project structure - -``` -. -├── LICENSE -├── README.md -├── myproject -│   ├── __init__.py -│   └── myproject.py -├── conda -│   ├── build.sh -│   └── meta.yaml -├── .github -│   └── workflows -│   └── publish_conda.yml -├── .gitignore -``` -### Inputs - -The action takes the following - -- `AnacondaToken` - Anaconda access Token (see below) - -- `subDir` - (Optional) Sub-directory with conda recipe. Default: `.` - -- `platforms` - (Optional) Platforms to build and publish. Default: `win-64 osx-64 linux-64`. - -- `python` - (Optional) Python versions to build and publish. Default: `3.8`. - -### ANACONDA_TOKEN - -1. Get an Anaconda token (with read and write API access) at `anaconda.org/USERNAME/settings/access` -2. Add it to the Secrets of the Github repository as `ANACONDA_TOKEN` - -### Build Channels -By Default, this Github Action will search for conda build dependancies (on top of the standard channels) in `conda-forge` and `bioconda` diff --git a/.github/actions/conda_build_publish_package/action.yml b/.github/actions/conda_build_publish_package/action.yml deleted file mode 100644 index 877c90c5..00000000 --- a/.github/actions/conda_build_publish_package/action.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 'Publish Conda package to Anaconda.org' -description: 'Build and Publish conda package to Anaconda' -author: 'Andrew Prokhorenkov, modified by Maxime Borry, modified by Luis Fabregas' -branding: - icon: 'package' - color: 'purple' -inputs: - subDir: - description: 'Sub-directory with conda recipe' - default: '.' - AnacondaToken: - description: 'Anaconda access Token' - platforms: - description: 'Platforms to build and publish [osx linux win]' - default: 'win-64 osx-64 linux-64' - python: - description: 'Python version to build and publish' - default: '3.8' -runs: - using: 'docker' - image: 'Dockerfile' diff --git a/.github/actions/conda_build_publish_package/entrypoint.sh b/.github/actions/conda_build_publish_package/entrypoint.sh deleted file mode 100644 index 309b2045..00000000 --- a/.github/actions/conda_build_publish_package/entrypoint.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -set -ex -set -o pipefail - -go_to_build_dir() { - if [ ! -z $INPUT_SUBDIR ]; then - cd $INPUT_SUBDIR - fi -} - -check_if_meta_yaml_file_exists() { - if [ ! -f meta.yaml ]; then - echo "meta.yaml must exist in the directory that is being packaged and published." - exit 1 - fi -} - -build_package(){ - - IFS=' ' read -ra PYTHON <<< "$INPUT_PYTHON" - IFS=' ' read -ra PLATFORMS <<< "$INPUT_PLATFORMS" - - for python in "${PYTHON[@]}"; do - conda build -c conda-forge -c bioconda --output-folder . --python $python . - done - for platform in "${PLATFORMS[@]}"; do - for filename in /$platform/*.tar.bz2; do - conda convert /$platform/$filename -p $platform linux-64/*.tar.bz2 -o . - done - done -} - -upload_package(){ - - IFS=' ' read -ra PLATFORMS <<< "$INPUT_PLATFORMS" - - export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN - - for platform in "${PLATFORMS[@]}"; do - for filename in ./$platform/*.tar.bz2; do - anaconda upload $filename - done - done -} - -go_to_build_dir -check_if_meta_yaml_file_exists -build_package -upload_package diff --git a/.github/workflows/package_upload.yml b/.github/workflows/package_upload.yml index 6b74adec..69be3f25 100644 --- a/.github/workflows/package_upload.yml +++ b/.github/workflows/package_upload.yml @@ -1,4 +1,4 @@ -name: Build & Upload Python Package +name: Build & Upload DeerLab to PyPI on: release: @@ -26,28 +26,3 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - - conda-build-n-publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Get DeerLab version - run: echo "DEERLAB_VERSION=$(cat VERSION)" >> $GITHUB_ENV - - name: Update version in Conda metadata - uses: jacobtomlinson/gha-find-replace@master - with: - find: "VERSION" - replace: ${{env.DEERLAB_VERSION}} - include: "conda.recipe/meta.yaml" - - name: Build & Publish to Anaconda - uses: ./.github/actions/conda_build_publish_package - with: - subdir: 'conda.recipe' - anacondatoken: ${{ secrets.ANACONDA_TOKEN }} - platforms: 'osx-64 linux-32 linux-64 win-32 win-64' - python: '3.8 3.9 3.10' \ No newline at end of file diff --git a/README.md b/README.md index 4a2ff35d..93cd9058 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # DeerLab [![https://jeschkelab.github.io/DeerLab/](https://img.shields.io/pypi/v/deerlab)](https://pypi.org/project/DeerLab/) -[![https://img.shields.io/conda/v/JeschkeLab/deerlab](https://img.shields.io/conda/v/JeschkeLab/deerlab)](https://anaconda.org/jeschkelab/deerlab) [![Website](https://img.shields.io/website?down_message=offline&label=Documentation&up_message=online&url=https%3A%2F%2Fjeschkelab.github.io%2FDeerLab%2Findex.html)](https://jeschkelab.github.io/DeerLab/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/deerlab)](https://www.python.org/downloads/) ![PyPI - Downloads](https://img.shields.io/pypi/dm/deerlab?color=brightgreen) @@ -23,16 +22,12 @@ All additional dependencies are automatically downloaded and installed during th ## Setup -A pre-built distribution can be installed from the PyPI repository using `pip` or from the Anaconda repository using `conda`. +A pre-built distribution can be installed from the PyPI repository using `pip`. From a terminal (preferably with admin privileges) use the following command to install from PyPI: python -m pip install deerlab -or the following command to install from Anaconda: - - conda install deerlab -c JeschkeLab - More details on the installation and updating of DeerLab can be found [here](https://jeschkelab.github.io/DeerLab/installation.html). ## Citing DeerLab diff --git a/conda.recipe/build.bat b/conda.recipe/build.bat deleted file mode 100644 index 8930aeee..00000000 --- a/conda.recipe/build.bat +++ /dev/null @@ -1,2 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 \ No newline at end of file diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh deleted file mode 100644 index fec5047c..00000000 --- a/conda.recipe/build.sh +++ /dev/null @@ -1 +0,0 @@ -$PYTHON setup.py install # Python command to install the script. \ No newline at end of file diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml deleted file mode 100644 index b8f26b3e..00000000 --- a/conda.recipe/meta.yaml +++ /dev/null @@ -1,36 +0,0 @@ -package: - name: deerlab - version: VERSION - -source: - git_rev: VERSION - git_url: https://github.com/JeschkeLab/DeerLab.git - -requirements: - build: - - python - - setuptools - - run: - - python - - memoization - - matplotlib - - tqdm - - joblib - - numpy - - scipy - - cvxopt - - dill - - pytest - -about: - home: https://jeschkelab.github.io/DeerLab/index.html - license: MIT - summary: 'Comprehensive package for data analysis of dipolar EPR spectroscopy' - description: | - DeerLab is a comprehensive free scientific software package for Python focused on modelling, - penalized least-squares regression, and uncertainty quantification. It provides highly - specialized on the analysis of dipolar EPR (electron paramagnetic resonance) spectroscopy data. - Dipolar EPR spectroscopy techniques include DEER (double electron-electron resonance), - RIDME (relaxation-induced dipolar modulation enhancement), and others. - dev_url: https://jeschkelab.github.io/DeerLab diff --git a/conda.recipe/package_conda.bat b/conda.recipe/package_conda.bat deleted file mode 100644 index 4ba2393c..00000000 --- a/conda.recipe/package_conda.bat +++ /dev/null @@ -1,44 +0,0 @@ -@echo off - -set versions=3.6 3.7 3.8 3.9 3.10 -set platforms=osx-64 linux-32 linux-64 win-32 win-64 - -:: Get the path to the Anaconda executable -for %%i in (_conda.exe) do ( - set anaconda=%%~p$PATH:i -) -set conda_build=C:%anaconda%conda-bld - -echo Activating Anaconda environment... -Powershell.exe -executionpolicy remotesigned C:%anaconda%shell\condabin\conda-hook.ps1 ; conda activate 'C:%anaconda%' - -echo Activating Anaconda client... -call anaconda login - -echo Building conda package... -:: Delete existing tarball files -for %%f in (%conda_build%\win-64\*.tar.bz2) do ( - del %%f -) - -:: Build the conda packages for the supported Python versions -for %%v in (%versions%) do ( - call conda-build --python %%v . -) - -:: Convert packages to all supported platforms -for %%f in (%conda_build%\win-64\*.tar.bz2) do ( - echo "Converting %%f" - for %%p in (%platforms%) do ( - call conda-convert --platform %%p %%f -o %conda_build% - ) -) - -:: Upload packages to Anaconda -for %%p in (%platforms%) do ( - for %%f in (%conda_build%\%%p\*.tar.bz2) do ( - call anaconda upload --user JeschkeLab %%f - ) -) - -echo "Building conda package finished!" \ No newline at end of file diff --git a/docsrc/source/installation.rst b/docsrc/source/installation.rst index 05640923..8079f9be 100644 --- a/docsrc/source/installation.rst +++ b/docsrc/source/installation.rst @@ -46,17 +46,6 @@ DeerLab installs the following packages: * `tqdm `_ - A lightweight package for smart progress meters. * `dill `_ - An extension of Python's pickle module for serializing and de-serializing python objects. * `quadprog `_ - A quadratic programming solver -Installing from Anaconda -************************* - -DeerLab is also distributed via the Anaconda repository and the ``conda`` package manager. - -Open the Anaconda prompt (preferably with administrative privileges) or activate the Anaconda environment. Next install DeerLab via the ``conda`` package manager as follows:: - - conda install deerlab -c JeschkeLab - -The package manager will automatically take care of installing all DeerLab dependencies. - Importing DeerLab ------------------ @@ -75,10 +64,6 @@ To upgrade an existing DeerLab installation to the latest released version, use python -m pip install --upgrade deerlab -or if you are using Anaconda use the following command from the Anaconda prompt:: - - conda update deerlab - Other installations ------------------- @@ -88,11 +73,7 @@ Installing specific versions Any DeerLab version released after v0.10.0 can be installed via ``pip`` using the following command matching the x.y.z to the desired version:: python -m pip install deerlab==x.y.z - -or via ``conda`` if you use Anaconda as follows:: - - conda install deerlab=x.y.z - + DeerLab version prior to 0.10 are written in MATLAB and are still available from an `archived repository `_. Download and installation instruction for the MATLAB environment are provided in the released documentation. MATLAB releases have been deprecated and no further support is provided.