hbat 2.2.3__tar.gz → 2.2.4__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.2.4/.github/workflows/cleanup-prereleases.yml +77 -0
- hbat-2.2.4/.github/workflows/pr-prerelease.yml +324 -0
- {hbat-2.2.3 → hbat-2.2.4}/PKG-INFO +1 -1
- {hbat-2.2.3 → hbat-2.2.4}/conda/meta.yaml +2 -2
- {hbat-2.2.3 → hbat-2.2.4}/hbat/_version.py +2 -2
- {hbat-2.2.3 → hbat-2.2.4}/hbat.egg-info/SOURCES.txt +2 -0
- {hbat-2.2.3 → hbat-2.2.4}/.github/workflows/conda-release.yml +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/.github/workflows/release.yml +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/.github/workflows/test.yml +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/CITATION.cff +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/CLAUDE.md +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/CODE_OF_CONDUCT.md +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/CONTRIBUTING.md +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/LICENSE +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/MANIFEST.in +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/Makefile +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/README.md +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/build_standalone.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/build_standalone_linux.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/build_standalone_windows.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/Makefile +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/requirements.txt +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/_static/custom.css +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/_static/light-theme.css +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/ccd/ccd_analyzer.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/ccd/constants_generator.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/ccd/generate_ccd_constants.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/ccd/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/cli/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/constants/app.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/constants/atomic_data.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/constants/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/constants/misc.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/constants/parameters.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/constants/pdb_constants.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/core/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/core/interactions.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/core/np_analyzer.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/core/np_vector.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/core/pdb_fixer.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/core/pdb_parser.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/core/structure.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/examples/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/gui/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/utilities/atom_utils.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/api/utilities/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/cli.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/conf.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/development.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/index.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/installation.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/license.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/logic.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/parameters.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/pdbfixing.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/docs/source/quickstart.rst +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/1bhl.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/1gai.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/1ubi.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/2izf.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/4jsv.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/4laz.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/4ub7.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/4x21.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_pdb_files/6rsa.pdb +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/drug_design_strict.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/high_resolution.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/low_resolution.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/membrane_proteins.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/nmr_structures.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/standard_resolution.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/strong_interactions_only.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/example_presets/weak_interactions_permissive.hbat +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/ccd/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/ccd/ccd_analyzer.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/ccd/constants_generator.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/ccd/generate_ccd_constants.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/cli/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/cli/main.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/constants/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/constants/app.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/constants/atomic_data.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/constants/misc.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/constants/parameters.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/constants/pdb_constants.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/constants/residue_bonds.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/analysis.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/analyzer.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/app_config.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/interactions.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/np_analyzer.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/np_vector.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/pdb_fixer.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/pdb_parser.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/core/structure.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/gui/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/gui/chain_visualization.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/gui/main_window.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/gui/parameter_panel.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/gui/results_panel.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/utilities/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat/utilities/atom_utils.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat.icns +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat.ico +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat.png +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat.svg +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat_cli.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/hbat_gui.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/pyproject.toml +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/pytest.ini +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/requirements-dev.txt +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/requirements.txt +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/setup.cfg +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/README.md +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/cli/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/cli/test_cli_main.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/conftest.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/core/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/core/test_analyzer.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/core/test_ccd_performance.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/core/test_interactions.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/core/test_np_vector.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/core/test_pdb_fixer.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/core/test_pdb_parser.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/gui/__init__.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/gui/test_gui_components.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/gui/test_numpy_integration.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/run_tests.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/test_np_analyzer.py +0 -0
- {hbat-2.2.3 → hbat-2.2.4}/tests/test_np_vector.py +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Cleanup Pre-releases
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run daily at 2 AM UTC
|
|
6
|
+
- cron: '0 2 * * *'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
days_to_keep:
|
|
10
|
+
description: 'Number of days to keep pre-releases'
|
|
11
|
+
required: false
|
|
12
|
+
default: '7'
|
|
13
|
+
type: string
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
cleanup:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Clean up old pre-releases
|
|
25
|
+
uses: actions/github-script@v7
|
|
26
|
+
with:
|
|
27
|
+
script: |
|
|
28
|
+
const daysToKeep = parseInt('${{ github.event.inputs.days_to_keep || '7' }}');
|
|
29
|
+
const cutoffDate = new Date();
|
|
30
|
+
cutoffDate.setDate(cutoffDate.getDate() - daysToKeep);
|
|
31
|
+
|
|
32
|
+
console.log(`Cleaning up pre-releases older than ${daysToKeep} days (before ${cutoffDate.toISOString()})`);
|
|
33
|
+
|
|
34
|
+
// Get all releases
|
|
35
|
+
const releases = await github.rest.repos.listReleases({
|
|
36
|
+
owner: context.repo.owner,
|
|
37
|
+
repo: context.repo.repo,
|
|
38
|
+
per_page: 100
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
let deletedCount = 0;
|
|
42
|
+
|
|
43
|
+
for (const release of releases.data) {
|
|
44
|
+
// Only process pre-releases with PR tags
|
|
45
|
+
if (release.prerelease && release.tag_name.includes('-pr')) {
|
|
46
|
+
const releaseDate = new Date(release.created_at);
|
|
47
|
+
|
|
48
|
+
if (releaseDate < cutoffDate) {
|
|
49
|
+
console.log(`Deleting pre-release: ${release.tag_name} (created: ${releaseDate.toISOString()})`);
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
// Delete the release
|
|
53
|
+
await github.rest.repos.deleteRelease({
|
|
54
|
+
owner: context.repo.owner,
|
|
55
|
+
repo: context.repo.repo,
|
|
56
|
+
release_id: release.id
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Delete the tag
|
|
60
|
+
await github.rest.git.deleteRef({
|
|
61
|
+
owner: context.repo.owner,
|
|
62
|
+
repo: context.repo.repo,
|
|
63
|
+
ref: `tags/${release.tag_name}`
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
deletedCount++;
|
|
67
|
+
console.log(`✓ Deleted: ${release.tag_name}`);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
console.error(`✗ Failed to delete ${release.tag_name}:`, error.message);
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
console.log(`Keeping: ${release.tag_name} (created: ${releaseDate.toISOString()})`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log(`Cleanup complete. Deleted ${deletedCount} pre-releases.`);
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
name: PR Pre-release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
generate-prerelease-tag:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
outputs:
|
|
12
|
+
prerelease_tag: ${{ steps.generate_tag.outputs.prerelease_tag }}
|
|
13
|
+
github_tag: ${{ steps.generate_tag.outputs.github_tag }}
|
|
14
|
+
version: ${{ steps.generate_tag.outputs.version }}
|
|
15
|
+
pr_number: ${{ github.event.number }}
|
|
16
|
+
pr_head_sha: ${{ github.event.pull_request.head.sha }}
|
|
17
|
+
pr_title: ${{ github.event.pull_request.title }}
|
|
18
|
+
pr_head_ref: ${{ github.event.pull_request.head.ref }}
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
|
|
25
|
+
- name: Generate pre-release tag
|
|
26
|
+
id: generate_tag
|
|
27
|
+
run: |
|
|
28
|
+
# Get base version from latest tag or default to 0.0.0
|
|
29
|
+
BASE_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.0.0")
|
|
30
|
+
|
|
31
|
+
# Generate PEP 440 compatible pre-release version
|
|
32
|
+
SHORT_SHA=$(git rev-parse --short HEAD)
|
|
33
|
+
PR_NUMBER=${{ github.event.number }}
|
|
34
|
+
|
|
35
|
+
# Use PEP 440 compatible format: {base_version}.dev{pr_number}+{sha}
|
|
36
|
+
PRERELEASE_VERSION="${BASE_VERSION}.dev${PR_NUMBER}+${SHORT_SHA}"
|
|
37
|
+
PRERELEASE_TAG="v${PRERELEASE_VERSION}"
|
|
38
|
+
|
|
39
|
+
# Also create a simple tag for GitHub release (without +sha which can cause issues)
|
|
40
|
+
GITHUB_TAG="v${BASE_VERSION}-pr${PR_NUMBER}.${SHORT_SHA}"
|
|
41
|
+
|
|
42
|
+
echo "Base version: $BASE_VERSION"
|
|
43
|
+
echo "Pre-release version: $PRERELEASE_VERSION"
|
|
44
|
+
echo "Pre-release tag: $PRERELEASE_TAG"
|
|
45
|
+
echo "GitHub tag: $GITHUB_TAG"
|
|
46
|
+
|
|
47
|
+
echo "prerelease_tag=$PRERELEASE_TAG" >> $GITHUB_OUTPUT
|
|
48
|
+
echo "version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT
|
|
49
|
+
echo "github_tag=$GITHUB_TAG" >> $GITHUB_OUTPUT
|
|
50
|
+
|
|
51
|
+
build-prerelease:
|
|
52
|
+
needs: generate-prerelease-tag
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
permissions:
|
|
55
|
+
contents: write
|
|
56
|
+
pull-requests: write
|
|
57
|
+
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
|
|
61
|
+
- name: Set up Python
|
|
62
|
+
uses: actions/setup-python@v4
|
|
63
|
+
with:
|
|
64
|
+
python-version: '3.11'
|
|
65
|
+
|
|
66
|
+
- name: Install dependencies
|
|
67
|
+
run: |
|
|
68
|
+
python -m pip install --upgrade pip
|
|
69
|
+
pip install -r requirements-dev.txt
|
|
70
|
+
pip install -e .
|
|
71
|
+
|
|
72
|
+
- name: Set version for setuptools-scm
|
|
73
|
+
run: |
|
|
74
|
+
git config user.name "GitHub Actions"
|
|
75
|
+
git config user.email "actions@github.com"
|
|
76
|
+
# Create a temporary tag for building
|
|
77
|
+
git tag -a "${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}" -m "Pre-release ${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}"
|
|
78
|
+
echo "Created temporary tag: ${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}"
|
|
79
|
+
|
|
80
|
+
- name: Build package
|
|
81
|
+
run: make build
|
|
82
|
+
|
|
83
|
+
- name: Upload build artifacts
|
|
84
|
+
uses: actions/upload-artifact@v4
|
|
85
|
+
with:
|
|
86
|
+
name: prerelease-build-artifacts-${{ needs.generate-prerelease-tag.outputs.pr_number }}
|
|
87
|
+
path: dist/*
|
|
88
|
+
retention-days: 30
|
|
89
|
+
|
|
90
|
+
- name: Create pre-release
|
|
91
|
+
uses: softprops/action-gh-release@v2
|
|
92
|
+
with:
|
|
93
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
94
|
+
files: |
|
|
95
|
+
dist/hbat-${{ needs.generate-prerelease-tag.outputs.version }}-py3-none-any.whl
|
|
96
|
+
dist/hbat-${{ needs.generate-prerelease-tag.outputs.version }}.tar.gz
|
|
97
|
+
tag_name: ${{ needs.generate-prerelease-tag.outputs.github_tag }}
|
|
98
|
+
name: Pre-release ${{ needs.generate-prerelease-tag.outputs.github_tag }}
|
|
99
|
+
body: |
|
|
100
|
+
🚧 **Pre-release build for PR #${{ needs.generate-prerelease-tag.outputs.pr_number }}**
|
|
101
|
+
|
|
102
|
+
**Branch:** `${{ needs.generate-prerelease-tag.outputs.pr_head_ref }}`
|
|
103
|
+
**Commit:** ${{ needs.generate-prerelease-tag.outputs.pr_head_sha }}
|
|
104
|
+
**Title:** ${{ needs.generate-prerelease-tag.outputs.pr_title }}
|
|
105
|
+
|
|
106
|
+
This is an automated pre-release build. Use for testing purposes only.
|
|
107
|
+
|
|
108
|
+
**Install with pip:**
|
|
109
|
+
```bash
|
|
110
|
+
pip install https://github.com/${{ github.repository }}/releases/download/${{ needs.generate-prerelease-tag.outputs.github_tag }}/hbat-${{ needs.generate-prerelease-tag.outputs.version }}-py3-none-any.whl
|
|
111
|
+
```
|
|
112
|
+
prerelease: true
|
|
113
|
+
draft: false
|
|
114
|
+
|
|
115
|
+
- name: Comment on PR
|
|
116
|
+
uses: actions/github-script@v7
|
|
117
|
+
with:
|
|
118
|
+
script: |
|
|
119
|
+
const prNumber = ${{ needs.generate-prerelease-tag.outputs.pr_number }};
|
|
120
|
+
const tag = '${{ needs.generate-prerelease-tag.outputs.github_tag }}';
|
|
121
|
+
const version = '${{ needs.generate-prerelease-tag.outputs.version }}';
|
|
122
|
+
|
|
123
|
+
const comment = `## 🚧 Pre-release Ready
|
|
124
|
+
|
|
125
|
+
A pre-release has been created for this PR: **${tag}**
|
|
126
|
+
|
|
127
|
+
### Quick Install
|
|
128
|
+
\`\`\`bash
|
|
129
|
+
pip install https://github.com/${{ github.repository }}/releases/download/${tag}/hbat-${version}-py3-none-any.whl
|
|
130
|
+
\`\`\`
|
|
131
|
+
|
|
132
|
+
### Available Artifacts
|
|
133
|
+
- Python wheel: \`hbat-${version}-py3-none-any.whl\`
|
|
134
|
+
- Source distribution: \`hbat-${version}.tar.gz\`
|
|
135
|
+
- macOS DMG: \`hbat-${version}.dmg\`
|
|
136
|
+
- Conda package: \`hbat-${version}.tar.bz2\` or \`hbat-${version}.conda\`
|
|
137
|
+
|
|
138
|
+
### Install Options
|
|
139
|
+
**Pip:**
|
|
140
|
+
\`\`\`bash
|
|
141
|
+
pip install https://github.com/${{ github.repository }}/releases/download/${tag}/hbat-${version}-py3-none-any.whl
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
**Conda:** Download the conda package from the release and install locally
|
|
145
|
+
|
|
146
|
+
View all artifacts at: https://github.com/${{ github.repository }}/releases/tag/${tag}
|
|
147
|
+
`;
|
|
148
|
+
|
|
149
|
+
github.rest.issues.createComment({
|
|
150
|
+
issue_number: prNumber,
|
|
151
|
+
owner: context.repo.owner,
|
|
152
|
+
repo: context.repo.repo,
|
|
153
|
+
body: comment
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
build-macos-prerelease:
|
|
157
|
+
needs: generate-prerelease-tag
|
|
158
|
+
runs-on: macos-latest
|
|
159
|
+
|
|
160
|
+
steps:
|
|
161
|
+
- uses: actions/checkout@v4
|
|
162
|
+
|
|
163
|
+
- name: Set up Python
|
|
164
|
+
uses: actions/setup-python@v4
|
|
165
|
+
with:
|
|
166
|
+
python-version: '3.11'
|
|
167
|
+
|
|
168
|
+
- name: Install dependencies
|
|
169
|
+
run: |
|
|
170
|
+
python -m pip install --upgrade pip
|
|
171
|
+
pip install -r requirements-dev.txt
|
|
172
|
+
pip install -e .
|
|
173
|
+
# Install tkinter on macOS
|
|
174
|
+
brew install python-tk create-dmg
|
|
175
|
+
|
|
176
|
+
- name: Set version for setuptools-scm
|
|
177
|
+
run: |
|
|
178
|
+
git config user.name "GitHub Actions"
|
|
179
|
+
git config user.email "actions@github.com"
|
|
180
|
+
git tag -a "${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}" -m "Pre-release ${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}"
|
|
181
|
+
echo "Created temporary tag: ${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}"
|
|
182
|
+
|
|
183
|
+
- name: Build standalone macOS app
|
|
184
|
+
run: make build-standalone
|
|
185
|
+
|
|
186
|
+
- name: Ad-hoc sign the app
|
|
187
|
+
run: |
|
|
188
|
+
echo "Signing app with ad-hoc signature..."
|
|
189
|
+
codesign --force --deep --sign - dist/HBAT-GUI.app
|
|
190
|
+
codesign --verify --verbose dist/HBAT-GUI.app
|
|
191
|
+
|
|
192
|
+
- name: Remove HBAT-GUI folder
|
|
193
|
+
run: |
|
|
194
|
+
echo "Contents of dist directory:"
|
|
195
|
+
ls -la dist/
|
|
196
|
+
cd dist && rm -rf HBAT-GUI
|
|
197
|
+
|
|
198
|
+
- name: Create DMG installer
|
|
199
|
+
run: |
|
|
200
|
+
create-dmg \
|
|
201
|
+
--volname "HBAT Pre-release Installer" \
|
|
202
|
+
--window-pos 200 120 \
|
|
203
|
+
--window-size 800 400 \
|
|
204
|
+
--icon-size 100 \
|
|
205
|
+
--icon "HBAT-GUI.app" 200 190 \
|
|
206
|
+
--hide-extension "HBAT-GUI.app" \
|
|
207
|
+
--app-drop-link 600 185 \
|
|
208
|
+
"hbat-${{ needs.generate-prerelease-tag.outputs.version }}.dmg" \
|
|
209
|
+
"dist/"
|
|
210
|
+
mv hbat-${{ needs.generate-prerelease-tag.outputs.version }}.dmg dist/
|
|
211
|
+
|
|
212
|
+
- name: Upload macOS app artifact
|
|
213
|
+
uses: actions/upload-artifact@v4
|
|
214
|
+
with:
|
|
215
|
+
name: prerelease-macos-app-${{ needs.generate-prerelease-tag.outputs.pr_number }}
|
|
216
|
+
path: dist/hbat-${{ needs.generate-prerelease-tag.outputs.version }}.dmg
|
|
217
|
+
retention-days: 30
|
|
218
|
+
|
|
219
|
+
build-conda-prerelease:
|
|
220
|
+
needs: generate-prerelease-tag
|
|
221
|
+
runs-on: ubuntu-latest
|
|
222
|
+
|
|
223
|
+
steps:
|
|
224
|
+
- uses: actions/checkout@v4
|
|
225
|
+
with:
|
|
226
|
+
fetch-depth: 0
|
|
227
|
+
|
|
228
|
+
- name: Create pre-release tag (simulate conda-release.yml workflow)
|
|
229
|
+
run: |
|
|
230
|
+
git config user.name "GitHub Actions"
|
|
231
|
+
git config user.email "actions@github.com"
|
|
232
|
+
# Create tag to simulate the release process that conda build expects
|
|
233
|
+
git tag -a "${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}" -m "Pre-release ${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}"
|
|
234
|
+
echo "Created tag for conda build: ${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}"
|
|
235
|
+
|
|
236
|
+
- name: Setup Miniconda
|
|
237
|
+
uses: conda-incubator/setup-miniconda@v3
|
|
238
|
+
with:
|
|
239
|
+
auto-update-conda: true
|
|
240
|
+
python-version: 3.11
|
|
241
|
+
channels: conda-forge,defaults
|
|
242
|
+
channel-priority: true
|
|
243
|
+
|
|
244
|
+
- name: Install conda-build and dependencies
|
|
245
|
+
shell: bash -l {0}
|
|
246
|
+
run: |
|
|
247
|
+
conda install -y conda-build conda-verify
|
|
248
|
+
# Disable automatic upload (simulate conda-release.yml process without uploading)
|
|
249
|
+
conda config --set anaconda_upload no
|
|
250
|
+
|
|
251
|
+
- name: Build conda package (simulate conda-release.yml workflow)
|
|
252
|
+
shell: bash -l {0}
|
|
253
|
+
run: |
|
|
254
|
+
# Export the pre-release tag (same as main conda-release workflow process)
|
|
255
|
+
export GIT_DESCRIBE_TAG=${{ needs.generate-prerelease-tag.outputs.prerelease_tag }}
|
|
256
|
+
echo "Building conda package with version: ${GIT_DESCRIBE_TAG}"
|
|
257
|
+
echo "Simulating conda-release.yml workflow without uploading to conda channels"
|
|
258
|
+
|
|
259
|
+
# Use same build command as conda-release workflow
|
|
260
|
+
conda build conda --output-folder conda-build-output
|
|
261
|
+
|
|
262
|
+
# List built packages
|
|
263
|
+
echo "Built conda packages:"
|
|
264
|
+
ls -la conda-build-output/noarch/
|
|
265
|
+
|
|
266
|
+
# Show package info for verification
|
|
267
|
+
PACKAGE_PATH=$(find conda-build-output -name "hbat-*.tar.bz2" -o -name "hbat-*.conda" | head -n 1)
|
|
268
|
+
if [ -n "$PACKAGE_PATH" ]; then
|
|
269
|
+
echo "Package details:"
|
|
270
|
+
echo "Package file: $PACKAGE_PATH"
|
|
271
|
+
echo "Package size: $(du -h "$PACKAGE_PATH" | cut -f1)"
|
|
272
|
+
echo "File type: $(file "$PACKAGE_PATH")"
|
|
273
|
+
else
|
|
274
|
+
echo "Warning: No package found!"
|
|
275
|
+
ls -la conda-build-output/
|
|
276
|
+
fi
|
|
277
|
+
|
|
278
|
+
- name: Upload conda package as artifact
|
|
279
|
+
uses: actions/upload-artifact@v4
|
|
280
|
+
with:
|
|
281
|
+
name: prerelease-conda-package-${{ needs.generate-prerelease-tag.outputs.pr_number }}
|
|
282
|
+
path: conda-build-output/noarch/hbat-*.*
|
|
283
|
+
retention-days: 30
|
|
284
|
+
|
|
285
|
+
update-prerelease:
|
|
286
|
+
needs: [generate-prerelease-tag, build-prerelease, build-macos-prerelease, build-conda-prerelease]
|
|
287
|
+
runs-on: ubuntu-latest
|
|
288
|
+
permissions:
|
|
289
|
+
contents: write
|
|
290
|
+
|
|
291
|
+
steps:
|
|
292
|
+
- name: Download build artifacts
|
|
293
|
+
uses: actions/download-artifact@v4
|
|
294
|
+
with:
|
|
295
|
+
name: prerelease-build-artifacts-${{ needs.generate-prerelease-tag.outputs.pr_number }}
|
|
296
|
+
path: dist/
|
|
297
|
+
|
|
298
|
+
- name: Download macOS app
|
|
299
|
+
uses: actions/download-artifact@v4
|
|
300
|
+
with:
|
|
301
|
+
name: prerelease-macos-app-${{ needs.generate-prerelease-tag.outputs.pr_number }}
|
|
302
|
+
path: dist/
|
|
303
|
+
|
|
304
|
+
- name: Download conda package
|
|
305
|
+
uses: actions/download-artifact@v4
|
|
306
|
+
with:
|
|
307
|
+
name: prerelease-conda-package-${{ needs.generate-prerelease-tag.outputs.pr_number }}
|
|
308
|
+
path: dist/
|
|
309
|
+
|
|
310
|
+
- name: List dist directory contents
|
|
311
|
+
run: |
|
|
312
|
+
echo "Contents of dist directory:"
|
|
313
|
+
ls -la dist/
|
|
314
|
+
|
|
315
|
+
- name: Update pre-release with all artifacts
|
|
316
|
+
uses: softprops/action-gh-release@v2
|
|
317
|
+
with:
|
|
318
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
319
|
+
files: |
|
|
320
|
+
dist/hbat-${{ needs.generate-prerelease-tag.outputs.version }}.dmg
|
|
321
|
+
dist/hbat-*.tar.bz2
|
|
322
|
+
dist/hbat-*.conda
|
|
323
|
+
tag_name: ${{ needs.generate-prerelease-tag.outputs.github_tag }}
|
|
324
|
+
prerelease: true
|
|
@@ -33,7 +33,7 @@ requirements:
|
|
|
33
33
|
|
|
34
34
|
test:
|
|
35
35
|
source_files:
|
|
36
|
-
- example_pdb_files/
|
|
36
|
+
- example_pdb_files/6rsa.pdb
|
|
37
37
|
commands:
|
|
38
38
|
- pip install pdbreader>=0.1.0 mmcif>=0.92.0 mmcif-pdbx>=2.0.1 openbabel-wheel>=3.1.1.22 pybel>=0.15.5 "pdbfixer @ git+https://github.com/openmm/pdbfixer.git"
|
|
39
39
|
- python -c "import hbat; print(hbat.__version__)"
|
|
@@ -46,7 +46,7 @@ test:
|
|
|
46
46
|
- hbat --help
|
|
47
47
|
- hbat --version
|
|
48
48
|
# Test hydrogen bond analysis with 6RSA.pdb
|
|
49
|
-
- hbat example_pdb_files/
|
|
49
|
+
- hbat example_pdb_files/6rsa.pdb --summary-only
|
|
50
50
|
- python -c "from hbat.core.np_analyzer import NPMolecularInteractionAnalyzer as HBAnalyzer; print('HBAnalyzer:', HBAnalyzer)"
|
|
51
51
|
requires:
|
|
52
52
|
- pip
|
|
@@ -19,7 +19,9 @@ pyproject.toml
|
|
|
19
19
|
pytest.ini
|
|
20
20
|
requirements-dev.txt
|
|
21
21
|
requirements.txt
|
|
22
|
+
.github/workflows/cleanup-prereleases.yml
|
|
22
23
|
.github/workflows/conda-release.yml
|
|
24
|
+
.github/workflows/pr-prerelease.yml
|
|
23
25
|
.github/workflows/release.yml
|
|
24
26
|
.github/workflows/test.yml
|
|
25
27
|
conda/meta.yaml
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|