Skip to content

Commit 6f24386

Browse files
authored
Merge pull request #10 from harmsm/main
modernized build environment, unit testing
2 parents 854eb6b + 09555ed commit 6f24386

22 files changed

+218
-214
lines changed

.github/workflows/python-app.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and flake8 across
22
# platforms and python versions.
33

4-
name: ElliptiCBn
4+
name: ellipticbn
55

66
on:
77
push:
@@ -14,21 +14,20 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
17-
max-parallel: 3
1817
matrix:
1918
os: [ubuntu-latest,macos-latest,windows-latest]
20-
python-version: ['3.7', '3.8', '3.9', '3.10' , '3.11', '3.12']
19+
python-version: ['3.9', '3.10' , '3.11', '3.12']
2120

2221
steps:
2322
- uses: actions/checkout@v4
2423
- uses: actions/setup-python@v5
2524
with:
2625
python-version: ${{ matrix.python-version }}
2726

28-
- name: install ElliptiCBn
27+
- name: install ellipticbn
2928
run: |
3029
# platform specific packages
31-
python -m pip install . -vv -r requirements.txt
30+
python -m pip install . pyproject.toml
3231
3332
- name: run flake8
3433
run: |

ElliptiCBn/__version__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

MANIFEST.in

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
include requirements.txt
2-
include ElliptiCBn/data/
3-
include ElliptiCBn/data/*.csv
4-
include ElliptiCBn/data/*.txt
5-
include notebooks/*.ipynb
1+
include src/ellipticbn/data/
2+
include src/ellipticbn/data/*.csv
3+
include src/ellipticbn/data/*.txt

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Run the program in the cloud without installing any software.
1010

11-
<a href="https://githubtocolab.com/harmslab/ElliptiCBn/blob/main/notebooks/ElliptiCBn.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
11+
<a href="https://githubtocolab.com/harmslab/ellipticbn/blob/main/notebooks/ellipticbn.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
1212

1313

1414

@@ -83,25 +83,25 @@ ElliptiCB[n] can be installed locally and used as a command line tool.
8383
On a terminal, run:
8484

8585
```bash
86-
pip install ElliptiCBn
86+
pip install ellipticbn
8787
```
8888

8989
**To install from source:**
9090

9191
On a terminal, run:
9292

9393
```bash
94-
git clone https://github.com/harmslab/ElliptiCBn.git
95-
cd ElliptiCBn
96-
python -m pip install . -vv -r requirements.txt
94+
git clone https://github.com/harmslab/ellipticbn.git
95+
cd ellipticbn
96+
python -m pip install . pyproject.toml
9797
```
9898

9999
### Run from the command line
100100

101101
ElliptiCB[n] takes one or more .xyz files as inputs. Assuming that HUMAR.xyz is in the working directory, running this command:
102102

103103
```
104-
$> ElliptiCBn HUMXAR.xyz
104+
$> ellipticbn HUMXAR.xyz
105105
```
106106

107107
Would generate the following output:
@@ -126,7 +126,7 @@ It will also generate HUXMAR.xyz.html (the visualization) and HUXMAR.xyz.xlsx (t
126126
You can also run the program on multiple xyz files:
127127

128128
```
129-
$> ElliptiCBn HUMXAR.xyz LAZPIM.xyz
129+
$> ellipticbn HUMXAR.xyz LAZPIM.xyz
130130
```
131131

132132
Would generate the following output:
@@ -169,13 +169,13 @@ In addition to the visualization html and individual ellipiticty files, this cal
169169
One can also change the parameters used in the calculation. To see the available options, type the following in a terminal:
170170

171171
```bash
172-
ElliptiCBn --help
172+
ellipticbn --help
173173
```
174174

175175
As of this writing (version 2.0.1), this gives the following output:
176176

177177
```
178-
usage: ElliptiCBn [-h] [--min_num_carbons MIN_NUM_CARBONS]
178+
usage: ellipticbn [-h] [--min_num_carbons MIN_NUM_CARBONS]
179179
[--max_num_carbons MAX_NUM_CARBONS]
180180
[--guest_search_radius GUEST_SEARCH_RADIUS]
181181
[--summary_file SUMMARY_FILE] [--output_dir OUTPUT_DIR]

bin/ElliptiCBn

Lines changed: 0 additions & 90 deletions
This file was deleted.

notebooks/ElliptiCBn.ipynb renamed to notebooks/ellipticbn.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"tags": []
99
},
1010
"source": [
11-
"# Use ElliptiCBn to measure the ellipticity of cucurbituril hosts\n",
11+
"# Use ellipticbn to measure the ellipticity of cucurbituril hosts\n",
1212
"\n",
1313
"\n",
1414
"### Description\n",
@@ -21,7 +21,7 @@
2121
"\n",
2222
"\n",
2323
"\n",
24-
"#### ElliptiCBn performs the following steps\n",
24+
"#### ellipticbn performs the following steps\n",
2525
"\n",
2626
"<img src=\"https://github.com/harmsm/ElliptiC/raw/main/images/pipeline_image.png\" width=\"600px\"/>\n",
2727
"\n",
@@ -58,7 +58,7 @@
5858
"source": [
5959
"#@title Set up environment\n",
6060
"\n",
61-
"#@markdown This cell configures the computing environment to run ElliptiCBn. Run\n",
61+
"#@markdown This cell configures the computing environment to run ellipticbn. Run\n",
6262
"#@markdown this cell before uploading an XYZ file.\n",
6363
"\n",
6464
"#@markdown To run the cell, click the \"Play\" button to the left.\n",
@@ -73,14 +73,14 @@
7373
" raise Exception(err) from e\n",
7474
"\n",
7575
"if RUNNING_IN_COLAB:\n",
76-
" !git clone https://github.com/harmslab/ElliptiCBn\n",
77-
" %cd ElliptiCBn\n",
78-
" %pip install . -r requirements.txt\n",
76+
" !git clone https://github.com/harmslab/ellipticbn\n",
77+
" %cd ellipticbn\n",
78+
" %pip install . pyproject.toml \n",
7979
"\n",
8080
"# ------------------------------------------------------------------------------\n",
8181
"# Imports\n",
8282
"\n",
83-
"import ElliptiCBn as ec\n",
83+
"import ellipticbn as ec\n",
8484
"\n",
8585
"import numpy as np\n",
8686
"import pandas as pd\n",

pyproject.toml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.distutils.bdist_wheel]
6+
universal = true
7+
8+
[tool.setuptools.dynamic]
9+
version = {attr = "ellipticbn.__version__.__version__"}
10+
11+
[tool.setuptools.package-data]
12+
"*" = [
13+
"src/ellipticbn/data/*.txt",
14+
"src/ellipticbn/data/*.csv"
15+
]
16+
17+
[project]
18+
name = "ellipticbn"
19+
dynamic = ["version"]
20+
dependencies = [
21+
"numpy>=1.10",
22+
"networkx",
23+
"scikit-learn",
24+
"plotly",
25+
"pandas",
26+
"matplotlib",
27+
"xlsxwriter",
28+
"mdanalysis",
29+
"scipy"
30+
]
31+
32+
requires-python = ">=3.9"
33+
authors = [
34+
{name = "Michael Shavlik", email = "[email protected]"},
35+
{name = "Mike Harms", email = "[email protected]"},
36+
]
37+
maintainers = [
38+
{name = "Mike Harms", email = "[email protected]"}
39+
]
40+
description = "Automatically measure the ellipticity of cucurbituril macrocycles!"
41+
readme = "README.md"
42+
license = {file = "LICENSE"}
43+
keywords = ["macrocycle", "cucurbituril", "ellipticity", "chemistry", "geometry", "host", "guest"]
44+
classifiers = [
45+
"Development Status :: 5 - Production/Stable",
46+
"Programming Language :: Python"
47+
]
48+
49+
[project.urls]
50+
Repository = "https://github.com/harmslab/ellipticbn.git"
51+
"Bug Tracker" = "https://github.com/harmslab/ellipticbn/issues"
52+
53+
[project.scripts]
54+
ellipticbn = "ellipticbn.run_all:main_cli"
55+
56+
[project.optional-dependencies]
57+
test = [
58+
"coverage",
59+
"flake8",
60+
"pytest"
61+
]

requirements.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

run_all_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
echo "Running flake8"
4-
flake_test=`flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`
4+
flake_test=`flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics`
55
if [[ "${flake_test}" != 0 ]]; then
66
echo "flake failed"
77
exit

setup.py

Lines changed: 0 additions & 58 deletions
This file was deleted.
File renamed without changes.

src/ellipticbn/__version__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
VERSION = (2, 1, 2)
2+
3+
__version__ = '.'.join(map(str, VERSION))

0 commit comments

Comments
 (0)