Skip to content

Commit

Permalink
Release 3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge Moreno committed Jul 17, 2024
1 parent 64f2624 commit 587cb5d
Show file tree
Hide file tree
Showing 151 changed files with 175,328 additions and 2,090 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: pydv-3.1.15 release_name: PyDV 3.1.15 draft: false
tag_name: pydv-3.4.3 release_name: PyDV 3.4.3 draft: false
prerelease: false
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@
.DS_Store
mypdv
dist
pydv/docs/_build*
docs/_build*
build
tests/output
tests/diff
tests/testSave.txt
out.txt
tests/labels2.txt
tests/convolution_plots
8 changes: 6 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
include: [component: $CI_SERVER_FQDN/lc-components/id_tokens/id_tokens-component@main]

stages:
- create_env
- run_tests
- run_rz_tests
- release
- deploy
- deploy_to_develop
Expand Down Expand Up @@ -33,7 +36,7 @@ stages:
.on_rz:
tags:
- shell
- rztopaz
- rzgenie

.on_scf:
tags:
Expand Down Expand Up @@ -110,7 +113,8 @@ run_tests_on_rz:
extends: [ .on_rz, .run_on_rz, .run_tests ]

run_rz_tests_on_rz:
stage: run_tests
stage: run_rz_tests
needs: [ run_tests_on_rz ]
extends: [ .on_rz, .run_on_rz, .run_rz_tests ]

release_on_rz:
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright (c) 2011-2023, Lawrence Livermore National Security, LLC.
Copyright (c) 2011-2024, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Edward Rusu, Sarah El-Jurf, Jorge Moreno
Written by Mason Kwiat, Douglas S. Miller, and Kevin Griffin, Ephraim Rusu, Sarah El-Jurf, Jorge Moreno
e-mail: [email protected], [email protected]
LLNL-CODE-507071
All rights reserved.
Expand Down
95 changes: 46 additions & 49 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
SHELL := /bin/bash

USER_WORKSPACE := $(if $(USER_WORKSPACE), $(USER_WORKSPACE),/usr/workspace/$(USER))
WORKSPACE = $(USER_WORKSPACE)/gitlab/weave/pydv
PYDV_ENV := $(if $(PYDV_ENV), $(PYDV_ENV),pydv_env)
PYDV_ENV := $(if $(PYDV_ENV),$(PYDV_ENV),$(HOME)/pydv_env)

PKG_REGISTRY_URL = $(CI_API_V4_URL)/projects/$(CI_PROJECT_ID)/packages/generic/archive
DEPLOY_PATH = /usr/gapps/pydv
Expand All @@ -12,84 +10,84 @@ RZ_GITLAB = "ssh://[email protected]:7999"
PROJECT = "weave/pydv.git"

RZ_TESTS_WORKDIR = /usr/gapps/pydv/wsc_tests_workdir
PYTHON_CMD = /usr/tce/bin/python3

define create_env
# call from the directory where env will be created
# arg1: name of env
$(PYTHON_CMD) -m venv $1
source $1/bin/activate &&
pip3 install --upgrade pip &&
pip3 install --force pytest &&
pip3 install numpy scipy matplotlib PySide2 &&
which pytest
WEAVE_DEVELOP_VENV = /usr/apps/weave/weave-develop-cpu
PYTHON_CMD = $(WEAVE_DEVELOP_VENV)/bin/python3

ifeq ($(SOURCE_ZONE),SCF)
WEAVE_DEPLOY_GROUP = sduser
else
WEAVE_DEPLOY_GROUP = llnl_emp
endif
SPACK_WEAVE_VIEW = /usr/workspace/$(WEAVE_DEPLOY_GROUP)/weave/repos/spack/spack_core_environment/0.20/$(LCSCHEDCLUSTER)/local/
ADD_PATH = $(SPACK_WEAVE_VIEW)/bin:$(WEAVE_DEVELOP_VENV)/bin
ADD_PYTHONPATH = $(SPACK_WEAVE_VIEW)/lib/python3.9/site-packages:$(WEAVE_DEVELOP_VENV)/lib/python3.9/site-packages

define do_create_env
source $(WEAVE_DEVELOP_VENV)/bin/activate && \
$(PYTHON_CMD) -m venv --system-site-packages $1 && \
deactivate
echo export PATH=$(PATH):$(ADD_PATH) >> $1/bin/activate
echo export PYTHONPATH=$(PYTHONPATH):$(ADD_PYTHONPATH) >> $1/bin/activate
source $1/bin/activate && \
which pytest && \
pip list
endef

define run_pydv_tests
# call from the top repository directory
# arg1: full path to venv
source $1/bin/activate && which pip && which pytest &&
if [ -z $(DISPLAY) ]; then
xvfb-run --auto-servernum pytest --capture=tee-sys -v tests/;
else
pytest --capture=tee-sys -v tests/;
source $1/bin/activate && which pip && which pytest && \
if [ -z $(DISPLAY) ]; then \
xvfb-run --auto-servernum pytest --capture=tee-sys -v tests/; \
else \
pytest --capture=tee-sys -v tests/; \
fi
endef

