Skip to content

Commit

Permalink
Merge branch 'main' into ignore_leaf
Browse files Browse the repository at this point in the history
  • Loading branch information
PSSF23 committed Jul 9, 2024
2 parents 3e2cda8 + 556317b commit 0d41226
Show file tree
Hide file tree
Showing 184 changed files with 736 additions and 750 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ commands:
- run:
name: Check-skip
command: |
if [ ! -d "sktree" ]; then
if [ ! -d "treeple" ]; then
echo "Build was not run due to skip, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
circleci-agent step halt;
fi
Expand Down Expand Up @@ -55,13 +55,13 @@ commands:
echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
if [[ $(cat merge.txt) != "" ]]; then
echo "Merging $(cat merge.txt)";
git remote add upstream https://github.com/neurodata/scikit-tree.git;
git remote add upstream https://github.com/neurodata/treeple.git;
git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
git fetch upstream main;
fi
jobs:
# Build scikit-tree from source
# Build treeple from source
build_scikit_tree:
docker:
# CircleCI maintains a library of pre-built images
Expand All @@ -86,7 +86,7 @@ jobs:
pip install .[build,doc]
- run:
name: build scikit-tree
name: build treeple
command: |
spin build -j2
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
name: Install and configure dependencies
command: |
npm install --global [email protected]
git config --global user.email "circle@scikit-tree.com"
git config --global user.email "circle@treeple.com"
git config --global user.name "Circle Ci"
- add_ssh_keys:
Expand All @@ -184,7 +184,7 @@ jobs:
- save_cache:
key: website-cache
paths:
- ~/sktree
- ~/treeple

workflows:
build-docs:
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exclude =
build
build-install
dist
sktree/_lib/
treeple/_lib/
.asv
env

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are.
See https://github.com/neurodata/scikit-tree/blob/main/CONTRIBUTING.md for more
See https://github.com/neurodata/treeple/blob/main/CONTRIBUTING.md for more
information on contributing.
Thanks for contributing!
Expand Down
24 changes: 12 additions & 12 deletions .github/label-globs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Cython:
- sktree/**/*.pyx.*
- sktree/**/*.pxd.*
- sktree/**/*.pxi.*
- treeple/**/*.pyx.*
- treeple/**/*.pxd.*
- treeple/**/*.pxi.*

C/C++:
- sktree/**/*.c
- sktree/**/*.c.in
- sktree/**/*.c.old
- sktree/**/*.h
- sktree/**/*.h.in
- sktree/**/*.cpp
- sktree/**/*.cc
- sktree/**/*.cxx
- sktree/**/*.hpp
- treeple/**/*.c
- treeple/**/*.c.in
- treeple/**/*.c.old
- treeple/**/*.h
- treeple/**/*.h.in
- treeple/**/*.cpp
- treeple/**/*.cc
- treeple/**/*.cxx
- treeple/**/*.hpp
8 changes: 4 additions & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
IS_32_BIT: ${{ matrix.os[2] == 'x86' }}

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

- uses: actions/setup-python@v5
Expand All @@ -65,7 +65,7 @@ jobs:
if: ${{ runner.os == 'Windows' && env.IS_32_BIT == 'false' }}

- name: Build wheels
uses: pypa/[email protected].1
uses: pypa/[email protected].2
# 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 @@ -120,7 +120,7 @@ jobs:
pip install .[build]
- name: Build wheels
uses: pypa/[email protected].1
uses: pypa/[email protected].2
env:
CIBW_BUILD: ${{ matrix.python[0] }}-macosx_arm64
CIBW_ARCHS_MACOS: arm64
Expand All @@ -136,7 +136,7 @@ jobs:
runs-on: ubuntu-latest

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

- name: Setup Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/circle_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions: read-all
jobs:
circleci_artifacts_redirector_job:
runs-on: ubuntu-20.04
if: "github.repository == 'neurodata/scikit-tree' && github.event.context == 'ci/circleci: build_docs'"
if: "github.repository == 'neurodata/treeple' && github.event.context == 'ci/circleci: build_docs'"
permissions:
statuses: write
name: Run CircleCI artifacts redirector
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
restore-keys: |
${{ github.workflow }}-${{ matrix.python-version }}-ccache-linux-
- name: Setup build and install scikit-tree
- name: Setup build and install treeple
run: |
./spin build -j 2 --forcesubmodule
./spin install
Expand All @@ -125,7 +125,7 @@ jobs:
- name: Run unit tests and coverage
run: |
pytest ./sktree
pytest ./treeple
- name: debug
run: |
Expand All @@ -137,7 +137,7 @@ jobs:
- name: Save build
uses: actions/upload-artifact@v4
with:
name: sktree-build
name: treeple-build
path: $PWD/build

build_and_test_slow:
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
restore-keys: |
${{ github.workflow }}-${{ matrix.python-version }}-ccache-linux-
- name: Setup build and install scikit-tree
- name: Setup build and install treeple
run: |
./spin build -j4 --forcesubmodule
./spin install
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
- name: Save build
uses: actions/upload-artifact@v4
with:
name: sktree-build
name: treeple-build
path: $PWD/build

build-windows:
Expand Down Expand Up @@ -290,9 +290,9 @@ jobs:
# Necessary because GitHub Actions checks out the repo to D:\ while OpenBLAS
# got installed to C:\ higher up. The copying with `--win-cp-openblas` fails
# when things are split over drives.
# cp C:\opt\64\bin\*.dll $pwd\build-install\Lib\site-packages\scikit-tree\.libs\
# python tools\openblas_support.py --write-init $PWD\build-install\Lib\site-packages\scikit-tree\
# cp C:\opt\64\bin\*.dll $pwd\build-install\Lib\site-packages\treeple\.libs\
# python tools\openblas_support.py --write-init $PWD\build-install\Lib\site-packages\treeple\
- name: test
run: |
pytest ./sktree
pytest ./treeple
4 changes: 2 additions & 2 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- main
paths:
- "sktree/**"
- "treeple/**"

