Skip to content

Commit 98947bf

Browse files
authored
Development merge (charnley#67)
* init qml reorder * added keyword * mv to other repo * refactor dict * pep8 * folder structure * rm tests * starting to split tests * pep8 and rm py3 * rm py2 * chmod and pytest * mv * readability * merge qml in * pep * py3 * starting to test args * checkpoint * mv tests and more arg parsing * ignore .vim * added qml reorder and qml test * clean * added github action * test dev * added req txt * actions * don't support lower than Python 3.6 * revisit atom types * test with qml * pep * whops * rm comments * added vector distance to qml * fixed type bug, added type assert, added shorthand for reflexes (Thanks Benj) * isort * black formart * black * format tests * format tests * devops * development * devops * isort * deploy * only master
1 parent ce7f533 commit 98947bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1812
-1182
lines changed

.github/workflows/publish.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy PyPi Python Package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- 'rmsd-*'
9+
10+
jobs:
11+
12+
release:
13+
name: Create Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@master
18+
- name: Create Release
19+
id: create_release
20+
uses: actions/create-release@v1
21+
env:
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
with:
24+
tag_name: ${{github.ref}}
25+
release_name: Release ${{github.ref}}
26+
body: |
27+
Release changes
28+
draft: false
29+
prerelease: false
30+
31+
deploy:
32+
needs: release
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v1
36+
- name: Setup Python
37+
uses: actions/setup-python@v1
38+
with:
39+
python-version: '3.x'
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
python -m pip install setuptools wheel twine
44+
- name: Build and publish
45+
env:
46+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
47+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
48+
run: |
49+
python setup.py sdist bdist_wheel
50+
twine upload dist/*
51+

.github/workflows/test.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
name: Test Python package
3+
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'dev'
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [3.6, 3.7, 3.8]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
if test -f requirements.txt; then pip install -r requirements.txt; fi
30+
if test -f requirements.dev.txt; then pip install -r requirements.dev.txt; fi
31+
python -m pip install git+https://github.com/qmlcode/qml@develop
32+
- name: Lint with flake8
33+
run: |
34+
make lint
35+
- name: Test with pytest
36+
run: |
37+
make test
38+

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# dev
2+
.vim
3+
14
*.py[cod]
25

36
# setup.py output

.travis.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
language: python
22
python:
3-
- '2.7'
43
- '3.6'
5-
install: pip install -e .
4+
install:
5+
- pip install -e .
6+
- pip install pytest
67
script:
7-
- python tests.py
8+
- python -m pytest tests
89
deploy:
910
provider: pypi
1011
user: charnley

Makefile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
python = python
2+
LINE_LENGTH=79
3+
BLACKARGS=--line-length ${LINE_LENGTH}
4+
5+
src=rmsd/*.py tests/*.py
6+
7+
lint:
8+
${python} -m isort --check-only ${src}
9+
${python} -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
10+
${python} -m flake8 . --count --exit-zero --max-complexity=10 --statistics
11+
${python} -m black --check ${BLACKARGS} ${src}
12+
13+
format:
14+
${python} -m isort ${src}
15+
${python} -m autoflake --in-place --remove-unused-variables ${src}
16+
${python} -m black ${BLACKARGS} ${src}
17+
18+
test:
19+
${python} -m pytest -vrs tests

README.rst

+20
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,23 @@ Problems?
128128

129129
Submit issues or pull requests on GitHub.
130130

131+
132+
Contributions
133+
-------------
134+
135+
Please note that we are using ``black`` with line length of 79. Easiest way to
136+
abide to the code standard is to install the following packages.
137+
138+
.. code-block:: bash
139+
140+
pip install black flake8 autoflake isort pytest
141+
142+
and
143+
144+
.. code-block:: bash
145+
146+
make format test lint
147+
148+
to auto-format and test the code.
149+
150+

example.py

100755100644
File mode changed.

requirements.dev.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
flake8
2+
pytest
3+
isort
4+
black

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
scipy
2+
numpy

rmsd++/Makefile

-23
This file was deleted.

rmsd++/README.md

-16
This file was deleted.

0 commit comments

Comments
 (0)