define do_run_rz_tests
cd $(RZ_TESTS_WORKDIR) && rm -rf pydv &&
/usr/tce/bin/git clone -b $(CI_COMMIT_BRANCH) $(RZ_GITLAB)/$(PROJECT) &&
chgrp -R weavedev pydv && cd pydv &&
$(call create_env,$(PYDV_ENV)) &&
cd tests && ln -s /usr/gapps/pydv/dev/tests/wsc_tests . && cd .. &&
$(call run_pydv_tests,$(RZ_TESTS_WORKDIR)/pydv/$(PYDV_ENV)) &&
source $(RZ_TESTS_WORKDIR)/pydv/$(PYDV_ENV)/bin/activate &&
if [ -z $(DISPLAY) ]; then
xvfb-run --auto-servernum python3 -m pytest tests/wsc_tests/test_*py
else
python3 -m pytest -v tests/wsc_tests/test_*py
# arg1: full path to venv
source $1/bin/activate && pip list && pwd
cd tests && ln -s /usr/gapps/pydv/dev/tests/wsc_tests . && cd ..
if [ -z $(DISPLAY) ]; then \
xvfb-run --auto-servernum python3 -m pytest tests/wsc_tests/test_*py; \
else \
python3 -m pytest -v tests/wsc_tests/test_*py; \
fi
endef

.PHONY: create_env
create_env:
@echo "Create venv for running pydv...$(WORKSPACE)";
@[ -d $(WORKSPACE) ] || mkdir -p $(WORKSPACE);
cd $(WORKSPACE);
if [ -d $(PYDV_ENV) ]; then \
rm -rf $(PYDV_ENV); \
fi;
$(call create_env,$(PYDV_ENV))
$(call do_create_env,$(PYDV_ENV))


.PHONY: run_tests
run_tests:
@echo "Run tests...";
$(call run_pydv_tests,$(WORKSPACE)/$(PYDV_ENV))
$(call run_pydv_tests,$(PYDV_ENV))


.PHONY: run_rz_tests
.ONESHELL:
run_rz_tests:
@echo "Run RZ tests...RZ_TESTS_WORKDIR: $(RZ_TESTS_WORKDIR)";
xsu weaveci -c "umask 007 && sg weavedev -c '$(call do_run_rz_tests)'"
echo "Run RZ tests...RZ_TESTS_WORKDIR: $(RZ_TESTS_WORKDIR)"
$(call do_run_rz_tests,$(PYDV_ENV))


.PHONY: release
release:
@echo "...create a release....TAG: $(CI_COMMIT_TAG), PKG_REGISTRY_URL: $(PKG_REGISTRY_URL)"; \
$(eval TAG=$(shell echo $(CI_COMMIT_TAG) | sed -e "s/^pydv-//"))
$(eval TAG=$(shell echo $(CI_COMMIT_TAG) | sed -e "s/^pydv-//")) \
env; \
$(CI_UTILS)/bin/release-cli create --name "PyDV $(CI_COMMIT_TAG)" --tag-name $(CI_COMMIT_TAG); \
tar -cvf $(TAG).tar pydv; \
tar -cvf $(TAG).tar pydv docs; \
ls; \
gzip $(TAG).tar; \
curl --header "JOB-TOKEN: $(CI_JOB_TOKEN)" --upload-file $(TAG).tar.gz $(PKG_REGISTRY_URL)/$(CI_COMMIT_TAG)/$(TAG).tar.gz

.PHONY: deploy
.ONESHELL:
deploy:
@echo "...deploy...only run from CI... "; \
@echo "...deploy...only run from CI... ";
$(eval TAG=$(shell echo $(CI_COMMIT_TAG) | sed -e "s/^pydv-//"))
wget --header="JOB-TOKEN:$(CI_JOB_TOKEN)" $(PKG_REGISTRY_URL)/$(CI_COMMIT_TAG)/$(TAG).tar.gz -O $(TAG).tar.gz
give weaveci $(TAG).tar.gz
Expand All @@ -102,10 +100,10 @@ deploy:
tar -xvf $(TAG).tar
rm $(TAG).tar
mv pydv $(TAG)
mv docs $(TAG)
chmod -R 750 $(TAG)
rm -f current
ln -s $(TAG) current
sed -i 's|python|$(PYTHON_CMD)|' $(TAG)/pdv
AS_WEAVECI_USER


Expand All @@ -114,20 +112,19 @@ deploy:
deploy_to_develop:
$(eval VERSION=`cat $(CI_PROJECT_DIR)/pydv/scripts/version.txt`)
echo "...deploy_to_develop...VERSION: $(VERSION)"
cd pydv && if [ -d __pycache__ ]; then rm -rf __pycache__; fi
if [ -f $(VERSION).tar.gz ]; then rm -f $(VERSION).tar.gz; fi
tar -cvf $(VERSION).tar * && gzip $(VERSION).tar
cd pydv && rm -rf __pycache__
rm -f $(VERSION).tar.gz
tar -cvf $(VERSION).tar * ../docs && gzip $(VERSION).tar
give --force weaveci $(VERSION).tar.gz
$(eval GIVE_USER=$(shell echo ${USER}))
xsu weaveci -c "sg us_cit" <<AS_WEAVECI_USER
umask 027
cd $(DEPLOY_PATH)
if [ ! -d $(DEPLOY_PATH)/develop ]; then mkdir -p $(DEPLOY_PATH)/develop; fi
mkdir -p $(DEPLOY_PATH)/develop
cd $(DEPLOY_PATH)/develop
take $(GIVE_USER) -f
gunzip $(VERSION).tar.gz
tar -xvf $(VERSION).tar && rm $(VERSION).tar
cd .. && chmod -R 750 develop
sed -i 's|python|$(PYTHON_CMD)|' develop/pdv
AS_WEAVECI_USER

File renamed without changes.
Loading

0 comments on commit 587cb5d

Please sign in to comment.