Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #10

Merged
merged 5 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 0 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
39 changes: 0 additions & 39 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
]
2 changes: 1 addition & 1 deletion src/spcqe/quantiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading