Skip to content

Commit 01c68c0

Browse files
author
Anita Steiner
authored
Merge pull request #38 from Caleydo/release-3.0.0
Release 3.0.0
2 parents 348d9ac + 357df0e commit 01c68c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2200
-2298
lines changed

.circleci/config.yml

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,56 @@ executors:
44
python-executor:
55
working_directory: ~/phovea-python
66
docker:
7-
- image: circleci/python:3.7-buster-node-browsers # for node version see Dockerfile on https://hub.docker.com/r/circleci/python
7+
- image: circleci/python:3.10-buster
88
node-executor:
99
working_directory: ~/phovea-web
1010
docker:
11-
- image: circleci/node:12.13-buster-browsers
11+
- image: circleci/node:14.17-buster
1212

1313
jobs:
1414
python-build:
1515
executor: python-executor
1616
steps:
1717
- checkout
18-
- run:
19-
name: Show Node.js and npm version
20-
command: |
21-
node -v
22-
npm -v
23-
- run:
24-
name: Show Python and pip version
25-
command: |
26-
python --version
27-
pip --version
28-
- run:
29-
name: Install Docker packages from docker_packages.txt
30-
command: |
31-
(!(test -f docker_packages.txt) || (cat docker_packages.txt | xargs sudo apt-get install -y))
3218
- restore_cache:
33-
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
19+
key: deps-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
3420
- run:
3521
name: Install pip requirements
3622
command: |
3723
virtualenv ~/venv
3824
. ~/venv/bin/activate
39-
pip install -r requirements_dev.txt
40-
pip install -r requirements.txt
25+
make develop
4126
- save_cache:
42-
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
27+
key: deps-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
4328
paths:
4429
- ~/venv
4530
- run:
4631
name: Force an update of pip dependencies from git repositories # not sure if this is working ?
4732
command: |
4833
. ~/venv/bin/activate
49-
pip install --upgrade --upgrade-strategy=only-if-needed -r requirements.txt
34+
pip install --upgrade --upgrade-strategy=only-if-needed -e .[develop]
5035
- run:
5136
name: Show installed pip packages
52-
command: pip list || true
37+
command: |
38+
. ~/venv/bin/activate
39+
pip list || true
5340
- run:
54-
name: Remove all from dist folder
41+
name: Linting
5542
command: |
56-
rm -rf dist && mkdir dist
43+
. ~/venv/bin/activate
44+
make lint check-format
5745
- run:
58-
name: Build
46+
name: Run tests
5947
command: |
6048
. ~/venv/bin/activate
61-
npm run dist:python
49+
make test
50+
- run:
51+
name: Build wheel
52+
command: |
53+
. ~/venv/bin/activate
54+
make build
6255
- store_artifacts:
63-
path: dist
56+
path: dist_python
6457
destination: dist-python
6558
- persist_to_workspace:
6659
root: ~/.
@@ -75,7 +68,7 @@ jobs:
7568
node -v
7669
npm -v
7770
- restore_cache:
78-
key: deps2-{{ .Branch }}-{{ checksum "package.json" }}
71+
key: deps0-{{ .Branch }}-{{ checksum "package.json" }}
7972
- run:
8073
name: Install npm dependencies
8174
command: npm install
@@ -84,7 +77,7 @@ jobs:
8477
command: |
8578
(grep -l '._resolved.: .\(git[^:]*\|bitbucket\):' ./node_modules/*/package.json || true) | xargs -r dirname | xargs -r rm -rf
8679
- save_cache:
87-
key: deps2-{{ .Branch }}-{{ checksum "package.json" }}
80+
key: deps0-{{ .Branch }}-{{ checksum "package.json" }}
8881
paths: ./node_modules
8982
- run:
9083
name: Install npm dependencies from git repositories (always get latest commit)
@@ -94,7 +87,7 @@ jobs:
9487
command: npm list --depth=1 || true
9588
- run:
9689
name: Build
97-
command: npm run dist:web
90+
command: npm run dist
9891
- store_artifacts:
9992
path: dist
10093
destination: dist-web

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/.idea
44
/build/
55
/dist/tsBuildInfoFile
6+
/dist_python/
67
*.egg-info/
78
*.egg
89
*.py[cod]

.yo-rc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"generator-phovea": {
33
"type": "app-slib",
44
"modules": [
5-
"tdp_core",
6-
"phovea_server"
5+
"tdp_core"
76
],
87
"vendors": {
98
"others": "phovea.*|tdp_.*|tdp-.*|datavisyn.*",

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include coral *

Makefile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.DEFAULT_GOAL := help
2+
pkg_src = coral
3+
4+
flake8 = flake8 $(pkg_src) setup.py
5+
isort = isort $(pkg_src) setup.py
6+
black = black --line-length 140 $(pkg_src) setup.py
7+
8+
.PHONY: all ## Perform the most common development-time rules
9+
all: format lint test
10+
11+
.PHONY: ci ## Run all CI validation steps without making any changes to code
12+
ci: check-format lint test
13+
14+
.PHONY: format ## Auto-format the source code
15+
format:
16+
$(isort)
17+
$(black)
18+
19+
.PHONY: check-format ## Check the source code format without changes
20+
check-format:
21+
$(isort) --check-only
22+
$(black) --check
23+
24+
.PHONY: lint ## Run flake8
25+
lint:
26+
$(flake8)
27+
28+
.PHONY: test ## Run tests
29+
test:
30+
pytest $(pkg_src)
31+
32+
.PHONEY: documentation ## Generate docs
33+
documentation:
34+
mkdocs build
35+
36+
.PHONY: install ## Install the requirements
37+
install:
38+
pip install -e .
39+
40+
.PHONY: develop ## Set up the development environment
41+
develop:
42+
pip install -e .[develop]
43+
44+
.PHONY: build ## Build a wheel
45+
build:
46+
python setup.py sdist bdist_wheel --dist-dir dist_python
47+
48+
.PHONY: publish ## Publish the ./dist/* using twine
49+
publish:
50+
pip install twine==3.8.0
51+
twine upload --repository-url https://upload.pypi.org/legacy/ dist_python/*
52+
53+
.PHONY: help ## Display this message
54+
help:
55+
@grep -E \
56+
'^.PHONY: .*?## .*$$' $(MAKEFILE_LIST) | \
57+
sort | \
58+
awk 'BEGIN {FS = ".PHONY: |## "}; {printf "\033[36m%-20s\033[0m %s\n", $$2, $$3}'

buildInfo.js

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

0 commit comments

Comments
 (0)