From d33a4e47f5e037e577236062db3a7a6d8b1cca59 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Thu, 23 May 2024 10:52:36 -0400 Subject: [PATCH] Internal fix for creating Docker image. --- HISTORY.rst | 2 ++ Makefile | 28 +++++++++++++++++----------- devtools/docker/Dockerfile | 4 ++-- devtools/docker/environment.yml | 8 -------- psi4_step/data/seamm-psi4.yml | 4 ++-- 5 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 devtools/docker/environment.yml diff --git a/HISTORY.rst b/HISTORY.rst index 1aa5756..43ef798 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,8 @@ ======= History ======= +2024.5.23.1 -- Internal fix for creating Docker image. + 2024.5.23 -- Added standard energy and gradients to results * Added 'energy' and 'gradients' to optional results to support e.g. Energy Scan * Fixed crashing bug in description of the Energy substep. diff --git a/Makefile b/Makefile index c1e193c..eef45d0 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ MODULE := psi4_step .PHONY: help clean clean-build clean-docs clean-pyc clean-test lint format typing test .PHONY: dependencies test-all coverage html docs servedocs release check-release -.PHONY: dist install uninstall +.PHONY: dist install uninstall image uninstall-image .DEFAULT_GOAL := help + define BROWSER_PYSCRIPT import os, webbrowser, sys try: @@ -12,6 +13,7 @@ except: webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) endef + export BROWSER_PYSCRIPT define PRINT_HELP_PYSCRIPT @@ -23,7 +25,9 @@ for line in sys.stdin: target, help = match.groups() print("%-20s %s" % (target, help)) endef + export PRINT_HELP_PYSCRIPT + BROWSER := python -c "$$BROWSER_PYSCRIPT" help: @@ -59,20 +63,16 @@ format: ## reformat with with yapf and isort black --extend-exclude '_version.py' $(MODULE) tests test: ## run tests quickly with the default Python - pytest tests/ + pytest --doctest-modules tests $(MODULE) -coverage: ## check code coverage quickly with the default Python - pytest -v --cov=$(MODULE) --cov-report term --color=yes tests/ +dependencies: + pur -r requirements_dev.txt + pip install -r requirements_dev.txt -coverage-html: ## check code coverage quickly with the default Python, showing as html - pytest -v --cov=$(MODULE) --cov-report=html:htmlcov --cov-report term --color=yes tests/ +coverage: clean-test ## check code coverage quickly with the default Python + pytest -v --doctest-modules --cov=$(MODULE) --cov-report=html tests/ $(MODULE) $(BROWSER) htmlcov/index.html -clean-docs: ## remove files associated with building the docs - rm -f docs/api/$(MODULE).rst - rm -f docs/api/modules.rst - $(MAKE) -C docs clean - html: clean-docs ## generate Sphinx HTML documentation, including API docs sphinx-apidoc -o docs/api $(MODULE) $(MAKE) -C docs html @@ -100,3 +100,9 @@ install: uninstall ## install the package to the active Python's site-packages uninstall: clean ## uninstall the package pip uninstall --yes $(MODULE) + +image: uninstall-image ## Make the Docker image + docker image build --progress plain --file devtools/docker/Dockerfile --tag ghcr.io/molssi-seamm/seamm-psi4:latest . + +uninstall-image: ## Remove the docker image + docker image rm --force ghcr.io/molssi-seamm/seamm-psi4:latest diff --git a/devtools/docker/Dockerfile b/devtools/docker/Dockerfile index 44bc8be..a2d4e73 100644 --- a/devtools/docker/Dockerfile +++ b/devtools/docker/Dockerfile @@ -1,8 +1,8 @@ FROM molssi/mamba141 -COPY ./environment.yml /root/environment.yml +COPY ./psi4_step/data/seamm-psi4.yml /root/environment.yml RUN mamba env update -f /root/environment.yml WORKDIR /home -CMD ["psi4", "mopac.dat"] +CMD ["psi4"] diff --git a/devtools/docker/environment.yml b/devtools/docker/environment.yml deleted file mode 100644 index ef4dcdb..0000000 --- a/devtools/docker/environment.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: base -channels: - - conda-forge/linux-64 -dependencies: - - python - - geometric - - psi4 - diff --git a/psi4_step/data/seamm-psi4.yml b/psi4_step/data/seamm-psi4.yml index bfc3749..ce0b0ce 100644 --- a/psi4_step/data/seamm-psi4.yml +++ b/psi4_step/data/seamm-psi4.yml @@ -3,8 +3,8 @@ channels: - conda-forge - conda-forge/label/libint_dev dependencies: - - geometric - python + # Executables, etc. + - geometric - psi4 -# - psi4-rt