jobs:
changelog:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
echo ""
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 "in time for the next release of treeple."
echo ""
echo "Look at other entries in that file for inspiration and please"
echo "reference this pull request using the ':pr:' directive and"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: thomasjpfan/[email protected]
continue-on-error: true
if: github.repository == 'neurodata/scikit-tree'
if: github.repository == 'neurodata/treeple'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/label-globs.yml"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ coverage
.coverage.*

commit.txt
sktree/_lib/sklearn/
treeple/_lib/sklearn/

*.png
_data
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "sktree/_lib/sklearn"]
path = sktree/_lib/sklearn_fork
[submodule "treeple/_lib/sklearn"]
path = treeple/_lib/sklearn_fork
url = https://github.com/neurodata/scikit-learn
branch = submodulev3
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ repos:
- id: cython-lint
- id: double-quote-cython-strings

# Ruff sktree
# Ruff treeple
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.5.1
hooks:
- id: ruff
name: ruff sktree
name: ruff treeple
args: ["--fix"]
files: ^sktree/
files: ^treeple/

# Ruff tutorials and examples
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.5.1
hooks:
- id: ruff
name: ruff tutorials and examples
Expand All @@ -47,7 +47,7 @@ repos:
- id: codespell
additional_dependencies:
- tomli
files: ^sktree/|^doc/|^examples/|^tutorials/
files: ^treeple/|^doc/|^examples/|^tutorials/
types_or: [python, bib, rst, inc]

# yamllint
Expand All @@ -67,7 +67,7 @@ repos:

# mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.10.1
hooks:
- id: mypy
# Avoid the conflict between mne/__init__.py and mne/__init__.pyi by ignoring the former
Expand All @@ -76,7 +76,7 @@ repos:

# rstcheck
- repo: https://github.com/rstcheck/rstcheck.git
rev: v6.2.0
rev: v6.2.4
hooks:
- id: rstcheck
additional_dependencies:
Expand Down
32 changes: 16 additions & 16 deletions .spin/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def coverage(ctx, slowtest=True):
pytest_args = (
"-o",
"python_functions=test_*",
"sktree",
"--cov=sktree",
"treeple",
"--cov=treeple",
"--cov-report=xml",
"--cov-config=pyproject.toml",
"-k .",
Expand All @@ -30,8 +30,8 @@ def coverage(ctx, slowtest=True):
pytest_args = (
"-o",
"python_functions=test_*",
"sktree",
"--cov=sktree",
"treeple",
"--cov=treeple",
"--cov-report=xml",
"--cov-config=pyproject.toml",
)
Expand All @@ -46,9 +46,9 @@ def coverage(ctx, slowtest=True):
@click.command()
@click.option("--forcesubmodule", is_flag=False, help="Force submodule pull.")
def setup_submodule(forcesubmodule=False):
"""Build scikit-tree using submodules.
"""Build treeple using submodules.
git submodule set-branch -b submodulev3 sktree/_lib/sklearn
git submodule set-branch -b submodulev3 treeple/_lib/sklearn
git submodule update --recursive --remote
Expand All @@ -61,13 +61,13 @@ def setup_submodule(forcesubmodule=False):
This will update the submodule, which then must be commited so that
git knows the submodule needs to be at a certain commit hash.
"""
commit_fpath = "./sktree/_lib/commit.txt"
submodule = "./sktree/_lib/sklearn_fork"
commit_fpath = "./treeple/_lib/commit.txt"
submodule = "./treeple/_lib/sklearn_fork"
commit = ""
current_hash = ""

# if the forked folder does not exist, we will need to force update the submodule
if not os.path.exists("./sktree/_lib/sklearn/") or forcesubmodule:
if not os.path.exists("./treeple/_lib/sklearn/") or forcesubmodule:
# update git submodule
util.run(["git", "submodule", "update", "--init", "--force"])
else:
Expand Down Expand Up @@ -100,7 +100,7 @@ def setup_submodule(forcesubmodule=False):
[
"mkdir",
"-p",
"./sktree/_lib/sklearn/",
"./treeple/_lib/sklearn/",
],
)
util.run(
Expand All @@ -117,17 +117,17 @@ def setup_submodule(forcesubmodule=False):
[
"rm",
"-rf",
"sktree/_lib/sklearn",
"treeple/_lib/sklearn",
]
)

if os.path.exists("sktree/_lib/sklearn_fork/sklearn") and (commit != current_hash):
if os.path.exists("treeple/_lib/sklearn_fork/sklearn") and (commit != current_hash):
util.run(
[
"cp",
"-r",
"sktree/_lib/sklearn_fork/sklearn",
"sktree/_lib/sklearn",
"treeple/_lib/sklearn_fork/sklearn",
"treeple/_lib/sklearn",
]
)

Expand Down Expand Up @@ -155,7 +155,7 @@ def build(
gcov=False,
forcesubmodule=False,
):
"""Build scikit-tree using submodules.
"""Build treeple using submodules.
git submodule update --recursive --remote
Expand Down Expand Up @@ -195,7 +195,7 @@ def asv(asv_args):
"""
site_path = meson._get_site_packages()
if site_path is None:
print("No built scikit-tree found; run `spin build` first.")
print("No built treeple found; run `spin build` first.")
sys.exit(1)

os.environ["ASV_ENV_DIR"] = "/Users/adam2392/miniforge3"
Expand Down
Loading

0 comments on commit 0d41226

Please sign in to comment.