biosim_extractor 0.0.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.
- biosim_extractor-0.0.4/.github/CONTRIBUTING.md +65 -0
- biosim_extractor-0.0.4/.github/ISSUE_TEMPLATE/bug_report.md +70 -0
- biosim_extractor-0.0.4/.github/ISSUE_TEMPLATE/config.yml +22 -0
- biosim_extractor-0.0.4/.github/ISSUE_TEMPLATE/documentation.md +19 -0
- biosim_extractor-0.0.4/.github/ISSUE_TEMPLATE/feature_request.md +28 -0
- biosim_extractor-0.0.4/.github/ISSUE_TEMPLATE/general_report.md +13 -0
- biosim_extractor-0.0.4/.github/pull_request_template.md +20 -0
- biosim_extractor-0.0.4/.github/renovate.json +21 -0
- biosim_extractor-0.0.4/.github/workflows/biosim_extractor_project-ci.yaml +86 -0
- biosim_extractor-0.0.4/.github/workflows/release.yaml +204 -0
- biosim_extractor-0.0.4/.github/workflows/update-copyright-years-in-license-file.yaml +17 -0
- biosim_extractor-0.0.4/.gitignore +211 -0
- biosim_extractor-0.0.4/.pre-commit-config.yaml +19 -0
- biosim_extractor-0.0.4/.readthedocs.yaml +19 -0
- biosim_extractor-0.0.4/CITATION.cff +27 -0
- biosim_extractor-0.0.4/LICENSE +21 -0
- biosim_extractor-0.0.4/PKG-INFO +58 -0
- biosim_extractor-0.0.4/README.md +12 -0
- biosim_extractor-0.0.4/biosim_extractor/__init__.py +8 -0
- biosim_extractor-0.0.4/biosim_extractor/amber/__init__.py +0 -0
- biosim_extractor-0.0.4/biosim_extractor/amber/amberlog.py +310 -0
- biosim_extractor-0.0.4/biosim_extractor/gromacs/__init__.py +0 -0
- biosim_extractor-0.0.4/biosim_extractor/gromacs/gromacslog.py +311 -0
- biosim_extractor-0.0.4/biosim_extractor/helpers/__init__.py +0 -0
- biosim_extractor-0.0.4/biosim_extractor/helpers/log_utils.py +82 -0
- biosim_extractor-0.0.4/biosim_extractor/helpers/metadata_utils.py +24 -0
- biosim_extractor-0.0.4/biosim_extractor/mdanalysis/__init__.py +0 -0
- biosim_extractor-0.0.4/biosim_extractor/mdanalysis/toptraj.py +380 -0
- biosim_extractor-0.0.4/biosim_extractor/metadata/__init__.py +0 -0
- biosim_extractor-0.0.4/biosim_extractor/metadata/convertpopulated.py +52 -0
- biosim_extractor-0.0.4/biosim_extractor/metadata/fetchschema.py +168 -0
- biosim_extractor-0.0.4/biosim_extractor/metadata/populatemetadata.py +592 -0
- biosim_extractor-0.0.4/biosim_extractor/metadata/validatemetadata.py +170 -0
- biosim_extractor-0.0.4/biosim_extractor/units/__init__.py +0 -0
- biosim_extractor-0.0.4/biosim_extractor/units/unitconversion.py +294 -0
- biosim_extractor-0.0.4/docs/Makefile +20 -0
- biosim_extractor-0.0.4/docs/make.bat +35 -0
- biosim_extractor-0.0.4/docs/source/api.rst +42 -0
- biosim_extractor-0.0.4/docs/source/conf.py +42 -0
- biosim_extractor-0.0.4/docs/source/contributing.rst +88 -0
- biosim_extractor-0.0.4/docs/source/index.rst +51 -0
- biosim_extractor-0.0.4/docs/source/installation.rst +20 -0
- biosim_extractor-0.0.4/docs/source/usage.rst +34 -0
- biosim_extractor-0.0.4/pyproject.toml +107 -0
- biosim_extractor-0.0.4/tests/__init__.py +0 -0
- biosim_extractor-0.0.4/tests/conftest.py +24 -0
- biosim_extractor-0.0.4/tests/test_amber/example_files/amber_03_Prod.out +902 -0
- biosim_extractor-0.0.4/tests/test_amber/test_amberlog.py +117 -0
- biosim_extractor-0.0.4/tests/test_gromacs/example_files/1AKI_minimised.log +6870 -0
- biosim_extractor-0.0.4/tests/test_gromacs/example_files/1AKI_production.log +624 -0
- biosim_extractor-0.0.4/tests/test_gromacs/test_gromacslog.py +102 -0
- biosim_extractor-0.0.4/tests/test_helpers/test_log_utils.py +63 -0
- biosim_extractor-0.0.4/tests/test_mdanalysis/test_toptraj.py +238 -0
- biosim_extractor-0.0.4/tests/test_metadata/test_convertpopulated.py +38 -0
- biosim_extractor-0.0.4/tests/test_metadata/test_fetchschema.py +196 -0
- biosim_extractor-0.0.4/tests/test_metadata/test_populatemetadata.py +118 -0
- biosim_extractor-0.0.4/tests/test_metadata/test_validatemetadata.py +77 -0
- biosim_extractor-0.0.4/tests/test_units/test_unitconversion.py +77 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributing to REPO-NAME
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to **REPO-NAME**!
|
|
4
|
+
|
|
5
|
+
We’re excited to collaborate with developers, researchers, and community members to make REPO-NAME better for everyone.
|
|
6
|
+
|
|
7
|
+
This guide explains how to set up your environment, make changes, and submit them for review. Whether you’re fixing a bug, improving documentation, or adding new features, every contribution makes a difference.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Getting Started
|
|
12
|
+
|
|
13
|
+
Before contributing, please review the [Developer Guide]().
|
|
14
|
+
It covers REPO-NAME’s architecture, setup instructions, and contribution workflow.
|
|
15
|
+
|
|
16
|
+
If you’re new to the project, we also recommend:
|
|
17
|
+
- Reading the [README](../README.md) for an overview and installation details.
|
|
18
|
+
- Checking open [issues]() labeled **good first issue** to find beginner-friendly tasks.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Submitting a Pull Request (PR)
|
|
23
|
+
|
|
24
|
+
When you’re ready to submit your work:
|
|
25
|
+
|
|
26
|
+
1. **Push your branch** to GitHub.
|
|
27
|
+
2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch.
|
|
28
|
+
3. **Fill out the PR template**, including:
|
|
29
|
+
- A concise summary of what your PR does
|
|
30
|
+
- A list of all changes introduced
|
|
31
|
+
- Details on how these changes affect the repository (features, tests, documentation, etc.)
|
|
32
|
+
4. **Verify before submission**:
|
|
33
|
+
- All tests pass
|
|
34
|
+
- Pre-commit checks succeed
|
|
35
|
+
- Documentation is updated where applicable
|
|
36
|
+
5. **Review process**:
|
|
37
|
+
- Your PR will be reviewed by the core development team.
|
|
38
|
+
- At least **one approval** is required before merging.
|
|
39
|
+
|
|
40
|
+
We aim to provide constructive feedback quickly and appreciate your patience during the review process.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Reporting Issues
|
|
45
|
+
|
|
46
|
+
Found a bug or have a feature request?
|
|
47
|
+
|
|
48
|
+
1. **Open a new issue** on GitHub.
|
|
49
|
+
2. Provide a **clear and descriptive title**.
|
|
50
|
+
3. Include:
|
|
51
|
+
- Steps to reproduce the issue (if applicable)
|
|
52
|
+
- Expected vs. actual behavior
|
|
53
|
+
- Relevant logs, screenshots, or input files
|
|
54
|
+
|
|
55
|
+
Well-documented issues help us address problems faster and keep REPO-NAME stable and robust.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Additional Resources
|
|
60
|
+
|
|
61
|
+
- [GitHub Docs](https://help.github.com/)
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
Thank you for helping improve **REPO-NAME**, your contributions make open source stronger!
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: '[Bug]: '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Bug Report
|
|
11
|
+
<!-- A clear and concise description of the issue. -->
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## To Reproduce
|
|
16
|
+
<!-- Provide the YAML configuration and the exact CLI command that reproduces the issue. -->
|
|
17
|
+
|
|
18
|
+
### YAML configuration
|
|
19
|
+
<!-- Paste the YAML file or the smallest excerpt that reproduces the issue.
|
|
20
|
+
Remove unrelated fields to make it minimal. -->
|
|
21
|
+
```yaml
|
|
22
|
+
# Paste the YAML snippet here
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### CLI command used
|
|
26
|
+
<!-- Write the exact command used, for example: -->
|
|
27
|
+
```bash
|
|
28
|
+
# Paste the CLI command here
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Actual output
|
|
32
|
+
<!-- Paste the output, logs, or error messages here -->
|
|
33
|
+
```bash
|
|
34
|
+
# Paste the output, logs, or error messages here
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Expected output
|
|
38
|
+
<!-- Describe what you expected to see instead -->
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Environment and Versions
|
|
43
|
+
|
|
44
|
+
- Operating System:
|
|
45
|
+
- Package Version:
|
|
46
|
+
- Python Version:
|
|
47
|
+
- Package list:
|
|
48
|
+
- If using conda, run: `conda list > packages.txt` and paste the contents here.
|
|
49
|
+
|
|
50
|
+
``` bash
|
|
51
|
+
# Paste packages.txt here
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- If using venv/pip, run: `pip list > packages.txt` and paste the contents here.
|
|
55
|
+
|
|
56
|
+
``` bash
|
|
57
|
+
# Paste packages.txt here
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Screenshots or Logs
|
|
63
|
+
|
|
64
|
+
<!-- Attach any relevant screenshots, logs, or stack traces. -->
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Additional Context
|
|
69
|
+
|
|
70
|
+
<!-- Include anything else that might help reproduce or understand the bug, such as changes from a previously working version. -->
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
issue_templates:
|
|
3
|
+
- name: "Bug Report"
|
|
4
|
+
description: "Report a bug."
|
|
5
|
+
title: "[Bug]: "
|
|
6
|
+
labels: ["bug"]
|
|
7
|
+
body: "./ISSUE_TEMPLATE/bug_report.md"
|
|
8
|
+
- name: "Feature Request"
|
|
9
|
+
description: "Propose a new feature or improvement."
|
|
10
|
+
title: "[Feature]: "
|
|
11
|
+
labels: ["enhancement"]
|
|
12
|
+
body: "./ISSUE_TEMPLATE/feature_request.md"
|
|
13
|
+
- name: "Documentation"
|
|
14
|
+
description: "Suggest updates or additions to the documentation."
|
|
15
|
+
title: "[Docs]: "
|
|
16
|
+
labels: ["documentation"]
|
|
17
|
+
body: "./ISSUE_TEMPLATE/documentation.md"
|
|
18
|
+
- name: "General Report"
|
|
19
|
+
description: "Provide general feedback or inquiries."
|
|
20
|
+
title: "[General]: "
|
|
21
|
+
labels: ["general"]
|
|
22
|
+
body: "./ISSUE_TEMPLATE/general_report.md"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Documentation
|
|
3
|
+
about: Suggest updates or additions to documentation
|
|
4
|
+
title: "[Docs]: "
|
|
5
|
+
labels: documentation
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### Documentation Update
|
|
10
|
+
<!-- What part of the documentation needs to be updated or added? -->
|
|
11
|
+
|
|
12
|
+
### Why Is This Needed?
|
|
13
|
+
<!-- Explain the importance of this update. -->
|
|
14
|
+
|
|
15
|
+
### Suggested Changes
|
|
16
|
+
<!-- Provide a detailed description of the changes. -->
|
|
17
|
+
|
|
18
|
+
### Additional Context
|
|
19
|
+
<!-- Include any related resources. -->
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea
|
|
4
|
+
title: '[Feature]: '
|
|
5
|
+
labels: 'enhancement'
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Feature Request
|
|
10
|
+
|
|
11
|
+
## Problem / Motivation
|
|
12
|
+
<!-- Describe the problem you want to solve or the motivation for this feature. -->
|
|
13
|
+
|
|
14
|
+
## Proposed Solution
|
|
15
|
+
<!-- Describe the feature you would like to see implemented. Include examples if applicable. -->
|
|
16
|
+
|
|
17
|
+
## Alternatives Considered
|
|
18
|
+
- <!-- Alternative 1 -->
|
|
19
|
+
- <!-- Alternative 2 -->
|
|
20
|
+
|
|
21
|
+
## Expected Impact
|
|
22
|
+
<!-- How this feature would affect the codebase or workflow -->
|
|
23
|
+
- <!-- Impact 1 -->
|
|
24
|
+
- <!-- Impact 2 -->
|
|
25
|
+
|
|
26
|
+
## Additional Context
|
|
27
|
+
<!-- Add any other context, screenshots, or references for the feature request here. -->
|
|
28
|
+
- <!-- Further context -->
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: General Report
|
|
3
|
+
about: Provide general feedback or inquiries
|
|
4
|
+
title: "[General]: "
|
|
5
|
+
labels: general
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### Feedback or Inquiry
|
|
10
|
+
<!-- Provide your feedback or inquiry. -->
|
|
11
|
+
|
|
12
|
+
### Additional Information
|
|
13
|
+
<!-- Add any other relevant details here. -->
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
<!-- Provide a brief description of the PR's purpose here. -->
|
|
3
|
+
|
|
4
|
+
## Changes
|
|
5
|
+
<!-- List all the changes introduced in this PR. -->
|
|
6
|
+
### Change 1 <!-- Rename Change 1 to reflect change title -->:
|
|
7
|
+
- <!-- Bullet point the changes in update 1. -->
|
|
8
|
+
-
|
|
9
|
+
|
|
10
|
+
### Change 2 <!-- Rename Change 2 to reflect change title -->:
|
|
11
|
+
- <!-- Bullet point the changes in update 2. -->
|
|
12
|
+
-
|
|
13
|
+
|
|
14
|
+
### Change 3 <!-- Rename Change 3 to reflect change title -->:
|
|
15
|
+
- <!-- Bullet point the changes in update 3. -->
|
|
16
|
+
-
|
|
17
|
+
|
|
18
|
+
## Impact
|
|
19
|
+
- <!-- Bullet point the expected impact this PR will have on the codebase. -->
|
|
20
|
+
-
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"config:best-practices",
|
|
4
|
+
":dependencyDashboard",
|
|
5
|
+
"group:monorepos",
|
|
6
|
+
"group:recommended"
|
|
7
|
+
],
|
|
8
|
+
"enabledManagers": ["pep621"],
|
|
9
|
+
"pep621": {
|
|
10
|
+
"enabled": true
|
|
11
|
+
},
|
|
12
|
+
"rangeStrategy": "replace",
|
|
13
|
+
"schedule": ["* 8 * * 1-5"],
|
|
14
|
+
"labels": ["dependencies"],
|
|
15
|
+
"packageRules": [
|
|
16
|
+
{
|
|
17
|
+
"matchUpdateTypes": ["minor", "patch"],
|
|
18
|
+
"automerge": false
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: biosim-extractor CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '0 8 * * 1-5'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
tests:
|
|
13
|
+
name: Run tests
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
os: [ubuntu-24.04, windows-2025, macos-15]
|
|
18
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repo
|
|
21
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
22
|
+
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install biosim-extractor and its testing dependencies
|
|
29
|
+
run: pip install -e .[testing]
|
|
30
|
+
|
|
31
|
+
- name: Run test suite
|
|
32
|
+
run: pytest --cov biosim_extractor --cov-report term-missing --cov-append .
|
|
33
|
+
|
|
34
|
+
- name: Coveralls GitHub Action
|
|
35
|
+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
|
|
36
|
+
with:
|
|
37
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
parallel: true
|
|
39
|
+
fail-on-error: false
|
|
40
|
+
|
|
41
|
+
coveralls-finish:
|
|
42
|
+
name: Finish Coveralls
|
|
43
|
+
needs: tests
|
|
44
|
+
if: ${{ always() }}
|
|
45
|
+
runs-on: ubuntu-24.04
|
|
46
|
+
steps:
|
|
47
|
+
- name: Coveralls Finished
|
|
48
|
+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
|
|
49
|
+
with:
|
|
50
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
51
|
+
parallel-finished: true
|
|
52
|
+
fail-on-error: false
|
|
53
|
+
|
|
54
|
+
docs:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
timeout-minutes: 15
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
59
|
+
- name: Set up Python 3.14
|
|
60
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
61
|
+
with:
|
|
62
|
+
python-version: 3.14.0
|
|
63
|
+
- name: Install python dependencies
|
|
64
|
+
run: |
|
|
65
|
+
pip install --upgrade pip
|
|
66
|
+
pip install -e .[docs]
|
|
67
|
+
- name: Build docs
|
|
68
|
+
run: cd docs && make
|
|
69
|
+
|
|
70
|
+
pre-commit:
|
|
71
|
+
runs-on: ubuntu-24.04
|
|
72
|
+
timeout-minutes: 15
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
75
|
+
- name: Set up Python 3.14
|
|
76
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
77
|
+
with:
|
|
78
|
+
python-version: 3.14.0
|
|
79
|
+
- name: Install python dependencies
|
|
80
|
+
run: |
|
|
81
|
+
pip install --upgrade pip
|
|
82
|
+
pip install -e .[pre-commit]
|
|
83
|
+
- name: Run pre-commit
|
|
84
|
+
run: |
|
|
85
|
+
pre-commit install
|
|
86
|
+
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
required: true
|
|
8
|
+
default: 'x.y.z'
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
checks:
|
|
16
|
+
name: Version check
|
|
17
|
+
runs-on: ubuntu-24.04
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
id: repo
|
|
21
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
25
|
+
with:
|
|
26
|
+
python-version: 3.14.0
|
|
27
|
+
|
|
28
|
+
- name: Get latest release from pip
|
|
29
|
+
id: latestreleased
|
|
30
|
+
run: |
|
|
31
|
+
PREVIOUS_VERSION=$(python -m pip index versions biosim-extractor | grep "biosim-extractor" | cut -d "(" -f2 | cut -d ")" -f1)
|
|
32
|
+
echo "pip_tag=$PREVIOUS_VERSION" >> "$GITHUB_OUTPUT"
|
|
33
|
+
echo $PREVIOUS_VERSION
|
|
34
|
+
|
|
35
|
+
- name: version comparison
|
|
36
|
+
id: compare
|
|
37
|
+
run: |
|
|
38
|
+
pip3 install semver
|
|
39
|
+
output=$(pysemver compare ${{ steps.latestreleased.outputs.pip_tag }} ${{ github.event.inputs.version }})
|
|
40
|
+
if [ $output -ge 0 ]; then exit 1; fi
|
|
41
|
+
|
|
42
|
+
version:
|
|
43
|
+
name: prepare ${{ github.event.inputs.version }}
|
|
44
|
+
needs: checks
|
|
45
|
+
runs-on: ubuntu-24.04
|
|
46
|
+
steps:
|
|
47
|
+
|
|
48
|
+
- name: checkout
|
|
49
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
50
|
+
|
|
51
|
+
- name: Change version in repo and CITATION.cff
|
|
52
|
+
run: |
|
|
53
|
+
# Update Python package version
|
|
54
|
+
sed -i "s/__version__ =.*/__version__ = \"${{ github.event.inputs.version }}\"/g" biosim_extractor/__init__.py
|
|
55
|
+
|
|
56
|
+
# Keep Sphinx release metadata in sync
|
|
57
|
+
sed -i -E "s/^(release = ).*/\1'${{ github.event.inputs.version }}'/" docs/source/conf.py
|
|
58
|
+
|
|
59
|
+
# Update CITATION.cff version and date-released
|
|
60
|
+
if [ -f CITATION.cff ]; then
|
|
61
|
+
sed -i -E "s/^(version:\s*).*/\1${{ github.event.inputs.version }}/" CITATION.cff
|
|
62
|
+
sed -i -E "s/^(date-released:\s*).*/\1'$(date -u +%F)'/" CITATION.cff
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
- name: send PR
|
|
66
|
+
id: pr_id
|
|
67
|
+
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
|
|
68
|
+
with:
|
|
69
|
+
commit-message: Update version to ${{ github.event.inputs.version }}
|
|
70
|
+
branch: version-update
|
|
71
|
+
title: "Update to version ${{ github.event.inputs.version }}"
|
|
72
|
+
body: |
|
|
73
|
+
Update version
|
|
74
|
+
- Update the __init__.py with new release
|
|
75
|
+
- Update CITATION.cff version & date-released
|
|
76
|
+
- Auto-generated by [CI]
|
|
77
|
+
committer: version-updater <vu.bot@users.noreply.github.com>
|
|
78
|
+
author: version-updater <vu.bot@users.noreply.github.com>
|
|
79
|
+
base: main
|
|
80
|
+
signoff: false
|
|
81
|
+
draft: false
|
|
82
|
+
|
|
83
|
+
- name: auto approve review
|
|
84
|
+
uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
|
|
85
|
+
with:
|
|
86
|
+
pull-request-number: ${{ steps.pr_id.outputs.pull-request-number }}
|
|
87
|
+
review-message: "Auto approved version bump PR"
|
|
88
|
+
github-token: ${{ secrets.AUTO_PR_MERGE }}
|
|
89
|
+
|
|
90
|
+
- name: merge PR
|
|
91
|
+
run: gh pr merge --merge --delete-branch --auto "${{ steps.pr_id.outputs.pull-request-number }}"
|
|
92
|
+
env:
|
|
93
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
94
|
+
|
|
95
|
+
tag:
|
|
96
|
+
name: tag release
|
|
97
|
+
needs: version
|
|
98
|
+
runs-on: ubuntu-24.04
|
|
99
|
+
steps:
|
|
100
|
+
- name: Checkout repository
|
|
101
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
102
|
+
with:
|
|
103
|
+
ref: main
|
|
104
|
+
|
|
105
|
+
- name: tag v${{ github.event.inputs.version }}
|
|
106
|
+
run: |
|
|
107
|
+
git config user.name github-actions
|
|
108
|
+
git config user.email github-actions@github.com
|
|
109
|
+
git tag ${{ github.event.inputs.version }}
|
|
110
|
+
git push origin tag ${{ github.event.inputs.version }}
|
|
111
|
+
|
|
112
|
+
release:
|
|
113
|
+
name: make github release
|
|
114
|
+
needs: tag
|
|
115
|
+
runs-on: ubuntu-24.04
|
|
116
|
+
steps:
|
|
117
|
+
|
|
118
|
+
- name: create release
|
|
119
|
+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
|
|
120
|
+
with:
|
|
121
|
+
name: v${{ github.event.inputs.version }}
|
|
122
|
+
generate_release_notes: true
|
|
123
|
+
tag_name: ${{ github.event.inputs.version }}
|
|
124
|
+
|
|
125
|
+
pypi:
|
|
126
|
+
name: make pypi release
|
|
127
|
+
needs: [tag, release]
|
|
128
|
+
runs-on: ubuntu-24.04
|
|
129
|
+
steps:
|
|
130
|
+
|
|
131
|
+
- name: checkout
|
|
132
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
133
|
+
with:
|
|
134
|
+
ref: main
|
|
135
|
+
|
|
136
|
+
- name: Set up Python
|
|
137
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
138
|
+
with:
|
|
139
|
+
python-version: 3.14.0
|
|
140
|
+
|
|
141
|
+
- name: Install flit
|
|
142
|
+
run: |
|
|
143
|
+
python -m pip install --upgrade pip
|
|
144
|
+
python -m pip install flit~=3.9
|
|
145
|
+
|
|
146
|
+
- name: Build and publish
|
|
147
|
+
run: |
|
|
148
|
+
flit publish
|
|
149
|
+
env:
|
|
150
|
+
FLIT_USERNAME: __token__
|
|
151
|
+
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
152
|
+
|
|
153
|
+
conda:
|
|
154
|
+
name: publish conda to anaconda.org
|
|
155
|
+
needs: [tag, release]
|
|
156
|
+
runs-on: ubuntu-24.04
|
|
157
|
+
|
|
158
|
+
steps:
|
|
159
|
+
- name: Checkout
|
|
160
|
+
uses: actions/checkout@v4
|
|
161
|
+
with:
|
|
162
|
+
ref: main
|
|
163
|
+
|
|
164
|
+
- name: Set version in conda recipe
|
|
165
|
+
run: |
|
|
166
|
+
sed -i "s/^{% set version = \".*\" %}$/{% set version = \"${{ github.event.inputs.version }}\" %}/" conda-recipe/meta.yaml
|
|
167
|
+
grep '{% set version' conda-recipe/meta.yaml
|
|
168
|
+
|
|
169
|
+
- name: Setup Conda (conda-forge only)
|
|
170
|
+
uses: conda-incubator/setup-miniconda@v3
|
|
171
|
+
with:
|
|
172
|
+
miniforge-variant: Miniforge3
|
|
173
|
+
python-version: "3.12"
|
|
174
|
+
auto-activate: true
|
|
175
|
+
activate-environment: base
|
|
176
|
+
conda-remove-defaults: true
|
|
177
|
+
channels: conda-forge
|
|
178
|
+
channel-priority: strict
|
|
179
|
+
|
|
180
|
+
- name: Install build tools
|
|
181
|
+
shell: bash -l {0}
|
|
182
|
+
run: |
|
|
183
|
+
conda install -y conda-build anaconda-client
|
|
184
|
+
conda config --set anaconda_upload no
|
|
185
|
+
conda list conda-build
|
|
186
|
+
conda build --help
|
|
187
|
+
|
|
188
|
+
- name: Build package
|
|
189
|
+
shell: bash -l {0}
|
|
190
|
+
env:
|
|
191
|
+
PIP_NO_INDEX: "0"
|
|
192
|
+
run: |
|
|
193
|
+
PKG_PATH=$(conda build conda-recipe --output)
|
|
194
|
+
echo "PKG_PATH=$PKG_PATH" >> "$GITHUB_ENV"
|
|
195
|
+
conda build conda-recipe
|
|
196
|
+
test -f "$PKG_PATH"
|
|
197
|
+
echo "Built: $PKG_PATH"
|
|
198
|
+
|
|
199
|
+
- name: Upload to Anaconda
|
|
200
|
+
shell: bash -l {0}
|
|
201
|
+
env:
|
|
202
|
+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
|
|
203
|
+
run: |
|
|
204
|
+
anaconda -t "$ANACONDA_API_TOKEN" upload "$PKG_PATH" --user CCPBioSim --force
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Update copyright year(s) in license file
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 3 1 1 *' # 03:00 AM on January 1
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
update-license-year:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v6
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0
|
|
15
|
+
- uses: FantasticFiasco/action-update-license-year@v3
|
|
16
|
+
with:
|
|
17
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|