Skip to content

Commit 135d368

Browse files
authored
Chore/python version update (#2)
* Update desc.json Adding new python versions + core Packages Set * Update requirements.txt with numpy conditions * Update requirements.txt numpy version conditions * Remove numpy requirements * Bumped plugin.json to version 1.1.1 * Update CHANGELOG.md version 1.1.0 * Update plugin.json version 1.1.0 * Update CHANGELOG.md link, date and description * Update CHANGELOG.md stacking two versions * Update Makefile * Update Makefile
1 parent 8ab7c8a commit 135d368

5 files changed

Lines changed: 33 additions & 25 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
22

3-
## [Version 1.0.1](https://github.com/dataiku/dss-plugin-ml-assisted-labeling/releases/tag/v1.0.1) - New hotfix release - 2022-03
4-
- Changed documentation URL
3+
## [Version 1.1.0](https://github.com/dataiku/dss-plugin-multisheet-excel-export/releases/tag/v1.1.0) - New hotfix release - 2023-08
4+
- Updated plugin to python 3.7, 3.8, 3.9, 3.10, 3.11
5+
6+
## [Version 1.0.1](https://github.com/dataiku/dss-plugin-multisheet-excel-export/releases/tag/v1.0.1) - New hotfix release - 2022-03
7+
- Changed documentation URL

Makefile

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,47 @@ archive_file_name="dss-plugin-${plugin_id}-${plugin_version}.zip"
55
remote_url=`git config --get remote.origin.url`
66
last_commit_id=`git rev-parse HEAD`
77

8+
.DEFAULT_GOAL := plugin
89

9-
plugin:
10+
plugin: dist-clean
1011
@echo "[START] Archiving plugin to dist/ folder..."
1112
@cat plugin.json | json_pp > /dev/null
12-
@rm -rf dist
1313
@mkdir dist
1414
@echo "{\"remote_url\":\"${remote_url}\",\"last_commit_id\":\"${last_commit_id}\"}" > release_info.json
1515
@git archive -v -9 --format zip -o dist/${archive_file_name} HEAD
16+
@if [[ -d tests ]]; then \
17+
zip --delete dist/${archive_file_name} "tests/*"; \
18+
fi
1619
@zip -u dist/${archive_file_name} release_info.json
1720
@rm release_info.json
1821
@echo "[SUCCESS] Archiving plugin to dist/ folder: Done!"
1922

23+
dev: dist-clean
24+
@echo "[START] Archiving plugin to dist/ folder... (dev mode)"
25+
@cat plugin.json | json_pp > /dev/null
26+
@mkdir dist
27+
@zip -v -9 dist/${archive_file_name} -r . --exclude "tests/*" "env/*" ".git/*" ".pytest_cache/*"
28+
@echo "[SUCCESS] Archiving plugin to dist/ folder: Done!"
29+
2030
unit-tests:
21-
@echo "[START] Running unit tests..."
31+
@echo "Running unit tests..."
2232
@( \
23-
PYTHON_VERSION=`python3 -V 2>&1 | sed 's/[^0-9]*//g' | cut -c 1,2`; \
24-
PYTHON_VERSION_IS_CORRECT=`cat code-env/python/desc.json | python3 -c "import sys, json; print(str($$PYTHON_VERSION) in [x[-2:] for x in json.load(sys.stdin)['acceptedPythonInterpreters']]);"`; \
25-
if [ ! $$PYTHON_VERSION_IS_CORRECT ]; then echo "Python version $$PYTHON_VERSION is not in acceptedPythonInterpreters"; exit 1; fi; \
33+
PYTHON_VERSION=`python3 -c "import sys; print('PYTHON{}{}'.format(sys.version_info.major, sys.version_info.minor))"`; \
34+
PYTHON_VERSION_IS_CORRECT=`cat code-env/python/desc.json | python3 -c "import sys, json; print('$$PYTHON_VERSION' in json.load(sys.stdin)['acceptedPythonInterpreters']);"`; \
35+
if [ $$PYTHON_VERSION_IS_CORRECT == "False" ]; then echo "Python version $$PYTHON_VERSION is not in acceptedPythonInterpreters"; exit 1; else echo "Python version $$PYTHON_VERSION is in acceptedPythonInterpreters"; fi; \
2636
)
2737
@( \
38+
rm -rf ./env/; \
2839
python3 -m venv env/; \
2940
source env/bin/activate; \
30-
pip3 install --upgrade pip; \
31-
pip3 install --no-cache-dir -r tests/python/requirements.txt; \
32-
pip3 install --no-cache-dir -r code-env/python/spec/requirements.txt; \
41+
pip install --upgrade pip;\
42+
pip install --no-cache-dir -r tests/python/unit/requirements.txt; \
43+
pip install --no-cache-dir -r code-env/python/spec/requirements.txt; \
3344
export PYTHONPATH="$(PYTHONPATH):$(PWD)/python-lib"; \
34-
pytest -o junit_family=xunit2 --junitxml=unit.xml tests/python/unit || true; \
35-
deactivate; \
45+
pytest tests/python/unit --alluredir=tests/allure_report || ret=$$?; exit $$ret \
3646
)
37-
@echo "[SUCCESS] Running unit tests: Done!"
38-
39-
integration-tests:
40-
@echo "[START] Running integration tests..."
41-
# TODO add integration tests
42-
@echo "[SUCCESS] Running integration tests: Done!"
4347

44-
tests: unit-tests integration-tests
48+
tests: unit-tests
4549

4650
dist-clean:
4751
rm -rf dist

code-env/python/desc.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"acceptedPythonInterpreters": ["PYTHON36"],
2+
"acceptedPythonInterpreters": ["PYTHON36","PYTHON37","PYTHON38","PYTHON39","PYTHON310","PYTHON311"],
33
"forceConda": false,
44
"installCorePackages": true,
5-
"installJupyterSupport": false
6-
}
5+
"installJupyterSupport": false,
6+
"corePackagesSet":"AUTO"
7+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
openpyxl==3.0.5
2-
pathvalidate==2.3.0
2+
pathvalidate==2.3.0

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id" : "multisheet-excel-export",
3-
"version" : "1.0.1",
3+
"version" : "1.1.0",
44

55

66
"meta" : {

0 commit comments

Comments
 (0)