Skip to content

Commit

Permalink
adding automatic publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpastor97 committed Jun 1, 2022
1 parent 74c8e58 commit 15f6e22
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 27 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build distribution

on: [push, pull_request]

jobs:
test:
runs-on: "ubuntu-latest"

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install build dependencies
run: python -m pip install build wheel

- name: Build distributions
shell: bash -l {0}
run: python setup.py sdist bdist_wheel

- name: Publish package to PyPI
if: github.repository == 'ProLint/ufcc' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
34 changes: 14 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Ultra-Fast Contacts Calculation (UFCC)
=====================================

[//]: # (Badges)
[![PyPI](https://img.shields.io/pypi/v/ufcc?color=blue)](https://pypi.org/project/ufcc/)
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/)
[![Powered by MDAnalysis](https://img.shields.io/badge/powered%20by-MDAnalysis-orange.svg?logoWidth=16&logo=data:image/x-icon;base64,AAABAAEAEBAAAAEAIAAoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJD+XwCY/fEAkf3uAJf97wGT/a+HfHaoiIWE7n9/f+6Hh4fvgICAjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACT/yYAlP//AJ///wCg//8JjvOchXly1oaGhv+Ghob/j4+P/39/f3IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJH8aQCY/8wAkv2kfY+elJ6al/yVlZX7iIiI8H9/f7h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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIQAAANwAAADtAAAA7QAAAMAAABUMAJn9gwCe/e0Aj/2LAP//AQAAAAAAAAAA)](https://www.mdanalysis.org)
[![GitHub Actions Build Status](https://github.com/ProLint/ufcc/workflows/CI/badge.svg)](https://github.com/ProLint/ufcc/actions?query=workflow%3ACI)
Expand All @@ -10,24 +11,19 @@ Ultra-Fast Contacts Calculation (UFCC)




The **Ultra-Fast Contact Calculation (UFCC)** tool calculates the distance-based contacts between two references using as input the trajectories of molecular dynamics simulations. This release of **ufcc** is done as a concept test covering only the analysis of lipid-protein interactions on the framework of the Canadian Chemistry Conference and Exhibition 2022, but it is thinked to also include other types of interactions in the future (i.e. protein-protein, ligand-protein and ligand-membrane interactions).

Installation
============
To install **ufcc** we highly recommend to create a new conda environment as follows:

``` bash
conda create -n ufcc
conda create -n ufcc python=3.7 (or higher)
conda activate ufcc
```

Then you can install **ufcc** using the conda-forge channel:

``` bash
conda install -c conda-forge ufcc
```

or via pip:
Then you can install **ufcc** via pip:

``` bash
pip install ufcc
Expand All @@ -40,26 +36,24 @@ Basic example:
For serial contacts calculation:

``` python
from ufcc import UFCC

from ufcc import UFCC

target_system = UFCC('coordinates.gro', 'trajectory.xtc')
target_system = UFCC('coordinates.gro', 'trajectory.xtc')

target_system.contacts.compute()
target_system.contacts.count_contacts()
target_system.contacts.compute()
target_system.contacts.count_contacts()
```
For parallel contacts calculation:

``` python
from ufcc import UFCC

from ufcc import UFCC

target_system = UFCC('coordinates.gro', 'trajectory.xtc')
target.contacts.runner.backend = 'parallel'

target_system.contacts.compute()
target_system.contacts.count_contacts()
target_system = UFCC('coordinates.gro', 'trajectory.xtc')
target.contacts.runner.backend = 'parallel'

target_system.contacts.compute()
target_system.contacts.count_contacts()
```

You can find more details on how to use **ufcc** in the [documentation page](https://ufcc.readthedocs.io/en/latest/index.html).
Expand Down
13 changes: 6 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ Welcome to the UFCC's documentation!

.. start-badges
|pypi|
|license|
|mdanalysis|
|actions|
|codecov|
|docs|

.. |pypi| image:: https://img.shields.io/pypi/v/ufcc?color=blue
:alt: PyPI
:target: https://pypi.org/project/ufcc/

.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
:alt: license
:target: https://opensource.org/
Expand Down Expand Up @@ -49,13 +54,7 @@ To install **ufcc** we highly recommend to create a new conda environment as fol
conda create -n ufcc python=3.7 (or hig)
conda activate ufcc
Then you can install **ufcc** using the conda-forge channel:

.. code-block:: bash
conda install -c conda-forge ufcc
or via pip:
Then you can install **ufcc** via pip:

.. code-block:: bash
Expand Down

0 comments on commit 15f6e22

Please sign in to comment.