Skip to content

Commit

Permalink
Merge pull request #190 from hjkgrp/pytest-pip
Browse files Browse the repository at this point in the history
Publish to PyPI
  • Loading branch information
gianmarco-terrones authored Nov 11, 2023
2 parents 4e6d826 + a82ef6f commit bf6d80c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 20 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,37 @@ jobs:
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/molSimplify
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/molSimplify

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
Expand Down
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,36 @@ molSimplify is an open source toolkit for the automated, first-principles screen

## Installation

### via pip, from PyPI

Starting with version `1.7.4` molSimplify is available on [PyPI](https://pypi.org) enabled by the [openbabel-wheel](https://pypi.org/project/openbabel-wheel/) project.

```bash
pip install molSimplify
```

### via pip, from GitHub

To obtain the latest development version or if you plan to modify the code we recommend installation from GitHub.

1. Clone molSimplify source from github and change into the directory.

```bash
git clone https://github.com/hjkgrp/molSimplify.git
cd molSimplify
```
2. Locally install the molSimplify package using pip.
```bash
pip install -e .[dev]
```
3. To test your installation, you can run the command below at the root directory of molSimplify. You are good to go if all the tests are passed! Note, some test will be skipped because none of the optional dependencies are installed this way.
```bash
pytest
```

### via conda, from GitHub
We currently recommend installation via the [Conda](https://conda.io/docs/) package management system.

The easiest way of installing molSimplify including optional dependencies such as [xtb](https://github.com/grimme-lab/xtb) is via the [Conda](https://conda.io/docs/) package management system.
1. Prerequisite: have [Anaconda or miniconda](https://www.anaconda.com/distribution/) installed on your system. **For M1 Macs, please use [Miniforge](https://github.com/conda-forge/miniforge) for Mac OSX arm64.** (We do not recommend simultaneously installing Anaconda and Miniforge - only install Miniforge.)

2. Clone molSimplify source from github and change into the directory.
Expand Down Expand Up @@ -40,22 +68,6 @@ We currently recommend installation via the [Conda](https://conda.io/docs/) pack
### via conda, from Anaconda
Releases of molSimplify are also available on Anaconda on the [conda-forge channel](https://anaconda.org/conda-forge/molsimplify) and the [hjkgroup channel](https://anaconda.org/hjkgroup/molsimplify).

### via pip, from GitHub
1. Clone molSimplify source from github and change into the directory.

```bash
git clone https://github.com/hjkgrp/molSimplify.git
cd molSimplify
```
2. Locally install the molSimplify package using pip.
```bash
pip install -e .[dev]
```
3. To test your installation, you can run the command below at the root directory of molSimplify. You are good to go if all the tests are passed! Note, some test will be skipped because none of the optional dependencies are installed this way.
```bash
pytest
```

### via docker
We also maintain an active [docker image on dockerhub](https://hub.docker.com/repository/docker/hjkgroup/molsimplify) for plug-and-play use.

Expand Down

0 comments on commit bf6d80c

Please sign in to comment.