Skip to content

Commit 2edf077

Browse files
author
Anita Steiner
authored
Merge pull request #53 from datavisyn/release-13.0.0
Release 13.0.0
2 parents 3e20d45 + 350c788 commit 2edf077

File tree

25 files changed

+336
-618
lines changed

25 files changed

+336
-618
lines changed

.circleci/config.yml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ 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:
@@ -15,52 +15,45 @@ jobs:
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: ~/.
@@ -88,7 +81,7 @@ jobs:
8881
name: Publish package
8982
command: |
9083
. ~/venv/bin/activate
91-
twine upload dist/*
84+
twine upload dist_python/*
9285
web-build:
9386
executor: node-executor
9487
steps:
@@ -118,7 +111,7 @@ jobs:
118111
command: npm list --depth=1 || true
119112
- run:
120113
name: Build
121-
command: npm run dist:web
114+
command: npm run dist
122115
- store_artifacts:
123116
path: dist
124117
destination: dist-web

.gitignore

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

.yo-rc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"generator-phovea": {
33
"type": "lib-slib",
44
"modules": [
5-
"phovea_server"
5+
"tdp_core"
66
],
77
"libraryAliases": {},
88
"libraryExternals": [],

MANIFEST.in

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

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 = phovea_security_store_generated
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}'

build.py

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

buildPython.js

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

docs/.gitignore

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

docs/_static/touch.txt

Whitespace-only changes.

docs/_templates/touch.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)