diff --git a/.github/workflows/fragit_with_conda.yml b/.github/workflows/fragit_with_conda.yml new file mode 100644 index 0000000..55f671f --- /dev/null +++ b/.github/workflows/fragit_with_conda.yml @@ -0,0 +1,29 @@ +name: FragIt with Conda + +on: [push] + +jobs: + 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"] + steps: + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: fragit + environment-file: environment.yml + python-version: ${{ matrix.python-version }} + - name: Conda Information + run: | + conda info + conda list + - name: Run Testsuite + run: + pytest . + diff --git a/.github/workflows/python-app.yml b/.github/workflows/fragit_with_openbabel_build.yml similarity index 83% rename from .github/workflows/python-app.yml rename to .github/workflows/fragit_with_openbabel_build.yml index 3f57d33..7c1ee8e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/fragit_with_openbabel_build.yml @@ -1,14 +1,14 @@ -name: FragIt Tests +name: FragIt with OpenBabel Build on: [push] jobs: build: - + name: Testing 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 - run: python -m pytest tests/*.py + - name: Run Testsuite + run: pytest . diff --git a/CHANGES.md b/CHANGES.md index 7be0ea6..4c0a6e8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,22 @@ +FragIt v1.9.1 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 f45ffd2..2faa97b 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 +s +## Installing FragIt in a Conda Environment With Pip +The easiest installation option is to use conda and pip. +We have supplied an `environment.yml` file for you to use. +Simply run -FragIt is a python library and installation is quite straight forward + cd fragit-main + conda env create -f environment.yml - python setup.py install +which creates an environment called fragit. +After activating the `fragit` environment + + conda activate fragit + +you can install fragit using `pip` with the following command -to install it in the default locations. To install it in a custom location, you can run the following + pip install . - python setup.py install --prefix=/path/to/custom/installation +## 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 -Remember to add the installation paths to your environment variables: + pip install . --user - export PATH=/path/to/custom/installation/bin:$PATH - export PYTHONPATH=/path/to/custom/installation/lib/python2.7/site-packages:$PYTHONPATH +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..a9f0c47 --- /dev/null +++ b/environment.yml @@ -0,0 +1,8 @@ +name: fragit +channels: + - conda-forge + - defaults +dependencies: + - pytest + - numpy + - openbabel 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.