diff --git a/README.rst b/README.rst index 578dae4e..74294e81 100644 --- a/README.rst +++ b/README.rst @@ -3,13 +3,13 @@ ChemPy .. image:: https://github.com/bjodah/chempy/actions/workflows/lint_python.yml/badge.svg :target: https://github.com/bjodah/chempy/actions/workflows/lint_python.yml - :alt: Build status + :alt: Github Actions CI status +.. image:: https://hackspett.bjodah.se/api/badges/1/status.svg + :target: https://hackspett.bjodah.se/repos/1 + :alt: Woodpecker CI status .. image:: https://img.shields.io/pypi/v/chempy.svg :target: https://pypi.python.org/pypi/chempy :alt: PyPI version -.. image:: https://img.shields.io/badge/python-3.8,3.9-blue.svg - :target: https://www.python.org/ - :alt: Python version .. image:: https://img.shields.io/pypi/l/chempy.svg :target: https://github.com/bjodah/chempy/blob/master/LICENSE :alt: License @@ -374,16 +374,6 @@ literature with relevance in chemistry. Here is how you use one of these formula [H2O] = 55.18 M (at 35 °C) -Run notebooks using binder -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Using only a web-browser (and an internet connection) it is possible to explore the -notebooks here: (by the courtesy of the people behind mybinder) - -.. image:: http://mybinder.org/badge.svg - :target: https://mybinder.org/v2/gh/bjodah/chempy/f5f2546e79e165ba8fb258fc87d83a7fbdcbad64?filepath=index.ipynb - :alt: Binder - - Citing ------ If you make use of ChemPy in e.g. academic work you may cite the following peer-reviewed publication: diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml deleted file mode 100644 index 3b25a680..00000000 --- a/conda-recipe/meta.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{% set name = "chempy" %} -{% set version = "0.8.0.dev0+git" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - git_url: ../ - -build: - noarch: python - number: 0 - script: python -m pip install --no-deps --ignore-installed . - -requirements: - build: - - python - - setuptools - run: - - python - - numpy >=1.11.3 - - scipy >=1.0.1 - - matplotlib >=2.2.3 - - sympy >=1.1.1,!=1.2 - - quantities >=0.12.1 - - pulp >=1.6.8 - - pyneqsys >=0.5.4 - - pyodesys >=0.12.5 - - pyparsing >=2.0.3 - - sym >=0.3.4 - - notebook - - nbconvert - -test: - imports: - - {{ name }} - - {{ name }}.kinetics - - {{ name }}.printing - - {{ name }}.properties - - {{ name }}.thermodynamics - - {{ name }}.util - requires: - - pytest - -about: - home: https://github.com/bjodah/{{ name }} - license: BSD 2-Clause - license_file: LICENSE - summary: 'Python package useful for (physical) chemistry' - doc_url: https://bjodah.github.io/{{ name }}/latest - -extra: - recipe-maintainers: - - bjodah diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh deleted file mode 100644 index b03a2a13..00000000 --- a/conda-recipe/run_test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -echo "Running chempy tests with environment variables for the compiler pointing to prefix ..." -set -x -CPLUS_INCLUDE_PATH=$PREFIX/include LIBRARY_PATH=$PREFIX/lib LD_LIBRARY_PATH=$PREFIX/lib MPLBACKEND=agg LLAPACK=openblas python -m pytest --verbose -ra --pyargs chempy diff --git a/environment.yml b/environment.yml deleted file mode 100644 index b63a8fb5..00000000 --- a/environment.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: chempy -channels: - - bjodah - - conda-forge - - defaults -dependencies: - - python >=3.5 - - pytest - - setuptools - - numpy >1.7 - - scipy >=0.16.1 - - matplotlib >=1.3.1 - - sympy >=1.1.1 - - quantities >=0.12.1 - - pyneqsys >=0.4.4 - - pyodesys >=0.11.6 - - pycompilation >=0.4.3 - - pycodeexport >=0.1.1 - - pycvodes >=0.9.1 - - pygslodeiv2 >=0.8.0 - - pyodeint >=0.9.0 - - pykinsol >=0.1.2 - - pyparsing >=2.0.3 - - sym >=0.3.0 - - notebook - - nbconvert - - graphviz diff --git a/scripts/environment/Dockerfile b/scripts/environment/Dockerfile index aa4145fc..aa55f98e 100644 --- a/scripts/environment/Dockerfile +++ b/scripts/environment/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye +FROM docker.io/debian:bullseye MAINTAINER Björn Dahlgren @@ -29,6 +29,7 @@ RUN mkdir /tmp/sundials-5.5.0-build && \ cmake --build /tmp/sundials-5.5.0-build --target install && \ rm -r /tmp/sundials-5.5.0*/ && \ python3 -m pip install --upgrade-strategy=eager --upgrade pip && \ + python3 -m pip install --upgrade-strategy=eager numpy cython setuptools && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/scripts/host-jupyter-using-docker.sh b/scripts/host-jupyter-using-docker.sh index 6e38493a..b419f5fa 100755 --- a/scripts/host-jupyter-using-docker.sh +++ b/scripts/host-jupyter-using-docker.sh @@ -1,6 +1,6 @@ #!/bin/bash -ue # -# This script requires that Docker is installed. +# This script requires that Docker (or podman) is installed. # # Arguments: mount-path, port-number, Dockerfile-path # @@ -22,11 +22,27 @@ if [[ "${HOST_USER}" == root ]]; then >&2 echo "Need another user name than root (pip will fail)" exit 1 fi + +if which podman; then + PODMAN=podman +elif which docker; then + if groups | grep docker; then + PODMAN=docker + else + PODMAN="sudo docker" + fi +else + >&2 echo "Neither podman nor docker found on \$PATH" + exit 1 +fi + if [[ "$MOUNT" == .* ]]; then MOUNT="$(pwd)/$MOUNT" fi + + if [[ "$DOCKERIMAGE" == ./* ]]; then - DOCKERIMAGE=$(sudo docker build $DOCKERIMAGE | tee /dev/tty | tail -1 | cut -d' ' -f3) + DOCKERIMAGE=$($PODMAN build $DOCKERIMAGE | tee /dev/tty | tail -1 | cut -d' ' -f3) fi if [[ "$PORT" == "0" ]]; then LOCALCMD="pytest -sv -ra --pyargs $PKG" @@ -40,7 +56,14 @@ useradd --uid \$HOST_UID --gid \$HOST_GID --home /mount \$HOST_WHOAMI; \ sudo --login -u \$HOST_WHOAMI PYCVODES_NO_LAPACK=1 PYCVODES_NO_KLU=1 python3 -m pip install --user -e .[all]; \ sudo --login -u \$HOST_WHOAMI /mount/.local/bin/jupyter-nbextension enable --user --py widgetsnbextension; \ sudo --login -u \$HOST_WHOAMI LD_LIBRARY_PATH=/usr/local/lib MPLBACKEND=Agg /mount/.local/bin/$LOCALCMD" + set -x -sudo docker run --rm --name "${PKG}_nb_${PORT}" $PORTFWD \ - -e HOST_WHOAMI=${HOST_USER} -e HOST_UID=$(id -u ${HOST_USER}) -e HOST_GID=$(id -g ${HOST_USER})\ - -v $MOUNT:/mount -w /mount -it $DOCKERIMAGE /bin/bash -x -c "$MYCMD" + + +$PODMAN run \ + --rm \ + --name "${PKG}_nb_${PORT}" $PORTFWD \ + -e HOST_WHOAMI=${HOST_USER} \ + -e HOST_UID=$(id -u ${HOST_USER}) \ + -e HOST_GID=$(id -g ${HOST_USER}) \ + -v $MOUNT:/mount -w /mount -it $DOCKERIMAGE /bin/bash -x -c "$MYCMD"