Skip to content

Commit

Permalink
Merge pull request #115 from UC-Davis-molecular-computing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dave-doty authored Jul 13, 2020
2 parents 87997c0 + a3e6b1c commit 3a2ebd2
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 10 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
push:
branches:
- "master"

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ Please report issues in the web interface at the [scadnano web interface GitHub

## Installation

The scadnano Python package requires Python version 3.7 or later. If you do not have that version (or later) of Python installed, follow [this link](https://www.python.org/downloads/) to install it.
The scadnano Python package requires Python version 3.7 or later. If you do not have that version (or later) of Python installed, follow [this link](https://www.python.org/downloads/) to install it. To check your current version of Python, open a command line and type

If you are using Python 3.6 and do not wish to upgrade, with some effort you can install a package that give the required features.
The Python 3.7 module that is not present in 3.6 is the
[dataclasses](https://docs.python.org/3/library/dataclasses.html) module.
You can install a backported library for it:
[dataclasses backport](https://pypi.org/project/dataclasses/) (this library appears to require at least Python version 3.6)
```
python --version
```

Furthermore, the [typing](https://docs.python.org/3/library/typing.html) module was present in Python 3.5, but scadnano requires at least version Python 3.6.2.
If you are using Python 3.6 and do not wish to upgrade, you can install a package providing the required features.
There is a Python 3.7 module used by scadnano, which is not present in 3.6: the
[dataclasses](https://docs.python.org/3/library/dataclasses.html) module.
If you have at least Python version 3.6, you can install a backported library providing this module:
[dataclasses backport](https://pypi.org/project/dataclasses/)

Once Python is installed (and the dataclasses backport if you have Python version 3.6), there are two ways you can install the scadnano Python package:

Expand All @@ -64,6 +66,27 @@ Once Python is installed (and the dataclasses backport if you have Python versio
or
https://www.liquidweb.com/kb/install-pip-windows/.

First, check your version of `pip` by typing
```
pip --version
```
It should say something like
```
pip 19.3.1 from ...lib\site-packages\pip (python 3.8)
```
If the version of Python at the end is Python 3.7 or higher, you are good. If it is version 2.7 or lower, type
```
pip3 --version
```
If that works and shows Python 3.7 or higher, you are good, but you should type `pip3` in the subsequent instructions instead of `pip`.
If it shows Python 3.6, install the [dataclasses backport module](https://pypi.org/project/dataclasses/) via
```
pip install dataclasses
```
If it shows Python 3.5 or lower, then you will need to upgrade your Python version (recommended Python 3.7 or higher).

2. download

*Note:* If you are reading this on the PyPI website, the links below won't work. They are relative links intended to be read on the [GitHub README page](https://github.com/UC-Davis-molecular-computing/scadnano-python-package#readme).
Expand All @@ -75,7 +98,7 @@ Once Python is installed (and the dataclasses backport if you have Python versio
* *optional*: [origami_rectangle.py](scadnano/origami_rectangle.py); This can help create origami rectangles, but it is not necessary to use scadnano.
* *optional*: [_version.py](scadnano/_version.py) This ensures that the current version number is written into any `.dna` files written by the library; otherwise it may be out of date. (Which should not matter for the most part.)
The scadnano package uses the Python package [xlwt](https://pypi.org/project/xlwt/) to write Excel files, so in order to call the method [`DNADesign.write_idt_plate_excel_file()`](https://scadnano-python-package.readthedocs.io/#scadnano.DNADesign.write_idt_plate_excel_file) to export an Excel file with DNA sequences, xlwt must be installed. To install, type `pip install xlwt` at the command line.
The scadnano package uses the Python package [xlwt](https://pypi.org/project/xlwt/) to write Excel files, so xlwt must be installed in order to call the method [`DNADesign.write_idt_plate_excel_file()`](https://scadnano-python-package.readthedocs.io/#scadnano.DNADesign.write_idt_plate_excel_file) to export an Excel file with DNA sequences. To install xlwt, type `pip install xlwt` at the command line. (If you instead use pip to install the scadnano package, xlwt will be automatically installed.)



Expand Down
2 changes: 1 addition & 1 deletion scadnano/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

# The following line *must* be the last in the module, exactly as formatted:
# XXX: REMEMBER TO CHANGE VERSION IN scadnano.py also, for users who do not install from PyPI
__version__ = "0.9.9"
__version__ = "0.9.10"
2 changes: 1 addition & 1 deletion scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
from ._version import __version__
except ImportError:
# this is so scadnano.py file works without _version.py being present, in case user downloads it
__version__ = "0.9.9"
__version__ = "0.9.10"

StrandLabel = TypeVar('StrandLabel')
DomainLabel = TypeVar('DomainLabel')
Expand Down

0 comments on commit 3a2ebd2

Please sign in to comment.