hbat 2.0.6601928__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hbat-2.0.6601928/.github/workflows/release.yml +169 -0
- hbat-2.0.6601928/.github/workflows/test.yml +48 -0
- hbat-2.0.6601928/CITATION.cff +28 -0
- hbat-2.0.6601928/CLAUDE.md +27 -0
- hbat-2.0.6601928/CODE_OF_CONDUCT.md +133 -0
- hbat-2.0.6601928/CONTRIBUTING.md +30 -0
- hbat-2.0.6601928/LICENSE +21 -0
- hbat-2.0.6601928/MANIFEST.in +44 -0
- hbat-2.0.6601928/Makefile +164 -0
- hbat-2.0.6601928/PKG-INFO +253 -0
- hbat-2.0.6601928/README.md +197 -0
- hbat-2.0.6601928/build_standalone.py +137 -0
- hbat-2.0.6601928/docs/Makefile +19 -0
- hbat-2.0.6601928/docs/requirements.txt +13 -0
- hbat-2.0.6601928/docs/source/_static/custom.css +78 -0
- hbat-2.0.6601928/docs/source/_static/light-theme.css +39 -0
- hbat-2.0.6601928/docs/source/api/cli/index.rst +17 -0
- hbat-2.0.6601928/docs/source/api/constants.rst +12 -0
- hbat-2.0.6601928/docs/source/api/core/index.rst +104 -0
- hbat-2.0.6601928/docs/source/api/examples/index.rst +338 -0
- hbat-2.0.6601928/docs/source/api/gui/index.rst +36 -0
- hbat-2.0.6601928/docs/source/api/index.rst +44 -0
- hbat-2.0.6601928/docs/source/cli.rst +295 -0
- hbat-2.0.6601928/docs/source/conf.py +128 -0
- hbat-2.0.6601928/docs/source/development.rst +543 -0
- hbat-2.0.6601928/docs/source/index.rst +56 -0
- hbat-2.0.6601928/docs/source/installation.rst +48 -0
- hbat-2.0.6601928/docs/source/license.rst +24 -0
- hbat-2.0.6601928/docs/source/logic.rst +270 -0
- hbat-2.0.6601928/docs/source/parameters.rst +616 -0
- hbat-2.0.6601928/docs/source/quickstart.rst +47 -0
- hbat-2.0.6601928/example_pdb_files/2izf.pdb +3561 -0
- hbat-2.0.6601928/example_pdb_files/6rsa.pdb +2757 -0
- hbat-2.0.6601928/example_presets/drug_design_strict.hbat +25 -0
- hbat-2.0.6601928/example_presets/high_resolution.hbat +25 -0
- hbat-2.0.6601928/example_presets/low_resolution.hbat +25 -0
- hbat-2.0.6601928/example_presets/membrane_proteins.hbat +25 -0
- hbat-2.0.6601928/example_presets/nmr_structures.hbat +25 -0
- hbat-2.0.6601928/example_presets/standard_resolution.hbat +25 -0
- hbat-2.0.6601928/example_presets/strong_interactions_only.hbat +25 -0
- hbat-2.0.6601928/example_presets/weak_interactions_permissive.hbat +25 -0
- hbat-2.0.6601928/hbat/__init__.py +25 -0
- hbat-2.0.6601928/hbat/_version.py +21 -0
- hbat-2.0.6601928/hbat/cli/__init__.py +1 -0
- hbat-2.0.6601928/hbat/cli/main.py +872 -0
- hbat-2.0.6601928/hbat/constants.py +185 -0
- hbat-2.0.6601928/hbat/core/__init__.py +1 -0
- hbat-2.0.6601928/hbat/core/analysis.py +1002 -0
- hbat-2.0.6601928/hbat/core/pdb_parser.py +522 -0
- hbat-2.0.6601928/hbat/core/vector.py +308 -0
- hbat-2.0.6601928/hbat/gui/__init__.py +20 -0
- hbat-2.0.6601928/hbat/gui/chain_visualization.py +363 -0
- hbat-2.0.6601928/hbat/gui/main_window.py +650 -0
- hbat-2.0.6601928/hbat/gui/parameter_panel.py +632 -0
- hbat-2.0.6601928/hbat/gui/results_panel.py +783 -0
- hbat-2.0.6601928/hbat.egg-info/SOURCES.txt +76 -0
- hbat-2.0.6601928/hbat.icns +0 -0
- hbat-2.0.6601928/hbat.ico +0 -0
- hbat-2.0.6601928/hbat.png +0 -0
- hbat-2.0.6601928/hbat.svg +10 -0
- hbat-2.0.6601928/hbat_cli.py +33 -0
- hbat-2.0.6601928/hbat_gui.py +34 -0
- hbat-2.0.6601928/pyproject.toml +197 -0
- hbat-2.0.6601928/pytest.ini +20 -0
- hbat-2.0.6601928/requirements-dev.txt +43 -0
- hbat-2.0.6601928/requirements.txt +9 -0
- hbat-2.0.6601928/setup.cfg +4 -0
- hbat-2.0.6601928/tests/README.md +120 -0
- hbat-2.0.6601928/tests/__init__.py +15 -0
- hbat-2.0.6601928/tests/cli/__init__.py +6 -0
- hbat-2.0.6601928/tests/cli/test_cli_main.py +364 -0
- hbat-2.0.6601928/tests/conftest.py +140 -0
- hbat-2.0.6601928/tests/core/__init__.py +5 -0
- hbat-2.0.6601928/tests/core/test_analysis.py +387 -0
- hbat-2.0.6601928/tests/core/test_pdb_parser.py +228 -0
- hbat-2.0.6601928/tests/core/test_vector.py +156 -0
- hbat-2.0.6601928/tests/gui/__init__.py +6 -0
- hbat-2.0.6601928/tests/gui/test_gui_components.py +418 -0
- hbat-2.0.6601928/tests/run_tests.py +158 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Tests"]
|
|
6
|
+
types:
|
|
7
|
+
- completed
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
generate-tag:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
14
|
+
outputs:
|
|
15
|
+
release_tag: ${{ steps.generate_tag.outputs.tag }}
|
|
16
|
+
version: ${{ steps.generate_tag.outputs.version }}
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Generate release tag
|
|
22
|
+
id: generate_tag
|
|
23
|
+
run: |
|
|
24
|
+
GIT_HASH=$(git rev-parse --short=7 HEAD)
|
|
25
|
+
# Convert git hash to a numeric value to make it PEP 440 compliant
|
|
26
|
+
# This uses the decimal representation of the first 6 hex chars
|
|
27
|
+
NUMERIC_HASH=$(printf "%d" 0x${GIT_HASH:0:6})
|
|
28
|
+
VERSION="2.0.${NUMERIC_HASH}"
|
|
29
|
+
TAG="v${VERSION}"
|
|
30
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
31
|
+
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
|
32
|
+
echo "Generated VERSION: $VERSION (from git hash: $GIT_HASH)"
|
|
33
|
+
echo "Generated TAG: $TAG"
|
|
34
|
+
|
|
35
|
+
release:
|
|
36
|
+
needs: generate-tag
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- name: Set up Python
|
|
43
|
+
uses: actions/setup-python@v4
|
|
44
|
+
with:
|
|
45
|
+
python-version: '3.11'
|
|
46
|
+
|
|
47
|
+
- name: Install dependencies
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install --upgrade pip
|
|
50
|
+
pip install -r requirements-dev.txt
|
|
51
|
+
pip install -e .
|
|
52
|
+
|
|
53
|
+
- name: Set version for setuptools-scm
|
|
54
|
+
run: |
|
|
55
|
+
git config user.name "GitHub Actions"
|
|
56
|
+
git config user.email "actions@github.com"
|
|
57
|
+
git tag -a "${{ needs.generate-tag.outputs.release_tag }}" -m "Release ${{ needs.generate-tag.outputs.release_tag }}"
|
|
58
|
+
echo "Created tag: ${{ needs.generate-tag.outputs.release_tag }}"
|
|
59
|
+
|
|
60
|
+
- name: Build package
|
|
61
|
+
run: make build
|
|
62
|
+
|
|
63
|
+
- name: Upload build artifacts
|
|
64
|
+
uses: actions/upload-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
name: build-artifacts
|
|
67
|
+
path: dist/*
|
|
68
|
+
|
|
69
|
+
- name: Publish to PyPI
|
|
70
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
71
|
+
with:
|
|
72
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
73
|
+
skip-existing: true
|
|
74
|
+
|
|
75
|
+
build-macos:
|
|
76
|
+
needs: generate-tag
|
|
77
|
+
runs-on: macos-latest
|
|
78
|
+
|
|
79
|
+
steps:
|
|
80
|
+
- uses: actions/checkout@v4
|
|
81
|
+
|
|
82
|
+
- name: Set up Python
|
|
83
|
+
uses: actions/setup-python@v4
|
|
84
|
+
with:
|
|
85
|
+
python-version: '3.11'
|
|
86
|
+
|
|
87
|
+
- name: Install dependencies
|
|
88
|
+
run: |
|
|
89
|
+
python -m pip install --upgrade pip
|
|
90
|
+
pip install -r requirements-dev.txt
|
|
91
|
+
pip install -e .
|
|
92
|
+
# Install tkinter on macOS
|
|
93
|
+
brew install python-tk create-dmg
|
|
94
|
+
|
|
95
|
+
- name: Set version for setuptools-scm
|
|
96
|
+
run: |
|
|
97
|
+
git config user.name "GitHub Actions"
|
|
98
|
+
git config user.email "actions@github.com"
|
|
99
|
+
git tag -a "${{ needs.generate-tag.outputs.release_tag }}" -m "Release ${{ needs.generate-tag.outputs.release_tag }}"
|
|
100
|
+
echo "Created tag: ${{ needs.generate-tag.outputs.release_tag }}"
|
|
101
|
+
|
|
102
|
+
- name: Build standalone macOS app
|
|
103
|
+
run: make build-standalone
|
|
104
|
+
|
|
105
|
+
- name: Ad-hoc sign the app
|
|
106
|
+
run: |
|
|
107
|
+
echo "Signing app with ad-hoc signature..."
|
|
108
|
+
codesign --force --deep --sign - dist/HBAT-GUI.app
|
|
109
|
+
codesign --verify --verbose dist/HBAT-GUI.app
|
|
110
|
+
|
|
111
|
+
- name: Remove HBAT-GUI folder
|
|
112
|
+
run: |
|
|
113
|
+
echo "Contents of dist directory:"
|
|
114
|
+
ls -la dist/
|
|
115
|
+
cd dist && rm -rf HBAT-GUI
|
|
116
|
+
|
|
117
|
+
- name: Create DMG installer
|
|
118
|
+
run: |
|
|
119
|
+
create-dmg \
|
|
120
|
+
--volname "HBAT Installer" \
|
|
121
|
+
--window-pos 200 120 \
|
|
122
|
+
--window-size 800 400 \
|
|
123
|
+
--icon-size 100 \
|
|
124
|
+
--icon "HBAT-GUI.app" 200 190 \
|
|
125
|
+
--hide-extension "HBAT-GUI.app" \
|
|
126
|
+
--app-drop-link 600 185 \
|
|
127
|
+
"hbat-${{ needs.generate-tag.outputs.version }}.dmg" \
|
|
128
|
+
"dist/"
|
|
129
|
+
mv hbat-${{ needs.generate-tag.outputs.version }}.dmg dist/
|
|
130
|
+
|
|
131
|
+
- name: Upload macOS app artifact
|
|
132
|
+
uses: actions/upload-artifact@v4
|
|
133
|
+
with:
|
|
134
|
+
name: macos-app
|
|
135
|
+
path: dist/hbat-${{ needs.generate-tag.outputs.version }}.dmg
|
|
136
|
+
|
|
137
|
+
create-release:
|
|
138
|
+
needs: [generate-tag, release, build-macos]
|
|
139
|
+
runs-on: ubuntu-latest
|
|
140
|
+
|
|
141
|
+
steps:
|
|
142
|
+
- name: Download build artifacts
|
|
143
|
+
uses: actions/download-artifact@v4
|
|
144
|
+
with:
|
|
145
|
+
name: build-artifacts
|
|
146
|
+
path: dist/
|
|
147
|
+
|
|
148
|
+
- name: Download macOS app
|
|
149
|
+
uses: actions/download-artifact@v4
|
|
150
|
+
with:
|
|
151
|
+
name: macos-app
|
|
152
|
+
path: dist/
|
|
153
|
+
|
|
154
|
+
- name: List dist directory contents
|
|
155
|
+
run: |
|
|
156
|
+
echo "Contents of dist directory:"
|
|
157
|
+
ls -la dist/
|
|
158
|
+
|
|
159
|
+
- name: Create Release
|
|
160
|
+
uses: softprops/action-gh-release@v2
|
|
161
|
+
with:
|
|
162
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
163
|
+
files: |
|
|
164
|
+
dist/hbat-${{ needs.generate-tag.outputs.version }}-py3-none-any.whl
|
|
165
|
+
dist/hbat-${{ needs.generate-tag.outputs.version }}.tar.gz
|
|
166
|
+
dist/hbat-${{ needs.generate-tag.outputs.version }}.dmg
|
|
167
|
+
tag_name: ${{ needs.generate-tag.outputs.release_tag }}
|
|
168
|
+
name: Release ${{ needs.generate-tag.outputs.release_tag }}
|
|
169
|
+
body: ${{ github.event.head_commit.message }}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10", "3.11"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -r requirements-dev.txt
|
|
28
|
+
pip install -e .
|
|
29
|
+
|
|
30
|
+
- name: Format code
|
|
31
|
+
run: make format
|
|
32
|
+
|
|
33
|
+
- name: Run type check
|
|
34
|
+
run: make type-check
|
|
35
|
+
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: make test
|
|
38
|
+
|
|
39
|
+
- name: Run coverage
|
|
40
|
+
run: make test-coverage
|
|
41
|
+
if: matrix.python-version == '3.9'
|
|
42
|
+
|
|
43
|
+
- name: Upload coverage to Codecov
|
|
44
|
+
uses: codecov/codecov-action@v3
|
|
45
|
+
if: matrix.python-version == '3.9'
|
|
46
|
+
with:
|
|
47
|
+
file: ./tests/htmlcov/coverage.xml
|
|
48
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
authors:
|
|
4
|
+
- family-names: "Tiwari"
|
|
5
|
+
given-names: "Abhishek"
|
|
6
|
+
orcid: "https://orcid.org/0000-0003-2222-2395"
|
|
7
|
+
- family-names: "Panigrahi"
|
|
8
|
+
given-names: "Sunil Kumar"
|
|
9
|
+
title: "HBAT: Hydrogen Bond Analysis Tool (v2)"
|
|
10
|
+
version: 2.0.4
|
|
11
|
+
doi: 10.3233/ISI-2007-003
|
|
12
|
+
date-released: 2017-12-18
|
|
13
|
+
url: "https://github.com/abhishektiwari/hbat"
|
|
14
|
+
preferred-citation:
|
|
15
|
+
type: article
|
|
16
|
+
authors:
|
|
17
|
+
- family-names: "Tiwari"
|
|
18
|
+
given-names: "Abhishek"
|
|
19
|
+
orcid: "https://orcid.org/0000-0003-2222-2395"
|
|
20
|
+
- family-names: "Panigrahi"
|
|
21
|
+
given-names: "Sunil Kumar"
|
|
22
|
+
doi: "10.3233/ISI-2007-00337"
|
|
23
|
+
journal: "In Silico Biology"
|
|
24
|
+
month: 12
|
|
25
|
+
year: 2007
|
|
26
|
+
title: "HBAT: A Complete Package for Analysing Strong and Weak Hydrogen Bonds in Macromolecular Crystal Structures"
|
|
27
|
+
issue: 6
|
|
28
|
+
volume: 7
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Development Guidelines
|
|
2
|
+
|
|
3
|
+
## Core Development Rules
|
|
4
|
+
|
|
5
|
+
1. Testing Requirements
|
|
6
|
+
|
|
7
|
+
- When updating existing functions or classes must update the existing test cases
|
|
8
|
+
- When adding a new feature must create a new test case
|
|
9
|
+
|
|
10
|
+
2. Documentation Requirements
|
|
11
|
+
|
|
12
|
+
- When changing in `core` module must update `logic.rst`
|
|
13
|
+
- When adding new file to `hbat` or `tests` must update `development.rst`
|
|
14
|
+
|
|
15
|
+
3. Code Quality
|
|
16
|
+
|
|
17
|
+
- Type hints required for all code in `core` module
|
|
18
|
+
- All public APIs in `core`, `cli`, and `gui` module must have Sphinx docstring format
|
|
19
|
+
- Run formatters before type checks
|
|
20
|
+
- Format code using `make format`
|
|
21
|
+
- Perform type check using `make type-check`
|
|
22
|
+
- Fix type checking errors by adding type hint
|
|
23
|
+
- For typing support install required package type stubs if available
|
|
24
|
+
|
|
25
|
+
4. Requirements management
|
|
26
|
+
|
|
27
|
+
- After installing new packages add them to requirements files
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Contributor Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
``pwessel at hawaii dot edu``, ``leouieda at gmail dot com``, or
|
|
64
|
+
``meghanj at hawaii dot edu``. All complaints will be reviewed and investigated
|
|
65
|
+
promptly and fairly.
|
|
66
|
+
|
|
67
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
68
|
+
reporter of any incident.
|
|
69
|
+
|
|
70
|
+
## Enforcement Guidelines
|
|
71
|
+
|
|
72
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
73
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
74
|
+
|
|
75
|
+
### 1. Correction
|
|
76
|
+
|
|
77
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
78
|
+
unprofessional or unwelcome in the community.
|
|
79
|
+
|
|
80
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
81
|
+
clarity around the nature of the violation and an explanation of why the
|
|
82
|
+
behavior was inappropriate. A public apology may be requested.
|
|
83
|
+
|
|
84
|
+
### 2. Warning
|
|
85
|
+
|
|
86
|
+
**Community Impact**: A violation through a single incident or series of
|
|
87
|
+
actions.
|
|
88
|
+
|
|
89
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
90
|
+
interaction with the people involved, including unsolicited interaction with
|
|
91
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
92
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
93
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
94
|
+
ban.
|
|
95
|
+
|
|
96
|
+
### 3. Temporary Ban
|
|
97
|
+
|
|
98
|
+
**Community Impact**: A serious violation of community standards, including
|
|
99
|
+
sustained inappropriate behavior.
|
|
100
|
+
|
|
101
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
102
|
+
communication with the community for a specified period of time. No public or
|
|
103
|
+
private interaction with the people involved, including unsolicited interaction
|
|
104
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
105
|
+
Violating these terms may lead to a permanent ban.
|
|
106
|
+
|
|
107
|
+
### 4. Permanent Ban
|
|
108
|
+
|
|
109
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
110
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
111
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
112
|
+
|
|
113
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
114
|
+
community.
|
|
115
|
+
|
|
116
|
+
## Attribution
|
|
117
|
+
|
|
118
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
119
|
+
version 2.1, available at
|
|
120
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
121
|
+
|
|
122
|
+
Community Impact Guidelines were inspired by
|
|
123
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
124
|
+
|
|
125
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
126
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
127
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
128
|
+
|
|
129
|
+
[homepage]: https://www.contributor-covenant.org
|
|
130
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
131
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
132
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
133
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Contributing Guidelines
|
|
2
|
+
|
|
3
|
+
:tada: **First off, thank you for considering contributing to our project!** :tada:
|
|
4
|
+
|
|
5
|
+
This is a community-driven project, so it's people like you that make it useful and
|
|
6
|
+
successful. These are some of the many ways to contribute:
|
|
7
|
+
|
|
8
|
+
* :bug: Submitting bug reports and feature requests
|
|
9
|
+
* :memo: Writing tutorials or examples
|
|
10
|
+
* :mag: Fixing typos and improving the documentation
|
|
11
|
+
* :bulb: Writing code for everyone to use
|
|
12
|
+
* :people_holding_hands: Community engagement and outreach
|
|
13
|
+
|
|
14
|
+
If you get stuck at any point you can create an
|
|
15
|
+
[issue](https://github.com/abhishektiwari/hbat/issues) on GitHub.
|
|
16
|
+
|
|
17
|
+
For more information on contributing to open source projects,
|
|
18
|
+
[GitHub's own guide](https://opensource.guide/how-to-contribute)
|
|
19
|
+
is a great starting point if you are new to version control. Also, checkout the
|
|
20
|
+
[Zen of Scientific Software Maintenance](https://jrleeman.github.io/ScientificSoftwareMaintenance/)
|
|
21
|
+
for some guiding principles on how to create high quality scientific software
|
|
22
|
+
contributions.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Ground Rules
|
|
26
|
+
|
|
27
|
+
The goal is to maintain a diverse community that's pleasant for everyone.
|
|
28
|
+
**Please be considerate and respectful of others**. Everyone must abide by our
|
|
29
|
+
[Code of Conduct](/CODE_OF_CONDUCT.md)
|
|
30
|
+
and we encourage all to read it carefully.
|
hbat-2.0.6601928/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Abhishek Tiwari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# MANIFEST.in - Include additional files in distribution package
|
|
2
|
+
|
|
3
|
+
# Documentation files
|
|
4
|
+
include README.md
|
|
5
|
+
include LICENSE
|
|
6
|
+
include CONTRIBUTING.md
|
|
7
|
+
include CODE_OF_CONDUCT.md
|
|
8
|
+
|
|
9
|
+
# Configuration files
|
|
10
|
+
include pyproject.toml
|
|
11
|
+
include pytest.ini
|
|
12
|
+
include requirements*.txt
|
|
13
|
+
include Makefile
|
|
14
|
+
|
|
15
|
+
# Icon and graphics files
|
|
16
|
+
include *.ico
|
|
17
|
+
include *.png
|
|
18
|
+
include *.svg
|
|
19
|
+
|
|
20
|
+
# Example files
|
|
21
|
+
recursive-include example_pdb_files *.pdb
|
|
22
|
+
recursive-include example_presets *.hbat
|
|
23
|
+
|
|
24
|
+
# Test files and documentation
|
|
25
|
+
recursive-include tests *.py
|
|
26
|
+
recursive-include tests *.md
|
|
27
|
+
exclude tests/htmlcov/*
|
|
28
|
+
|
|
29
|
+
# Executable scripts
|
|
30
|
+
include hbat_cli.py
|
|
31
|
+
include hbat_gui.py
|
|
32
|
+
|
|
33
|
+
# Exclude development and build artifacts
|
|
34
|
+
global-exclude *.pyc
|
|
35
|
+
global-exclude *.pyo
|
|
36
|
+
global-exclude __pycache__
|
|
37
|
+
global-exclude .git*
|
|
38
|
+
global-exclude .DS_Store
|
|
39
|
+
global-exclude *.so
|
|
40
|
+
global-exclude .coverage
|
|
41
|
+
global-exclude .pytest_cache
|
|
42
|
+
prune build
|
|
43
|
+
prune dist
|
|
44
|
+
prune *.egg-info
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# HBAT Development Makefile
|
|
2
|
+
|
|
3
|
+
.PHONY: help install install-dev test test-fast test-legacy test-pytest test-core test-cli test-gui test-coverage clean lint format type-check docs
|
|
4
|
+
|
|
5
|
+
# Default target
|
|
6
|
+
help:
|
|
7
|
+
@echo "HBAT Development Commands:"
|
|
8
|
+
@echo " install Install package in development mode"
|
|
9
|
+
@echo " install-dev Install with development dependencies"
|
|
10
|
+
@echo ""
|
|
11
|
+
@echo "Testing:"
|
|
12
|
+
@echo " test Run comprehensive test suite (recommended)"
|
|
13
|
+
@echo " test-fast Run fast tests only (skip slow integration tests)"
|
|
14
|
+
@echo " test-legacy Run legacy test runner"
|
|
15
|
+
@echo " test-pytest Run tests with pytest (if available)"
|
|
16
|
+
@echo " test-core Run core module tests only"
|
|
17
|
+
@echo " test-cli Run CLI tests only"
|
|
18
|
+
@echo " test-gui Run GUI tests only (requires display)"
|
|
19
|
+
@echo " test-coverage Generate test coverage report"
|
|
20
|
+
@echo ""
|
|
21
|
+
@echo "Code Quality:"
|
|
22
|
+
@echo " lint Run code linting"
|
|
23
|
+
@echo " format Format code with black and isort"
|
|
24
|
+
@echo " type-check Run type checking with mypy"
|
|
25
|
+
@echo ""
|
|
26
|
+
@echo "Development:"
|
|
27
|
+
@echo " clean Clean build artifacts"
|
|
28
|
+
@echo " docs Build documentation"
|
|
29
|
+
@echo " run-gui Launch GUI application"
|
|
30
|
+
@echo " run-cli Run CLI with test file"
|
|
31
|
+
|
|
32
|
+
# Installation
|
|
33
|
+
install:
|
|
34
|
+
pip install -e .
|
|
35
|
+
|
|
36
|
+
install-dev:
|
|
37
|
+
pip install -r requirements-dev.txt
|
|
38
|
+
pip install -e .
|
|
39
|
+
|
|
40
|
+
# Testing
|
|
41
|
+
test:
|
|
42
|
+
@echo "Running additional pytest tests if available..."
|
|
43
|
+
-pytest tests/ -v
|
|
44
|
+
|
|
45
|
+
test-fast:
|
|
46
|
+
@echo "Running fast tests only..."
|
|
47
|
+
cd tests && python run_tests.py --fast
|
|
48
|
+
|
|
49
|
+
test-pytest:
|
|
50
|
+
@echo "Running tests with pytest..."
|
|
51
|
+
pytest tests/ -v
|
|
52
|
+
|
|
53
|
+
test-cli:
|
|
54
|
+
@echo "Running CLI tests..."
|
|
55
|
+
cd tests && python run_tests.py --cli --fast
|
|
56
|
+
|
|
57
|
+
test-core:
|
|
58
|
+
@echo "Running core tests..."
|
|
59
|
+
cd tests && python run_tests.py --core --fast
|
|
60
|
+
|
|
61
|
+
test-coverage:
|
|
62
|
+
@echo "Running tests with coverage..."
|
|
63
|
+
cd tests && python run_tests.py --coverage
|
|
64
|
+
|
|
65
|
+
test-gui:
|
|
66
|
+
@echo "Running GUI tests..."
|
|
67
|
+
cd tests && python run_tests.py --gui --fast
|
|
68
|
+
|
|
69
|
+
# Code quality
|
|
70
|
+
lint:
|
|
71
|
+
@echo "Running flake8..."
|
|
72
|
+
-flake8 hbat/ *.py
|
|
73
|
+
@echo "Running pylint..."
|
|
74
|
+
-pylint hbat/
|
|
75
|
+
|
|
76
|
+
format:
|
|
77
|
+
@echo "Formatting with black..."
|
|
78
|
+
-black hbat/ *.py
|
|
79
|
+
@echo "Sorting imports with isort..."
|
|
80
|
+
-isort hbat/ *.py
|
|
81
|
+
|
|
82
|
+
type-check:
|
|
83
|
+
@echo "Type checking with mypy..."
|
|
84
|
+
-mypy hbat/core/ hbat/cli/
|
|
85
|
+
|
|
86
|
+
# Cleanup
|
|
87
|
+
clean:
|
|
88
|
+
rm -rf build/
|
|
89
|
+
rm -rf dist/
|
|
90
|
+
rm -rf *.egg-info/
|
|
91
|
+
rm -rf __pycache__/
|
|
92
|
+
rm -rf */__pycache__/
|
|
93
|
+
rm -rf */*/__pycache__/
|
|
94
|
+
rm -rf .pytest_cache/
|
|
95
|
+
rm -rf .mypy_cache/
|
|
96
|
+
rm -rf .coverage
|
|
97
|
+
rm -rf htmlcov/
|
|
98
|
+
rm -rf docs/build/
|
|
99
|
+
find . -name "*.pyc" -delete
|
|
100
|
+
find . -name "*.pyo" -delete
|
|
101
|
+
|
|
102
|
+
# Documentation
|
|
103
|
+
docs:
|
|
104
|
+
@echo "Building documentation (requires sphinx)..."
|
|
105
|
+
-sphinx-build -b html docs/source/ docs/build/html/
|
|
106
|
+
|
|
107
|
+
docs-serve:
|
|
108
|
+
@echo "Serving documentation locally..."
|
|
109
|
+
@if [ -f docs/build/html/index.html ]; then \
|
|
110
|
+
echo "Opening documentation at http://localhost:8000"; \
|
|
111
|
+
cd docs/build/html && python -m http.server 8000; \
|
|
112
|
+
else \
|
|
113
|
+
echo "Documentation not built. Run 'make docs' first."; \
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
# Development runners
|
|
117
|
+
run-gui:
|
|
118
|
+
python hbat_gui.py
|
|
119
|
+
|
|
120
|
+
run-cli:
|
|
121
|
+
python hbat_cli.py example_pdb_files/6RSA.pdb --verbose --summary-only
|
|
122
|
+
|
|
123
|
+
# Example analysis
|
|
124
|
+
example:
|
|
125
|
+
@echo "Running example analysis with 6RSA.pdb..."
|
|
126
|
+
python hbat_cli.py example_pdb_files/6RSA.pdb --json example_results.json --csv example_results.csv --verbose --summary-only
|
|
127
|
+
@echo "Results saved to example_results.json and example_results.csv"
|
|
128
|
+
|
|
129
|
+
# Package building
|
|
130
|
+
build:
|
|
131
|
+
@echo "Building package with modern build system..."
|
|
132
|
+
python -m build
|
|
133
|
+
|
|
134
|
+
build-legacy:
|
|
135
|
+
@echo "Building with legacy setup.py..."
|
|
136
|
+
python setup.py sdist bdist_wheel
|
|
137
|
+
|
|
138
|
+
# Standalone executables
|
|
139
|
+
build-standalone:
|
|
140
|
+
@echo "Building standalone executables with PyInstaller..."
|
|
141
|
+
python build_standalone.py
|
|
142
|
+
|
|
143
|
+
# Package validation
|
|
144
|
+
check:
|
|
145
|
+
@echo "Checking package..."
|
|
146
|
+
-twine check dist/*
|
|
147
|
+
@echo "Package structure:"
|
|
148
|
+
@find dist/ -name "*.whl" -exec unzip -l {} \; 2>/dev/null | head -20
|
|
149
|
+
|
|
150
|
+
# Upload to test PyPI
|
|
151
|
+
upload-test:
|
|
152
|
+
@echo "Uploading to Test PyPI..."
|
|
153
|
+
twine upload --repository testpypi dist/*
|
|
154
|
+
|
|
155
|
+
# Upload to PyPI
|
|
156
|
+
upload:
|
|
157
|
+
@echo "Uploading to PyPI..."
|
|
158
|
+
twine upload dist/*
|
|
159
|
+
|
|
160
|
+
# Development environment setup
|
|
161
|
+
setup-dev:
|
|
162
|
+
python -m venv venv
|
|
163
|
+
@echo "Activate virtual environment with: source venv/bin/activate (Linux/Mac) or venv\\Scripts\\activate (Windows)"
|
|
164
|
+
@echo "Then run: make install-dev"
|