Skip to content

Commit

Permalink
Rename the pkg to "treeple" (#292)
Browse files Browse the repository at this point in the history
* WIP: rename pkg to treeple

---------

Co-authored-by: Adam Li <adam2392@gmail.com>
Authored-by: Itsuki Ogihara <ituki82@gmail.com>
  • Loading branch information
SUKI-O and adam2392 committed Jul 9, 2024
1 parent 98b67fc commit 574a629
Show file tree
Hide file tree
Showing 183 changed files with 728 additions and 744 deletions.
10 changes: 5 additions & 5 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 @@ -61,7 +61,7 @@ commands:
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 gh-pages@3.0
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
4 changes: 2 additions & 2 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 Down Expand Up @@ -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/labeler@v2.5.1
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ 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
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
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 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
2 changes: 1 addition & 1 deletion .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: default

ignore: |
sktree/_lib/
treeple/_lib/
.asv/
rules:
Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
---
# Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/)
cff-version: 1.2.0
title: "Scikit-tree: Modern decision-trees compatible with scikit-learn in Python."
abstract: "scikit-tree is a scikit-learn compatible API for building state-of-the-art decision trees. These include unsupervised trees, oblique trees, uncertainty trees, quantile trees and causal trees."
title: "treeple: Modern decision-trees compatible with scikit-learn in Python."
abstract: "treeple is a scikit-learn compatible API for building state-of-the-art decision trees. These include unsupervised trees, oblique trees, uncertainty trees, quantile trees and causal trees."
authors:
- given-names: Adam
family-names: Li
Expand All @@ -18,7 +18,7 @@ authors:
affiliation: "Department of Biomedical Engineering, Johns Hopkins University, Baltimore, MD, USA"
orcid: "https://orcid.org/0000-0001-8235-4950"
type: software
repository-code: "https://github.com/neurodata/scikit-tree"
repository-code: "https://github.com/neurodata/treeple"
license: 'BSD-3-Clause'
keywords:
- random forest
Expand Down
Loading

0 comments on commit 574a629

Please sign in to comment.