Skip to content

Commit ac52350

Browse files
Rename devpy to spin (neurodata#54)
Signed-off-by: Adam Li <[email protected]> Co-authored-by: Adam Li <[email protected]>
1 parent 190d743 commit ac52350

File tree

7 files changed

+39
-41
lines changed

7 files changed

+39
-41
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ jobs:
8989
name: setup Python venv
9090
command: |
9191
pip install -r build_requirements.txt
92-
pip install git+https://github.com/scientific-python/[email protected]
92+
pip install spin
9393
pip install -r doc_requirements.txt
9494
# extra benchmark deps
9595
pip install pytest
9696
- run:
9797
name: build scikit-tree
9898
command: |
99-
python dev.py build -j2
99+
python spin build -j2
100100
- save_cache:
101101
key: deps_ccache-{{ .Branch }}
102102
paths:

.github/workflows/main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Install Python packages
6969
run: |
7070
python -m pip install -r build_requirements.txt
71-
python -m pip install git+https://github.com/scientific-python/[email protected]
71+
python -m pip install spin
7272
python -m pip install -r test_requirements.txt
7373
7474
- name: Prepare compiler cache
@@ -98,7 +98,7 @@ jobs:
9898
9999
- name: Setup build and install scikit-tree
100100
run: |
101-
python dev.py build -j 2
101+
python spin build -j 2
102102
103103
- name: Ccache performance
104104
shell: bash -l {0}
@@ -111,10 +111,10 @@ jobs:
111111
112112
- name: Run unit tests and coverage
113113
run: |
114-
./dev.py --help
115-
./dev.py coverage --help
116-
./dev.py test --help
117-
python dev.py coverage
114+
./spin --help
115+
./spin coverage --help
116+
./spin test --help
117+
python spin coverage
118118
cp $PWD/build-install/usr/lib/python${{matrix.python-version}}/site-packages/coverage.xml ./coverage.xml
119119
120120
- name: debug
@@ -128,7 +128,7 @@ jobs:
128128
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.10'}}
129129
uses: codecov/codecov-action@v3
130130
with:
131-
# python dev.py goes into the INSTALLED path in order to run pytest
131+
# python spin goes into the INSTALLED path in order to run pytest
132132
files: ./coverage.xml
133133
fail_ci_if_error: true
134134
verbose: true
@@ -162,7 +162,7 @@ jobs:
162162
- name: pip-packages
163163
run: |
164164
pip install -r build_requirements.txt
165-
pip install git+https://github.com/scientific-python/[email protected]
165+
pip install spin
166166
- name: openblas-libs
167167
run: |
168168
# Download and install pre-built OpenBLAS library
@@ -185,7 +185,7 @@ jobs:
185185
meson install
186186
# - name: build
187187
# run: |
188-
# python dev.py build -j 2
188+
# python spin build -j 2
189189
# # following steps are required because the build step does not put
190190
# # the *.pyd files in build-install! Furthermore the --win-cp-openblas
191191
# # option does not seem to copy libopenblas*.dll, so manually copy it.

.devpy/cmds.py renamed to .spin/cmds.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import sys
44

55
import click
6-
from devpy import util
7-
from devpy.cmds import meson
6+
from spin import util
7+
from spin.cmds import meson
88

99

1010
@click.command()
@@ -20,7 +20,7 @@ def docs(build_dir, clean=False):
2020

2121
site_path = meson._get_site_packages()
2222
if site_path is None:
23-
print("No built scikit-tree found; run `./dev.py build` first.")
23+
print("No built scikit-tree found; run `./spin build` first.")
2424
sys.exit(1)
2525

2626
util.run(["pip", "install", "-q", "-r", "doc_requirements.txt"])
@@ -37,7 +37,7 @@ def coverage():
3737
[
3838
"python",
3939
"-m",
40-
"devpy",
40+
"spin",
4141
"test",
4242
"--",
4343
"-o",

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,30 @@ Make sure you have the necessary packages installed
4949
# make sure we have our fork of scikit-learn
5050
pip install scikit-learn@git+https://[email protected]/neurodata/scikit-learn.git@fork
5151

52-
pip install spin
53-
54-
After you have installed the relevant dependencies and also installed the scikit-learn fork, you can build the package locally. We use the ``dev.py`` CLI to abstract away build details:
52+
We use the ``spin`` CLI to abstract away build details:
5553

5654
# run the build using Meson/Ninja
57-
./dev.py build
58-
55+
./spin build
56+
5957
# you can run the following command to see what other options there are
60-
./dev.py --help
61-
./dev.py build --help
58+
./spin --help
59+
./spin build --help
6260

6361
# For example, you might want to start from a clean build
64-
./dev.py build --clean
62+
./spin build --clean
6563

6664
# or build in parallel for faster builds
67-
./dev.py build -j 2
65+
./spin build -j 2
6866

6967
# you will need to double check the build-install has the proper path
7068
# this might be different from machine to machine
7169
export PYTHONPATH=${PWD}/build-install/usr/lib/python3.9/site-packages
7270

7371
# run specific unit tests
74-
./dev.py test -- sktree/tree/tests/test_tree.py
72+
./spin test -- sktree/tree/tests/test_tree.py
7573

7674
# you can bring up the CLI menu
77-
./dev.py --help
75+
./spin --help
7876

7977
You can also do the same thing using Meson/Ninja itself. Run the following to build the local files:
8078

docs/install.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ Then run installation of build packages
4545
.. code-block:: bash
4646
4747
pip install -r build_requirements.txt
48-
pip install git+https://github.com/scientific-python/devpy
48+
pip install spin
4949
50-
# use dev.py CLI to run Meson build locally
51-
./dev.py build -j 2
50+
# use spin CLI to run Meson build locally
51+
./spin build -j 2
5252
5353
# you can now run tests
54-
./dev.py test
54+
./spin test
5555
5656
via pip, you will be able to install in editable mode (pending Meson-Python support).
5757

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,17 @@ precision = 2
203203
exclude_dirs = ["sktree/tests", "sktree/tree/tests", 'sktree/_build_utils/*']
204204
skips = ['B404', 'B603']
205205

206-
[tool.devpy]
206+
[tool.spin]
207207
package = 'sktree'
208208

209-
[tool.devpy.commands]
210-
Build = ["devpy.cmds.meson.build", "devpy.cmds.meson.test"]
209+
[tool.spin.commands]
210+
Build = ["spin.cmds.meson.build", "spin.cmds.meson.test"]
211211
Environments = [
212-
'devpy.cmds.meson.shell',
213-
'devpy.cmds.meson.ipython',
214-
'devpy.cmds.meson.python',
212+
'spin.cmds.meson.shell',
213+
'spin.cmds.meson.ipython',
214+
'spin.cmds.meson.python',
215215
]
216-
Documentation = ['.devpy/cmds.py:docs']
216+
Documentation = ['.spin/cmds.py:docs']
217217
Metrics = [
218-
'.devpy/cmds.py:coverage',
218+
'.spin/cmds.py:coverage',
219219
]

dev.py renamed to spin

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# Example stub for running `python -m dev.py`
3+
# Example stub for running `python -m spin`
44
#
55
# Copy this into your project root.
66

@@ -10,9 +10,9 @@
1010

1111
sys.path.remove(os.path.abspath(os.path.dirname(sys.argv[0])))
1212
try:
13-
runpy.run_module("devpy", run_name="__main__")
13+
runpy.run_module("spin", run_name="__main__")
1414
except ImportError:
15-
print("Cannot import devpy; please install it using")
15+
print("Cannot import spin; please install it using")
1616
print()
1717
print(" pip install spin")
1818
print()

0 commit comments

Comments
 (0)