-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
334 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,73 +13,64 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.16.2 | ||
|
||
- name: Build wheels for Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_SKIP: "pp* *i686* *musllinux*" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
CIBW_BEFORE_BUILD: pip install --verbose --editable . | ||
|
||
- name: Build wheels for Windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_SKIP: "pp* *i686* *win32" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
CIBW_BEFORE_BUILD: pip install --verbose --editable . | ||
|
||
- name: Build wheels for macOS | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" | ||
CIBW_SKIP: "pp* *i686*" | ||
CIBW_BUILD: cp3*-* | ||
CIBW_SKIP: pp* *i686* *win32 *musllinux* | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
CIBW_BEFORE_BUILD: pip install --verbose --editable . | ||
CIBW_ARCHS_LINUX: auto64 | ||
CIBW_ARCHS_MACOS: x86_64 universal2 arm64 | ||
CIBW_ARCHS_WINDOWS: auto64 | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact-wheels-${{ matrix.os }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: '3.12' | ||
|
||
- run: pip install build | ||
|
||
- name: Build sdist | ||
run: python -m build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact-source | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: build_wheels | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
|
||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
pattern: artifact-* | ||
merge-multiple: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
pip install twine | ||
- name: Publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m build --sdist | ||
twine upload dist/* | ||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
# To test, uncomment the following: | ||
# password: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
# repository-url: https://test.pypi.org/legacy/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Contributions | ||
|
||
Contributions are welcome, encouraged, and appreciated! | ||
|
||
If you encounter any bugs while using the project, or believe there's a feature that would prove useful, feel free to [submit a new issue](https://github.com/zillow/quantile-forest/issues/new/choose). | ||
|
||
All contributions, suggestions, and feedback you submitted are accepted under the [project's license](https://github.com/zillow/quantile-forest/blob/main/LICENSE). | ||
|
||
## Submitting an Issue | ||
|
||
[Issues](https://github.com/zillow/quantile-forest/issues) should be used to report problems with the package or any of its dependencies, request a new feature, or to discuss potential changes before a PR is created. | ||
|
||
When reporting bugs, please provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), the version of the package, and the environment (e.g., Python version). | ||
|
||
If you find an existing Issue that addresses the problem you're having, please add your own reproducible example to the existing issue rather than creating a new one. | ||
|
||
## Submitting a Pull Request | ||
|
||
[PRs](https://github.com/zillow/quantile-forest/pulls) are always welcome and can be a quick way to get your fix or improvement merged. In general, PRs should: | ||
|
||
- Only fix/add the functionality in question. | ||
- Address a single concern in the fewest number of changes possible. | ||
- Include updated documentation. | ||
|
||
For changes that address core functionality or would require breaking changes (e.g., a major release), it's generally best to first open an Issue to discuss your proposed changes. | ||
|
||
In general, we follow the ["fork-and-pull" Git workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962) | ||
|
||
- [Fork](https://github.com/zillow/quantile-forest/fork) the repository to your own GitHub account | ||
- Clone the project to your machine | ||
- Create a branch locally with a succinct but descriptive name | ||
- Commit changes to the branch | ||
- Following any formatting and testing guidelines specific to this repo | ||
- Push changes to your fork | ||
- Open a PR in our repository | ||
|
||
## Setting Up Your Environment | ||
|
||
To contribute to the `quantile-forest` source code, start by forking and then cloning the repository (i.e. `git clone [email protected]:YourUsername/quantile-forest.git`) | ||
|
||
Once inside the repository, to build and install the package, run: | ||
|
||
```cmd | ||
python setup.py build_ext --inplace | ||
python setup.py install | ||
``` | ||
|
||
## Testing Your Changes | ||
|
||
To execute unit tests from the `quantile-forest` repository, run: | ||
|
||
```cmd | ||
pytest quantile_forest -v | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
If the build fails because SciPy is not installed, ensure OpenBLAS and LAPACK are available and accessible. | ||
|
||
On macOS, run: | ||
|
||
```cmd | ||
brew install openblas | ||
brew install lapack | ||
export SYSTEM_VERSION_COMPAT=1 | ||
``` | ||
|
||
Then try rebuilding. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:orphan: | ||
|
||
.. title:: References | ||
|
||
.. _references: | ||
|
||
========== | ||
References | ||
========== | ||
|
||
.. bibliography:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
approach. | ||
""" | ||
|
||
print(__doc__) | ||
|
||
import matplotlib.pyplot as plt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.