diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb5b75b..d00bdd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,49 +28,3 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - deploy-conda: - runs-on: ubuntu-latest - # sets default shell to remove need for source to run the conda shell - defaults: - run: - shell: bash -l {0} - environment: deployment - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - # Much better than manual installation, original version Miniconda2-4.7.10-Linux-x86_64.sh is broken - - name: Install Miniconda - uses: conda-incubator/setup-miniconda@v2 - with: - auto-activate-base: true - activate-environment: "" - miniconda-version: "latest" - - - name: Install the Conda Dependencies - run: | - conda config --set always_yes yes --set auto_update_conda false - conda update conda - conda install -n base conda-libmamba-solver - conda install python=3.10 conda-build colorama pip ruamel ruamel.yaml rich jsonschema -c conda-forge - git fetch --prune --unshallow --tags - pip install -e . - - - name: Build the Anaconda Package - id: condabuild - run: | - conda install anaconda-client - conda config --set anaconda_upload no --set solver libmamba - echo yes | anaconda login --username ${{ secrets.ANACONDA_CLOUD_USERNAME }} --password ${{ secrets.ANACONDA_CLOUD_PASSWORD }} - VERSION_FROM_GIT_TAG=$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-) conda build . -c conda-forge - echo "gitversion=$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-)" >> $GITHUB_OUTPUT - - - name: Upload the Anaconda Package - id: condaload - run: | - anaconda upload -u stanfordcvxgrp /usr/share/miniconda3/conda-bld/noarch/spcqe-${{ steps.condabuild.outputs.gitversion }}-*.tar.bz2 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c651e5..0f1b73e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,42 +42,3 @@ jobs: run: | git fetch --prune --unshallow --tags sudo python -m build - - test-build-conda: - runs-on: ubuntu-latest - # sets default shell to remove need for source to run the conda shell - defaults: - run: - shell: bash -l {0} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Install Python - uses: actions/setup-python@v3 - with: - python-version: "3.10" - - - name: Install Miniconda - uses: conda-incubator/setup-miniconda@v2 - with: - auto-activate-base: true - activate-environment: "" - miniconda-version: "latest" - - - name: Install the Conda Dependencies - run: | - conda config --set always_yes yes --set auto_update_conda false - conda update conda - conda install -n base conda-libmamba-solver - conda install python=3.10 conda-build colorama pip ruamel ruamel.yaml rich jsonschema -c conda-forge - git fetch --prune --unshallow --tags - pip install -e . - - - name: Build the Anaconda Package - id: condabuild - run: | - conda install anaconda-client - conda config --set anaconda_upload no --set solver libmamba - VERSION_FROM_GIT_TAG=$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-) conda build . -c conda-forge -c stanfordcvxgrp - echo "gitversion=$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-)" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/README.md b/README.md index 24cc61b..28fc6a5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,21 @@ Smooth (multi-) periodic consistent quantile estimation. We attempt to follow th ## Installation -Clone the repository to your local machine and install with pip by navigating to the project directory and running: +The package is available on both PyPI and conda-forge. + +pip installation: + +``` +pip install spcqe +``` + +conda installation: + +``` +conda install conda-forge::spcqe +``` + +You may also clone the repository to your local machine and install with pip by navigating to the project directory and running: ``` pip install . diff --git a/pyproject.toml b/pyproject.toml index 3b94281..89f1d8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,8 +16,8 @@ requires-python = ">=3.9" license = {text = "BSD-2-Clause"} dependencies = [ "numpy", - "cvxpy==1.4.3", + "cvxpy", "scikit-learn", "tqdm", "sig-decomp" -] \ No newline at end of file +] diff --git a/src/spcqe/quantiles.py b/src/spcqe/quantiles.py index 41ae356..5c94358 100644 --- a/src/spcqe/quantiles.py +++ b/src/spcqe/quantiles.py @@ -166,7 +166,7 @@ def transform(self, X, y=None): # for ix in range(new_quantiles.shape[0]): # mats[ix] = self.x_expand(new_quantiles[ix], ix) # the LHS of each matrix equation is the same and does not change over time - yy = stats.norm.ppf(self.quantiles)[np.newaxis, :] + yy = stats.norm.ppf(self.quantiles) # solve vectorized matrix equations, T independent (q x q) set of equations parameters = np.linalg.solve(mats, yy) # apply the transform to the new data: this makes the PWL basis expansion for the new data (T x q)