Skip to content

Commit 0ddc9d0

Browse files
authored
Fix CI release actions (#247)
* Revert publish as workspace organisation has changed * Test no-verify and dry-run * Specify doe path * Test with cargo release directly * Remove top level README inclusion making publish through CI fail * Pin maturin 1.8.2 * Pin maturin for linux not windows
1 parent c81f9b7 commit 0ddc9d0

File tree

4 files changed

+12
-21
lines changed

4 files changed

+12
-21
lines changed

.github/workflows/publish.yml

+2-19
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,9 @@ jobs:
1919
toolchain: stable
2020
override: true
2121

22-
- name: Publish egobox-doe
22+
- name: Publish crates
2323
uses: katyo/publish-crates@v2
2424
with:
25-
path: ./crates/doe
2625
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
26+
ignore-unpublished-changes: true
2727

28-
- name: Publish egobox-gp
29-
uses: katyo/publish-crates@v2
30-
with:
31-
path: ./crates/gp
32-
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
33-
34-
- name: Publish egobox-moe
35-
uses: katyo/publish-crates@v2
36-
with:
37-
path: ./crates/moe
38-
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
39-
40-
- name: Publish egobox-ego
41-
uses: katyo/publish-crates@v2
42-
with:
43-
path: ./crates/ego
44-
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/python.yml

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- name: Build wheels
4040
uses: PyO3/maturin-action@v1
4141
with:
42+
maturin-version: 1.8.2
4243
working-directory: python
4344
target: ${{ matrix.platform.target }}
4445
args: --release --out dist --find-interpreter
@@ -71,6 +72,7 @@ jobs:
7172
- name: Build wheels
7273
uses: PyO3/maturin-action@v1
7374
with:
75+
maturin-version: 1.8.2
7476
working-directory: python
7577
target: ${{ matrix.platform.target }}
7678
args: --release --out dist --find-interpreter

python/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ print(f"Optimization f={res.y_opt} at {res.x_opt}") # Optimization f=[-15.12510
3030

3131
```python
3232
import numpy as np
33+
import matplotlib.pyplot as plt
3334
import egobox as egx
3435

3536
# Training
@@ -38,8 +39,13 @@ ytrain = np.array([0.0, 1.0, 1.5, 0.9, 1.0])
3839
gpx = egx.Gpx.builder().fit(xtrain, ytrain)
3940

4041
# Prediction
41-
xtest = np.linspace(0, 4, 20).reshape((-1, 1))
42+
xtest = np.linspace(0, 4, 100).reshape((-1, 1))
4243
ytest = gpx.predict(xtest)
44+
45+
# Plot
46+
plt.plot(xtest, ytest)
47+
plt.plot(xtrain, ytrain, "o")
48+
plt.show()
4349
```
4450

4551
See the [tutorial notebooks](https://github.com/relf/egobox/tree/master/doc/README.md) and [examples folder](https://github.com/relf/egobox/tree/d9db0248199558f23d966796737d7ffa8f5de589/python/egobox/examples) for more information on the usage of the optimizer and mixture of Gaussian processes surrogate model.

python/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![doc = include_str!("../../README.md")]
1+
#![doc = include_str!("../README.md")]
22

33
mod egor;
44
mod gp_mix;

0 commit comments

Comments
 (0)