Skip to content

Commit 1752dd1

Browse files
authored
Merge pull request #245 from c-bata/remove-statik
Remove `statik` dependency
2 parents f0316e7 + d5e42e1 commit 1752dd1

File tree

11 files changed

+6
-133
lines changed

11 files changed

+6
-133
lines changed

.github/workflows/go-examples.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,4 @@ jobs:
3333
./bin/sobol
3434
./bin/cmaes_blackhole
3535
./bin/simple_tpe
36-
./bin/concurrency
3736
./bin/trialnotify

Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GODOC ?= godoc
1111

1212
.DEFAULT_GOAL := help
1313

14-
SOURCES := $(shell find . -name "*.go" | grep -v -e "sobol/direction_numbers.go" -e "dashboard/statik/statik.go")
14+
SOURCES := $(shell find . -name "*.go" | grep -v -e "sobol/direction_numbers.go")
1515

1616
.PHONY: fmt
1717
fmt: $(SOURCES) ## Formatting source codes.
@@ -49,13 +49,6 @@ build: ## Build example command lines.
4949
$(GO) build -o ./bin/goptuna -ldflags "$(LDFLAGS)" cmd/main.go
5050
./_examples/build.sh
5151

52-
.PHONY: build-dashboard
53-
build-dashboard: ## Build dashboard and bundle it.
54-
docker build -t c-bata/goptuna-dashboard ./dashboard
55-
docker run -it --rm \
56-
-v `PWD`/dashboard/statik:/usr/src/statik \
57-
c-bata/goptuna-dashboard
58-
5952
.PHONY: help
6053
help: ## Show help text
6154
@echo "Commands:"

_examples/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ set -ex
1010

1111
go build -o ${BIN_DIR}/cmaes ${DIR}/cmaes/main.go
1212
go build -o ${BIN_DIR}/cmaes_blackhole ${DIR}/cmaes/blackhole/main.go
13-
go build -o ${BIN_DIR}/concurrency ${DIR}/concurrency/main.go
1413
go build -o ${BIN_DIR}/enqueue_trial ${DIR}/enqueue_trial/main.go
1514
go build -o ${BIN_DIR}/trialnotify ${DIR}/trialnotify/main.go
1615
go build -o ${BIN_DIR}/signalhandling ${DIR}/signalhandling/main.go
1716
go build -o ${BIN_DIR}/simple_rdb ${DIR}/simple_rdb/main.go
1817
go build -o ${BIN_DIR}/simple_tpe ${DIR}/simple_tpe/main.go
1918
go build -o ${BIN_DIR}/sobol ${DIR}/sobol/main.go
20-
go build -o ${BIN_DIR}/gorgonia_iris ${DIR}/gorgonia_iris/main.go
19+
#go build -o ${BIN_DIR}/concurrency ${DIR}/concurrency/main.go
20+
#go build -o ${BIN_DIR}/gorgonia_iris ${DIR}/gorgonia_iris/main.go

dashboard/.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

dashboard/Dockerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

dashboard/README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
## Running dashboard
44

5-
Pre-built JavaScript files are embedded using:
6-
7-
* `go:embed` for Go1.16 or later.
8-
* [rakyll/statik](https://github.com/rakyll/statik) for Go1.15 or older.
9-
5+
Pre-built JavaScript files are embedded using `go:embed`.
106
So it's ok you just run `goptuna dashboard` command like this:
117

128
```
@@ -43,19 +39,9 @@ Use "goptuna [command] --help" for more information about a command.
4339

4440
## How to compile TypeScript files
4541

46-
### Compiling TypeScript files and embedding to Go using Docker
47-
48-
You just run to `make build-dashboard` to compile TypeScript files and embedding to Go.
49-
50-
```
51-
$ docker build -t c-bata/goptuna-dashboard ./dashboard
52-
$ docker run -it --rm -v `PWD`/dashboard/statik:/usr/src/statik c-bata/goptuna-dashboard
53-
```
54-
55-
5642
### Compiling TypeScript files manually
5743

58-
Node.js v14.14.0 is required to compile TypeScript files.
44+
Node.js v20 is required to compile TypeScript files.
5945

6046
```
6147
$ npm install
@@ -80,13 +66,6 @@ $ npm run build:prd
8066

8167
</details>
8268

83-
### Embeddeing to Go using rakyll/statik
84-
85-
```
86-
$ statik -src=./public -include=bundle.js,bundle.js.LICENSE.txt
87-
```
88-
89-
9069
## Running Dashboard server for reloading
9170

9271
Please pass `-tags=develop` the custom build tag to return JS files inside local directory (not embedded files).

dashboard/staticfiles_embed.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !develop && go1.16
1+
//go:build !develop
22

33
package dashboard
44

dashboard/staticfiles_statik.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

dashboard/statik/statik.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ require (
66
github.com/google/uuid v1.3.1
77
github.com/gorilla/mux v1.8.0
88
github.com/jinzhu/gorm v1.9.16
9-
github.com/rakyll/statik v0.1.7
109
github.com/spf13/cobra v1.7.0
1110
gonum.org/v1/gonum v0.14.0
1211
gorm.io/driver/mysql v1.0.3

0 commit comments

Comments
 (0)