Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <[email protected]>
  • Loading branch information
adam2392 committed Sep 11, 2023
2 parents 14c62b2 + 8770f55 commit 7cfc220
Show file tree
Hide file tree
Showing 105 changed files with 5,035 additions and 1,832 deletions.
36 changes: 16 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# See: https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/
version: 2.1

# Aliases to reuse
_defaults: &defaults
docker:
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: cimg/python:3.9

# document commands used by downstream jobs
commands:
check-skip:
Expand Down Expand Up @@ -70,7 +63,10 @@ commands:
jobs:
# Build scikit-tree from source
build_scikit_tree:
<<: *defaults
docker:
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/doc/2.0/circleci-images/
- image: cimg/python:3.9
steps:
- checkout
- check-skip
Expand Down Expand Up @@ -110,7 +106,10 @@ jobs:
- .

build_docs:
<<: *defaults
docker:
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/doc/2.0/circleci-images/
- image: cimg/python:3.9
steps:
- attach_workspace:
at: ~/
Expand All @@ -131,15 +130,15 @@ jobs:
python ./spin docs
- store_artifacts:
path: docs/_build/html
path: doc/_build/html
destination: dev

- store_artifacts:
path: docs/_build/html_stable/
path: doc/_build/html_stable/
destination: stable

- persist_to_workspace:
root: docs/_build
root: doc/_build
paths:
- html
- html_stable
Expand All @@ -151,7 +150,7 @@ jobs:
- checkout

- attach_workspace:
at: docs/_build
at: doc/_build

- restore_cache:
keys:
Expand All @@ -174,10 +173,10 @@ jobs:
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
gh-pages --dotfiles --message "docs updates [skip ci] (${CIRCLE_BUILD_NUM})" --dist docs/_build/html --dest ./dev
gh-pages --dotfiles --message "docs updates [skip ci] (${CIRCLE_BUILD_NUM})" --dist doc/_build/html --dest ./dev
else
echo "Deploying stable docs for ${CIRCLE_BRANCH}.";
gh-pages --dotfiles --message "docs updates [skip ci] (${CIRCLE_BUILD_NUM})" --dist docs/_build/html --dest ./stable
gh-pages --dotfiles --message "docs updates [skip ci] (${CIRCLE_BUILD_NUM})" --dist doc/_build/html --dest ./stable
fi;
- save_cache:
Expand All @@ -186,16 +185,13 @@ jobs:
- ~/sktree

workflows:
default:
build-docs:
jobs:
- build_scikit_tree:
name: build_scikit_tree
- build_scikit_tree
- build_docs:
name: build_docs
requires:
- build_scikit_tree
- docs-deploy:
name: docs-deploy
requires:
- build_docs
filters:
Expand Down
3 changes: 2 additions & 1 deletion .codespellignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
raison
nd
parth
parth
ot
8 changes: 5 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ exclude =
.pytest_cache
.circleci
paper
docs/_build
docs/generated
docs/auto_examples
doc/_build
doc/generated
doc/auto_examples
validation
build
build-install
dist
sktree/_lib/
.asv
env

per-file-ignores =
# __init__.py files are allowed to have unused imports
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: Checkout scikit-tree
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/[email protected]
with:
Expand All @@ -60,7 +60,7 @@ jobs:
if: ${{ runner.os == 'Windows' && env.IS_32_BIT == 'false' }}

- name: Build wheels
uses: pypa/cibuildwheel@v2.14.0
uses: pypa/cibuildwheel@v2.15.0
# Build all wheels here, apart from macosx_arm64, linux_aarch64
# cibuildwheel is currently unable to pass configuration flags to
# CIBW_BUILD_FRONTEND https://github.com/pypa/cibuildwheel/issues/1227
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/[email protected]
Expand All @@ -109,7 +109,7 @@ jobs:
python spin setup-submodule
- name: Build wheels
uses: pypa/cibuildwheel@v2.14.0
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_BUILD: ${{ matrix.python[0] }}-macosx_arm64
CIBW_ARCHS_MACOS: arm64
Expand All @@ -126,7 +126,7 @@ jobs:

steps:
- name: Checkout scikit-tree
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/circle_artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: CircleCI artifacts redirector
on: [status]

