Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pip version of pytest github workflow #187

Merged
merged 9 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions .github/workflows/CI.yaml → .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI
name: Pytest

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# Existing codes likely still have "master" as the primary branch
# Both are tracked here to keep legacy and new codes working
push:
branches:
- "master"
Expand All @@ -12,15 +9,10 @@ on:
branches:
- "master"
- "main"
# schedule:
# # Nightly tests run on master by default:
# # Scheduled workflows run on the latest commit on the default or base branch.
# # (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
# - cron: "0 0 * * *"

jobs:
CI:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
pytest_conda:
name: Pytest (conda) on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -101,9 +93,32 @@ jobs:
#uses: ravsamhq/notify-slack-action@v1
uses: 8398a7/action-slack@v3
with:
job_name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
job_name: Pytest (conda) on ${{ matrix.os }}, Python ${{ matrix.python-version }}
fields: message,commit,author,workflow,job,took
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK}}
#MATRIX_CONTEXT: ${{ toJson(matrix) }} # required

pytest_pip:
name: Pytest (pip) on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install package
run: |
pip install -e .[dev]

- name: Run pytest
run: |
pytest -v
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ 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
27 changes: 0 additions & 27 deletions devtools/conda-envs/README.md

This file was deleted.

1 change: 0 additions & 1 deletion devtools/conda-envs/install_tensorflow_m1.sh

This file was deleted.

174 changes: 0 additions & 174 deletions devtools/conda-envs/mols_m1.yml

This file was deleted.

Loading