Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
4320392
1
Parent(s):
98fa83e
Update all workflows to use `python -m pysr test` syntax
Browse files- .github/workflows/CI.yml +7 -7
- .github/workflows/CI_Windows.yml +4 -4
- .github/workflows/CI_conda_forge.yml +1 -1
- .github/workflows/CI_docker.yml +1 -1
- .github/workflows/CI_docker_large_nightly.yml +1 -1
- .github/workflows/CI_large_nightly.yml +3 -3
- .github/workflows/CI_mac.yml +5 -5
- CONTRIBUTORS.md +1 -1
- pysr/test/__main__.py +0 -1
.github/workflows/CI.yml
CHANGED
@@ -65,22 +65,22 @@ jobs:
|
|
65 |
run: pip install coverage coveralls
|
66 |
- name: "Run tests"
|
67 |
run: |
|
68 |
-
coverage run --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr
|
69 |
-
coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr
|
70 |
- name: "Install JAX"
|
71 |
run: pip install jax jaxlib # (optional import)
|
72 |
if: ${{ matrix.test-id == 'main' }}
|
73 |
- name: "Run JAX tests"
|
74 |
-
run: coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr
|
75 |
if: ${{ matrix.test-id == 'main' }}
|
76 |
- name: "Install Torch"
|
77 |
run: pip install torch # (optional import)
|
78 |
if: ${{ matrix.test-id == 'main' }}
|
79 |
- name: "Run Torch tests"
|
80 |
-
run: coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr
|
81 |
if: ${{ matrix.test-id == 'main' }}
|
82 |
- name: "Run custom env tests"
|
83 |
-
run: coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr
|
84 |
- name: "Coveralls"
|
85 |
env:
|
86 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -95,7 +95,7 @@ jobs:
|
|
95 |
- name: "Build incremental install"
|
96 |
run: docker build -t pysr -f pysr/test/incremental_install_simulator.dockerfile .
|
97 |
- name: "Test incremental install"
|
98 |
-
run: docker run --rm pysr /bin/bash -l -c 'python3 -m pysr
|
99 |
|
100 |
conda_test:
|
101 |
runs-on: ${{ matrix.os }}
|
@@ -135,7 +135,7 @@ jobs:
|
|
135 |
python3 -m pip install .
|
136 |
python3 -m pysr install
|
137 |
- name: "Run tests"
|
138 |
-
run: cd /tmp && python -m pysr
|
139 |
|
140 |
coveralls:
|
141 |
name: Indicate completion to coveralls.io
|
|
|
65 |
run: pip install coverage coveralls
|
66 |
- name: "Run tests"
|
67 |
run: |
|
68 |
+
coverage run --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr test main
|
69 |
+
coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr test cli
|
70 |
- name: "Install JAX"
|
71 |
run: pip install jax jaxlib # (optional import)
|
72 |
if: ${{ matrix.test-id == 'main' }}
|
73 |
- name: "Run JAX tests"
|
74 |
+
run: coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr test jax
|
75 |
if: ${{ matrix.test-id == 'main' }}
|
76 |
- name: "Install Torch"
|
77 |
run: pip install torch # (optional import)
|
78 |
if: ${{ matrix.test-id == 'main' }}
|
79 |
- name: "Run Torch tests"
|
80 |
+
run: coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr test torch
|
81 |
if: ${{ matrix.test-id == 'main' }}
|
82 |
- name: "Run custom env tests"
|
83 |
+
run: coverage run --append --source=pysr --omit='*/test/*,*/feynman_problems.py' -m pysr test env
|
84 |
- name: "Coveralls"
|
85 |
env:
|
86 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
95 |
- name: "Build incremental install"
|
96 |
run: docker build -t pysr -f pysr/test/incremental_install_simulator.dockerfile .
|
97 |
- name: "Test incremental install"
|
98 |
+
run: docker run --rm pysr /bin/bash -l -c 'python3 -m pysr test main && python3 -m pysr test env'
|
99 |
|
100 |
conda_test:
|
101 |
runs-on: ${{ matrix.os }}
|
|
|
135 |
python3 -m pip install .
|
136 |
python3 -m pysr install
|
137 |
- name: "Run tests"
|
138 |
+
run: cd /tmp && python -m pysr test main
|
139 |
|
140 |
coveralls:
|
141 |
name: Indicate completion to coveralls.io
|
.github/workflows/CI_Windows.yml
CHANGED
@@ -57,11 +57,11 @@ jobs:
|
|
57 |
python -m pysr install
|
58 |
- name: "Run tests"
|
59 |
run: |
|
60 |
-
python -m pysr
|
61 |
-
python -m pysr
|
62 |
- name: "Install Torch"
|
63 |
run: pip install torch # (optional import)
|
64 |
- name: "Run Torch tests"
|
65 |
-
run: python -m pysr
|
66 |
- name: "Run custom env tests"
|
67 |
-
run: python -m pysr
|
|
|
57 |
python -m pysr install
|
58 |
- name: "Run tests"
|
59 |
run: |
|
60 |
+
python -m pysr test main
|
61 |
+
python -m pysr test cli
|
62 |
- name: "Install Torch"
|
63 |
run: pip install torch # (optional import)
|
64 |
- name: "Run Torch tests"
|
65 |
+
run: python -m pysr test torch
|
66 |
- name: "Run custom env tests"
|
67 |
+
run: python -m pysr test env
|
.github/workflows/CI_conda_forge.yml
CHANGED
@@ -40,4 +40,4 @@ jobs:
|
|
40 |
run: conda activate pysr-test && conda install pysr
|
41 |
if: ${{ !matrix.use-mamba }}
|
42 |
- name: "Run tests"
|
43 |
-
run: python -m pysr
|
|
|
40 |
run: conda activate pysr-test && conda install pysr
|
41 |
if: ${{ !matrix.use-mamba }}
|
42 |
- name: "Run tests"
|
43 |
+
run: python -m pysr test main
|
.github/workflows/CI_docker.yml
CHANGED
@@ -37,4 +37,4 @@ jobs:
|
|
37 |
- name: Build docker
|
38 |
run: docker build --platform=${{ matrix.arch }} -t pysr .
|
39 |
- name: Test docker
|
40 |
-
run: docker run --platform=${{ matrix.arch }} --rm pysr /bin/bash -c 'python3 -m pysr
|
|
|
37 |
- name: Build docker
|
38 |
run: docker build --platform=${{ matrix.arch }} -t pysr .
|
39 |
- name: Test docker
|
40 |
+
run: docker run --platform=${{ matrix.arch }} --rm pysr /bin/bash -c 'python3 -m pysr test main && python3 -m pysr test cli && python3 -m pysr test env'
|
.github/workflows/CI_docker_large_nightly.yml
CHANGED
@@ -33,4 +33,4 @@ jobs:
|
|
33 |
- name: Build docker
|
34 |
run: docker build --platform=${{ matrix.arch }} -t pysr --build-arg JLVERSION=${{ matrix.julia-version }} --build-arg PYVERSION=${{ matrix.python-version }} .
|
35 |
- name: Test docker
|
36 |
-
run: docker run --platform=${{ matrix.arch }} --rm pysr /bin/bash -c 'python3 -m pysr
|
|
|
33 |
- name: Build docker
|
34 |
run: docker build --platform=${{ matrix.arch }} -t pysr --build-arg JLVERSION=${{ matrix.julia-version }} --build-arg PYVERSION=${{ matrix.python-version }} .
|
35 |
- name: Test docker
|
36 |
+
run: docker run --platform=${{ matrix.arch }} --rm pysr /bin/bash -c 'python3 -m pysr test main && python3 -m pysr test cli && python3 -m pysr test env'
|
.github/workflows/CI_large_nightly.yml
CHANGED
@@ -45,8 +45,8 @@ jobs:
|
|
45 |
python -m pysr install
|
46 |
- name: "Run tests"
|
47 |
run: |
|
48 |
-
python -m pysr
|
49 |
-
python -m pysr
|
50 |
- name: "Run new env test"
|
51 |
-
run: python -m pysr
|
52 |
if: ${{ !(matrix.os == 'windows-latest' && matrix.python-version == '3.7') }}
|
|
|
45 |
python -m pysr install
|
46 |
- name: "Run tests"
|
47 |
run: |
|
48 |
+
python -m pysr test main
|
49 |
+
python -m pysr test cli
|
50 |
- name: "Run new env test"
|
51 |
+
run: python -m pysr test env
|
52 |
if: ${{ !(matrix.os == 'windows-latest' && matrix.python-version == '3.7') }}
|
.github/workflows/CI_mac.yml
CHANGED
@@ -57,15 +57,15 @@ jobs:
|
|
57 |
python -m pysr install
|
58 |
- name: "Run tests"
|
59 |
run: |
|
60 |
-
python -m pysr
|
61 |
-
python -m pysr
|
62 |
- name: "Install JAX"
|
63 |
run: pip install jax jaxlib # (optional import)
|
64 |
- name: "Run JAX tests"
|
65 |
-
run: python -m pysr
|
66 |
- name: "Install Torch"
|
67 |
run: pip install torch # (optional import)
|
68 |
- name: "Run Torch tests"
|
69 |
-
run: python -m pysr
|
70 |
- name: "Run custom env tests"
|
71 |
-
run: python -m pysr
|
|
|
57 |
python -m pysr install
|
58 |
- name: "Run tests"
|
59 |
run: |
|
60 |
+
python -m pysr test main
|
61 |
+
python -m pysr test cli
|
62 |
- name: "Install JAX"
|
63 |
run: pip install jax jaxlib # (optional import)
|
64 |
- name: "Run JAX tests"
|
65 |
+
run: python -m pysr test jax
|
66 |
- name: "Install Torch"
|
67 |
run: pip install torch # (optional import)
|
68 |
- name: "Run Torch tests"
|
69 |
+
run: python -m pysr test torch
|
70 |
- name: "Run custom env tests"
|
71 |
+
run: python -m pysr test env
|
CONTRIBUTORS.md
CHANGED
@@ -42,7 +42,7 @@ Scan through our [existing issues](https://github.com/MilesCranmer/PySR/issues)
|
|
42 |
check out the [guide](https://astroautomata.com/PySR/backend/) on modifying a custom SymbolicRegression.jl library.
|
43 |
In this case, you might instead be interested in making suggestions to the [SymbolicRegression.jl](http://github.com/MilesCranmer/SymbolicRegression.jl) library.
|
44 |
|
45 |
-
4. You can install your local version of PySR with `python setup.py install`, and run tests with `python -m pysr
|
46 |
|
47 |
### Commit your update
|
48 |
|
|
|
42 |
check out the [guide](https://astroautomata.com/PySR/backend/) on modifying a custom SymbolicRegression.jl library.
|
43 |
In this case, you might instead be interested in making suggestions to the [SymbolicRegression.jl](http://github.com/MilesCranmer/SymbolicRegression.jl) library.
|
44 |
|
45 |
+
4. You can install your local version of PySR with `python setup.py install`, and run tests with `python -m pysr test main`.
|
46 |
|
47 |
### Commit your update
|
48 |
|
pysr/test/__main__.py
CHANGED
@@ -6,7 +6,6 @@ from . import *
|
|
6 |
if __name__ == "__main__":
|
7 |
# Get args:
|
8 |
parser = argparse.ArgumentParser()
|
9 |
-
parser.usage = "python -m pysr.test [tests...]"
|
10 |
parser.add_argument(
|
11 |
"test",
|
12 |
nargs="*",
|
|
|
6 |
if __name__ == "__main__":
|
7 |
# Get args:
|
8 |
parser = argparse.ArgumentParser()
|
|
|
9 |
parser.add_argument(
|
10 |
"test",
|
11 |
nargs="*",
|