permissions: read-all

# Restrict the permissions granted to the use of secrets.GITHUB_TOKEN in this
# github actions workflow:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
statuses: write

jobs:
circleci_artifacts_redirector_job:
runs-on: ubuntu-latest
if: "${{ github.event.context == 'ci/circleci: build_docs' }}"
permissions:
statuses: write
runs-on: ubuntu-20.04
if: "github.repository == 'neurodata/scikit-tree' && github.event.context == 'ci/circleci: build_docs'"
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
id: step1
uses: larsoner/circleci-artifacts-redirector-action@master
with:
api-token: ${{ secrets.CIRCLECI_TOKEN }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-token: ${{ secrets.CIRCLE_TOKEN }}
artifact-path: 0/dev/index.html
circleci-jobs: build_docs
job-title: Check the rendered docs here!

- name: Check the URL
if: github.event.status != 'pending'
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
matrix:
os: [ubuntu-22.04, macos-latest]
python-version: [3.9, "3.10", "3.11"]
poetry-version: [1.3.0]
poetry-version: [1.5.0]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -42,7 +42,7 @@ jobs:
FORCE_SUBMODULE: True
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/[email protected]
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Setup compiler cache
uses: actions/cache@v3
id: cache-ccache
id: cache-ccachev1
# Reference: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
# NOTE: The caching strategy is modeled in a way that it will always have a unique cache key for each workflow run
# (even if the same workflow is run multiple times). The restore keys are not unique and for a partial match, they will
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
# runs-on: windows-2019
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4
# with:
# submodules: recursive

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
echo "TAGGED_MILESTONE=${{ github.event.pull_request.milestone.title }}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Check that CHANGELOG has been updated
Expand All @@ -37,14 +37,14 @@ jobs:
then
exit 0
fi
all_changelogs=$(cat ./docs/whats_new/v*.rst)
all_changelogs=$(cat ./doc/whats_new/v*.rst)
if [[ "$all_changelogs" =~ :pr:\`$PR_NUMBER\` ]]
then
echo "Changelog has been updated."
# If the pull request is milestoned check the correspondent changelog
if exist -f ./docs/whats_new/v${TAGGED_MILESTONE:0:4}.rst
if exist -f ./doc/whats_new/v${TAGGED_MILESTONE:0:4}.rst
then
expected_changelog=$(cat ./docs/whats_new/v${TAGGED_MILESTONE:0:4}.rst)
expected_changelog=$(cat ./doc/whats_new/v${TAGGED_MILESTONE:0:4}.rst)
if [[ "$expected_changelog" =~ :pr:\`$PR_NUMBER\` ]]
then
echo "Changelog and milestone correspond."
Expand All @@ -58,8 +58,8 @@ jobs:
else
echo "A Changelog entry is missing."
echo ""
echo "Please add an entry to the changelog at 'docs/whats_new/v*.rst'"
echo "to docsument your change assuming that the PR will be merged"
echo "Please add an entry to the changelog at 'doc/whats_new/v*.rst'"
echo "to document your change assuming that the PR will be merged"
echo "in time for the next release of scikit-tree."
echo ""
echo "Look at other entries in that file for inspiration and please"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
poetry-version: [1.3.0]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python 3.10
uses: actions/[email protected]
with:
Expand Down
22 changes: 14 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,26 @@ sktree/_lib/sklearn/
*.png

# Sphinx documentation
docs/_build/
docs/generated/
docs/auto_examples/
docs/auto_tutorials/
docs/modules/generated/
docs/sphinxext/cachedir
doc/_build/
doc/generated/
doc/auto_examples/
doc/auto_tutorials/
doc/modules/generated/
doc/sphinxext/cachedir
pip-log.txt
.coverage
tags
docs/coverages
docs/samples
doc/coverages
doc/samples
cover
examples/*.jpg

env/
html/
results/
scikit-learn/
benchmarks/cache/

# Pycharm
.idea/

Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "sktree/_lib/sklearn"]
path = sktree/_lib/sklearn_fork
url = https://github.com/neurodata/scikit-learn
branch = v1.3
branch = submodulev3
Loading

0 comments on commit 7cfc220

Please sign in to comment.