From c8931f7f93a4588a94cf263f62c4b4f24339b9f2 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Mon, 13 Nov 2023 15:30:39 +0100 Subject: [PATCH 01/14] Prepare CHANGES.md for next version --- CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 7be0ea6..a622c32 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +FragIt v1.X.X Release Notes +=========================== + +Updates since v1.9.0 + FragIt v1.9.0 Release Notes =========================== From 0d4b40dd7dfa2188c37eb110d2562acb6b54b815 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 16:19:34 +0100 Subject: [PATCH 02/14] Update installation instructions. --- ....yml => test_explicit_openbabel_build.yml} | 7 ++-- README.md | 42 ++++++++++++++----- environment.yml | 9 ++++ 3 files changed, 44 insertions(+), 14 deletions(-) rename .github/workflows/{python-app.yml => test_explicit_openbabel_build.yml} (86%) create mode 100644 environment.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/test_explicit_openbabel_build.yml similarity index 86% rename from .github/workflows/python-app.yml rename to .github/workflows/test_explicit_openbabel_build.yml index 3f57d33..e2ff7cc 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/test_explicit_openbabel_build.yml @@ -1,4 +1,4 @@ -name: FragIt Tests +name: FragIt with OpenBabel build on: [push] @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -41,7 +41,6 @@ jobs: cd openbabel_build sudo make install - # You can test your matrix by printing the current Python version - - name: Display Python version + - name: Run Tests run: python -m pytest tests/*.py diff --git a/README.md b/README.md index f45ffd2..5fb25b0 100644 --- a/README.md +++ b/README.md @@ -11,23 +11,45 @@ Currently, FragIt supports the [fragment molecular orbital](http://en.wikipedia. ## Obtaining FragIt Since you found this file, it is obvious that you also found the source code. You can obtain the latest version from [github](https://www.github.com/FragIt/fragit-main) where [tagged releases](https://github.com/FragIt/fragit-main/releases) are also available. +You get the source code by cloning the repository -## Installing FragIt + git clone https://github.com/FragIt/fragit-main.git -FragIt is a python library and installation is quite straight forward +## Installing FragIt in a Conda Environment With Pip +The easiest installation option is to use Conda. +We have supplied an `environment.yml` file for you to use. +Simply run - python setup.py install + cd fragit-main + conda env create -f environment.yml + +which creates an environment called fragit. +After activating the `fragit` environment + + conda activate fragit -to install it in the default locations. To install it in a custom location, you can run the following +you can install fragit using `pip` with the following command - python setup.py install --prefix=/path/to/custom/installation + pip install . -Remember to add the installation paths to your environment variables: +## Installing FragIt Without Conda +Without conda, the installation of FragIt becomes slightly more +tedious and of course system dependent. +If you have root access, you can install all dependencies using +the system package manager, but if you don't, then you have to +install OpenBabel manually +(Github user [andersx](https://github.com/andersx) [wrote a guide](http://combichem.blogspot.dk/2013/12/compiling-open-babel-with-python.html) to how that is accomplished.) +Finally, the recommended installation method for FragIt is to use pip again - export PATH=/path/to/custom/installation/bin:$PATH - export PYTHONPATH=/path/to/custom/installation/lib/python2.7/site-packages:$PYTHONPATH + pip install . --user + +but it is also possible using the old school approach (deprecated and not recommended) + + python setup.py build + python setup.py install -shown here for a python 2.7 installation example. +remember to make sure that environment variables (`PATH` and `PYTHONPATH` at least!) are +set up correctly or else FragIt will complain that it cannot find itself. ## Running FragIt @@ -44,6 +66,6 @@ See the [wiki](https://www.github.com/FragIt/fragit-main/wiki) for more examples In order to run FragIt, you *need* the following installed on your system: * The FragIt source code, look above for information on how to obtain it -* [Open Babel](http://www.openbabel.org) 2.3 or newer with [python language bindings](http://openbabel.org/docs/dev/Installation/install.html#compile-language-bindings) enabled. Github user [andersx](https://github.com/andersx) [wrote a guide](http://combichem.blogspot.dk/2013/12/compiling-open-babel-with-python.html) to how that is accomplished. +* [Open Babel](http://www.openbabel.org) 3 or newer with [python language bindings](http://openbabel.org/docs/dev/Installation/install.html#compile-language-bindings) enabled. * [Numpy](http://numpy.scipy.org) 1.5 or newer. * [Python](http://www.python.org) 3.9 (or later). diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..6262642 --- /dev/null +++ b/environment.yml @@ -0,0 +1,9 @@ +name: fragit +channels: + - conda-forge + - defaults +dependencies: + - python + - pytest + - numpy + - openbabel From ef31ee2c2afb7d5269e1991737d0c0b15e61c080 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 16:30:12 +0100 Subject: [PATCH 03/14] First attempt at conda based testing --- .github/workflows/test_conda.yml | 24 ++++++++++++++++++++++++ environment.yml | 9 +++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/test_conda.yml create mode 100644 environment.yml diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml new file mode 100644 index 0000000..9207d68 --- /dev/null +++ b/.github/workflows/test_conda.yml @@ -0,0 +1,24 @@ +name: FragIt Conda Tests + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v2 + with: + environment-file: environment.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false + activate-environment: fragit + + - name: Run Tests + run: python -m pytest tests/*.py + diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..6262642 --- /dev/null +++ b/environment.yml @@ -0,0 +1,9 @@ +name: fragit +channels: + - conda-forge + - defaults +dependencies: + - python + - pytest + - numpy + - openbabel From a237abc055702d1c86ae4d0a97fcf527a5456083 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 16:35:04 +0100 Subject: [PATCH 04/14] fixes pytest call --- .github/workflows/test_conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index 9207d68..bd4110c 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -20,5 +20,5 @@ jobs: activate-environment: fragit - name: Run Tests - run: python -m pytest tests/*.py + run: pytest . From 1ddbd1d227d686d45f0981e9c593ac9924cdca96 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 16:42:00 +0100 Subject: [PATCH 05/14] changes the testing with conda. --- .github/workflows/test_conda.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index bd4110c..2c2081f 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -18,7 +18,9 @@ jobs: python-version: ${{ matrix.python-version }} auto-activate-base: false activate-environment: fragit - - - name: Run Tests - run: pytest . + - run: | + conda info + conda list + - run: + pytest . From 4fc5ffe978ebdf18373cac5ff9863277357b36d4 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 16:50:14 +0100 Subject: [PATCH 06/14] attempt to actually install environment packages --- .github/workflows/test_conda.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index 2c2081f..5234f09 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -14,10 +14,9 @@ jobs: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v2 with: + activate-environment: fragit environment-file: environment.yml python-version: ${{ matrix.python-version }} - auto-activate-base: false - activate-environment: fragit - run: | conda info conda list From 2aa0c4f1fa64b2014166ad483a8ecf8a977b6dea Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 16:54:38 +0100 Subject: [PATCH 07/14] ignore creating custom environment --- .github/workflows/test_conda.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index 5234f09..55dd920 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -14,7 +14,6 @@ jobs: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v2 with: - activate-environment: fragit environment-file: environment.yml python-version: ${{ matrix.python-version }} - run: | From cd9719814f9f97c5b360f56ed3c5aaccf4217ab3 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 17:00:34 +0100 Subject: [PATCH 08/14] attempt to manually activate test environment --- .github/workflows/test_conda.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index 55dd920..e5fae08 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -17,8 +17,10 @@ jobs: environment-file: environment.yml python-version: ${{ matrix.python-version }} - run: | + conda activate test conda info conda list - run: + conda activate test pytest . From 0ff85ae3674a27f7b9ab48a2bcf72e8effe141b8 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 17:05:11 +0100 Subject: [PATCH 09/14] unclear what environment we are using --- .github/workflows/test_conda.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index e5fae08..7323756 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -17,10 +17,9 @@ jobs: environment-file: environment.yml python-version: ${{ matrix.python-version }} - run: | - conda activate test + conda env list conda info conda list - run: - conda activate test pytest . From 12d19777546d2e6a70cbcfa1b2d985f0ed8317d4 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 19:45:21 +0100 Subject: [PATCH 10/14] reworked the .yml file --- .github/workflows/test_conda.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index 7323756..0b03822 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -3,23 +3,28 @@ name: FragIt Conda Tests on: [push] jobs: - build: - + test: + name: Testing runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] - + python-version: ["3.9"] #, "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v2 with: + activate-environment: fragit environment-file: environment.yml python-version: ${{ matrix.python-version }} - - run: | + - name: Conda Informaiton + run: | conda env list conda info conda list - - run: + - name: Test + run: pytest . From d6c5a8099d998b6f5f0bec1e6f08e40f8cb841d4 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 19:47:31 +0100 Subject: [PATCH 11/14] remove default python - other packages will include it. --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index 6262642..a9f0c47 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,6 @@ channels: - conda-forge - defaults dependencies: - - python - pytest - numpy - openbabel From 9b65397593bf040bfd1786bef36da88a70ccd873 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 19:50:49 +0100 Subject: [PATCH 12/14] Conda testing with github action works. --- .github/workflows/test_conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/test_conda.yml index 0b03822..3400e6e 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/test_conda.yml @@ -11,7 +11,7 @@ jobs: shell: bash -l {0} strategy: matrix: - python-version: ["3.9"] #, "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v2 From fe103c84a36300d9780aaa25fcf2a4ac8c0c7649 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Thu, 16 Nov 2023 22:12:27 +0100 Subject: [PATCH 13/14] Updates installation instructions. Fixes #38. Also includes github actions updates --- .../{test_conda.yml => fragit_with_conda.yml} | 7 +++---- ...l_build.yml => fragit_with_openbabel_build.yml} | 8 ++++---- CHANGES.md | 14 ++++++++++++++ README.md | 4 ++-- 4 files changed, 23 insertions(+), 10 deletions(-) rename .github/workflows/{test_conda.yml => fragit_with_conda.yml} (84%) rename .github/workflows/{test_explicit_openbabel_build.yml => fragit_with_openbabel_build.yml} (91%) diff --git a/.github/workflows/test_conda.yml b/.github/workflows/fragit_with_conda.yml similarity index 84% rename from .github/workflows/test_conda.yml rename to .github/workflows/fragit_with_conda.yml index 3400e6e..55f671f 100644 --- a/.github/workflows/test_conda.yml +++ b/.github/workflows/fragit_with_conda.yml @@ -1,4 +1,4 @@ -name: FragIt Conda Tests +name: FragIt with Conda on: [push] @@ -19,12 +19,11 @@ jobs: activate-environment: fragit environment-file: environment.yml python-version: ${{ matrix.python-version }} - - name: Conda Informaiton + - name: Conda Information run: | - conda env list conda info conda list - - name: Test + - name: Run Testsuite run: pytest . diff --git a/.github/workflows/test_explicit_openbabel_build.yml b/.github/workflows/fragit_with_openbabel_build.yml similarity index 91% rename from .github/workflows/test_explicit_openbabel_build.yml rename to .github/workflows/fragit_with_openbabel_build.yml index e2ff7cc..7c1ee8e 100644 --- a/.github/workflows/test_explicit_openbabel_build.yml +++ b/.github/workflows/fragit_with_openbabel_build.yml @@ -1,10 +1,10 @@ -name: FragIt with OpenBabel build +name: FragIt with OpenBabel Build on: [push] jobs: build: - + name: Testing runs-on: ubuntu-latest strategy: matrix: @@ -41,6 +41,6 @@ jobs: cd openbabel_build sudo make install - - name: Run Tests - run: python -m pytest tests/*.py + - name: Run Testsuite + run: pytest . diff --git a/CHANGES.md b/CHANGES.md index a622c32..d015f45 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,22 @@ FragIt v1.X.X Release Notes =========================== +This is a minor improvement release. + Updates since v1.9.0 + * Documentation on installation is now up to date and + is fixed (Issue #38) + -- thanks to Anthony Nash for pointing + out the obsolete instructions. + + See the README file for updated installation + instructions. + + * Github actions now cover both the new installation + approach with conda and pip as well as the old + school approach with compilation of OpenBabel + FragIt v1.9.0 Release Notes =========================== diff --git a/README.md b/README.md index 5fb25b0..2faa97b 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Since you found this file, it is obvious that you also found the source code. Yo You get the source code by cloning the repository git clone https://github.com/FragIt/fragit-main.git - +s ## Installing FragIt in a Conda Environment With Pip -The easiest installation option is to use Conda. +The easiest installation option is to use conda and pip. We have supplied an `environment.yml` file for you to use. Simply run From 9df822e86ac2d628243841206589f80938971a54 Mon Sep 17 00:00:00 2001 From: Casper Steinmann Date: Sat, 2 Dec 2023 22:43:21 +0100 Subject: [PATCH 14/14] prepare for fragit 1.9.1 release --- CHANGES.md | 2 +- fragit/strings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d015f45..4c0a6e8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -FragIt v1.X.X Release Notes +FragIt v1.9.1 Release Notes =========================== This is a minor improvement release. diff --git a/fragit/strings.py b/fragit/strings.py index 2ca9ad9..9f55df4 100644 --- a/fragit/strings.py +++ b/fragit/strings.py @@ -2,7 +2,7 @@ Copyright (C) 2011-2023 Casper Steinmann """ -version = ("1", "9", "0") +version = ("1", "9", "1") version_str = ".".join(version) doc_str = """FragIt is a tool to fragment large molecules for use in fragment based quantum chemistry methods.