Skip to content

Commit fe423c9

Browse files
authored
Merge pull request #178 from man-group/add-testing-fix-spaces
Fix whitespace-in-folder bug. Fixes #173
2 parents a1666b3 + 4ac8a07 commit fe423c9

File tree

10 files changed

+4624
-1092
lines changed

10 files changed

+4624
-1092
lines changed

.circleci/config.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
defaults: &defaults
22
parallelism: 1
33
shell: /bin/bash --login
4+
commands:
5+
set_node_version:
6+
description: "Set Node.js version"
7+
parameters:
8+
version:
9+
type: string
10+
steps:
11+
- run:
12+
name: Set Node.js version
13+
command: |
14+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
15+
export NVM_DIR="$HOME/.nvm"
16+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
17+
nvm install << parameters.version >>
18+
node --version
19+
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
20+
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
21+
echo 'nvm alias default << parameters.version >> > /dev/null' >> $BASH_ENV
22+
default_build:
423
steps:
524
- checkout
625
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
@@ -39,7 +58,7 @@ defaults: &defaults
3958
command: |
4059
# run "cat /etc/os-release" to view information about the OS
4160
# good article on how to install mongo, https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
42-
61+
4362
cat /etc/os-release
4463
set -x
4564
# ------ (2022-10-28) install libssl1.1 since mongo doesn't support Ubuntu 22.04 which has libssl v3
@@ -59,7 +78,7 @@ defaults: &defaults
5978
name: Install JS Dependencies
6079
command: |
6180
pushd $YARN_STATIC_DIR
62-
yarn install --frozen-lockfile
81+
yarn install --frozen-lockfile $EXTRA_YARN_INSTALL_ARGS
6382
- save_cache:
6483
name: Save Yarn Package Cache
6584
key: yarn-packages-{{ checksum "notebooker/web/static/yarn.lock" }}
@@ -80,6 +99,11 @@ defaults: &defaults
8099
command: |
81100
pushd $YARN_STATIC_DIR
82101
yarn run bundle
102+
- run:
103+
name: JS tests
104+
command: |
105+
pushd $YARN_STATIC_DIR
106+
yarn test
83107
- run:
84108
name: Create and activate virtualenv
85109
command: |
@@ -183,7 +207,7 @@ defaults: &defaults
183207
- ./*/version.txt
184208
- ./*/changes.md
185209
- ./*/dist/*
186-
version: 2
210+
version: 2.1
187211
jobs:
188212
build_3_6:
189213
environment:
@@ -197,6 +221,10 @@ jobs:
197221
working_directory: ~/notebooker_3_6
198222
docker:
199223
- image: cimg/python:3.6-node
224+
steps:
225+
- set_node_version:
226+
version: "18"
227+
- default_build
200228
<<: *defaults
201229
build_3_7:
202230
environment:
@@ -210,6 +238,8 @@ jobs:
210238
docker:
211239
- image: cimg/python:3.7-node
212240
<<: *defaults
241+
steps:
242+
- default_build
213243
build_3_8:
214244
environment:
215245
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts/3_8
@@ -222,6 +252,8 @@ jobs:
222252
docker:
223253
- image: cimg/python:3.8-node
224254
<<: *defaults
255+
steps:
256+
- default_build
225257
publish-github-release:
226258
docker:
227259
- image: cibuilds/github:0.13
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ---
2+
# jupyter:
3+
# jupytext:
4+
# text_representation:
5+
# extension: .md
6+
# format_name: markdown
7+
# format_version: '1.1'
8+
# jupytext_version: 1.1.0
9+
# kernelspec:
10+
# display_name: Python 3
11+
# language: python
12+
# name: python3
13+
# ---
14+
15+
# #Notebooker Testing!
16+
17+
18+
# + {"tags": ["parameters"]}
19+
plots = 2
20+
days = 1000
21+
start_date = "2010-01-01"
22+
23+
# -
24+
# %matplotlib inline
25+
import pandas as pd
26+
import numpy as np
27+
28+
# -
29+
arr = np.random.rand(days, plots) - 0.5
30+
dts = np.array(start_date, dtype=np.datetime64) + np.arange(days)
31+
df = pd.DataFrame(arr, index=dts)
32+
33+
# -
34+
df.cumsum().plot()

notebooker/web/static/gulpfile.js

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
setupFiles: ["./jest.setup.js"],
3+
reporters: [
4+
"default",
5+
["jest-junit", { "outputDirectory": "./test-results/jest" }]
6+
]
7+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
global.TextEncoder = require("util").TextEncoder;
2+
global.TextDecoder = require("util").TextDecoder;
3+
global.$ = global.jQuery = require("jquery");

0 commit comments

Comments
 (0)