Spaces:
Running
Running
Commit
·
bed9614
1
Parent(s):
8a63bdf
Add .travis.yml
Browse files- .travis.yml +11 -0
- setup.py +4 -0
- test/test.py +7 -0
- test/travis.sh +6 -0
.travis.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
language: julia
|
| 2 |
+
os: linux
|
| 3 |
+
dist: bionic
|
| 4 |
+
|
| 5 |
+
addons:
|
| 6 |
+
apt:
|
| 7 |
+
packages:
|
| 8 |
+
- python3-pip
|
| 9 |
+
|
| 10 |
+
script:
|
| 11 |
+
- ./test/travis.sh
|
setup.py
CHANGED
|
@@ -12,6 +12,10 @@ setuptools.setup(
|
|
| 12 |
long_description=long_description,
|
| 13 |
long_description_content_type="text/markdown",
|
| 14 |
url="https://github.com/MilesCranmer/pysr",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
packages=setuptools.find_packages(),
|
| 16 |
package_data={
|
| 17 |
'pysr': ['../julia/*.jl']
|
|
|
|
| 12 |
long_description=long_description,
|
| 13 |
long_description_content_type="text/markdown",
|
| 14 |
url="https://github.com/MilesCranmer/pysr",
|
| 15 |
+
install_requires=[
|
| 16 |
+
"numpy",
|
| 17 |
+
"pandas"
|
| 18 |
+
],
|
| 19 |
packages=setuptools.find_packages(),
|
| 20 |
package_data={
|
| 21 |
'pysr': ['../julia/*.jl']
|
test/test.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
from pysr import pysr
|
| 3 |
+
X = np.random.randn(100, 5)
|
| 4 |
+
y = X[:, 0]
|
| 5 |
+
|
| 6 |
+
equations = pysr(X, y)
|
| 7 |
+
print(equations)
|
test/travis.sh
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
julia -e 'import Pkg; Pkg.add("Optim"); Pkg.add("SpecialFunctions")'
|
| 3 |
+
sudo python3 -m pip install numpy pandas
|
| 4 |
+
sudo python3 setup.py install
|
| 5 |
+
python3 test/test.py
|
| 6 |
+
|