aiida-hyperqueue 0.1.0__tar.gz → 0.1.1__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.
Files changed (24) hide show
  1. aiida-hyperqueue-0.1.1/.github/workflows/cd.yml +53 -0
  2. aiida-hyperqueue-0.1.1/.github/workflows/validate_release_tag.py +44 -0
  3. aiida-hyperqueue-0.1.1/CHANGELOG.md +7 -0
  4. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/PKG-INFO +2 -2
  5. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/README.md +1 -1
  6. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/aiida_hyperqueue/__init__.py +1 -1
  7. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/pyproject.toml +2 -2
  8. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/.github/workflows/ci.yml +0 -0
  9. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/.gitignore +0 -0
  10. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/.pre-commit-config.yaml +0 -0
  11. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/.readthedocs.yml +0 -0
  12. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/LICENSE +0 -0
  13. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/aiida_hyperqueue/cli.py +0 -0
  14. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/aiida_hyperqueue/scheduler.py +0 -0
  15. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/docs/.gitignore +0 -0
  16. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/docs/Makefile +0 -0
  17. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/docs/source/conf.py +0 -0
  18. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/docs/source/developer_guide/index.md +0 -0
  19. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/docs/source/get_started.md +0 -0
  20. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/docs/source/img/AiiDA_transparent_logo.png +0 -0
  21. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/docs/source/index.md +0 -0
  22. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/tests/__init__.py +0 -0
  23. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/tests/conftest.py +0 -0
  24. {aiida-hyperqueue-0.1.0 → aiida-hyperqueue-0.1.1}/tests/test_scheduler.py +0 -0
@@ -0,0 +1,53 @@
1
+ name: cd
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v[0-9]+.[0-9]+.[0-9]+*'
7
+
8
+ jobs:
9
+
10
+ validate-release-tag:
11
+
12
+ if: github.repository == 'aiidateam/aiida-hyperqueue'
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout source
17
+ uses: actions/checkout@v3
18
+
19
+ - name: Set up Python 3.10
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: '3.10'
23
+
24
+ - name: Validate the tag version against the package version
25
+ run: python .github/workflows/validate_release_tag.py $GITHUB_REF
26
+
27
+ publish:
28
+
29
+ name: Publish to PyPI
30
+ needs: [validate-release-tag]
31
+ runs-on: ubuntu-latest
32
+ environment:
33
+ name: deployment
34
+ url: https://pypi.org/project/aiida-hyperqueue/
35
+ permissions:
36
+ id-token: write
37
+ steps:
38
+ - name: Checkout source
39
+ uses: actions/checkout@v3
40
+
41
+ - name: Set up Python 3.10
42
+ uses: actions/setup-python@v4
43
+ with:
44
+ python-version: '3.10'
45
+
46
+ - name: Install flit
47
+ run: pip install flit~=3.8
48
+
49
+ - name: Build with flit
50
+ run: flit build
51
+
52
+ - name: Publish package distributions to PyPI
53
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,44 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Validate that the version in the tag label matches the version of the package."""
3
+ import argparse
4
+ import ast
5
+ from pathlib import Path
6
+
7
+
8
+ def get_version_from_module(content: str) -> str:
9
+ """Get the ``__version__`` attribute from a module.
10
+
11
+ .. note:: This has been adapted from :mod:`setuptools.config`.
12
+ """
13
+ try:
14
+ module = ast.parse(content)
15
+ except SyntaxError as exception:
16
+ raise OSError('Unable to parse module.') from exception
17
+
18
+ try:
19
+ return next(
20
+ ast.literal_eval(statement.value) for statement in module.body
21
+ if isinstance(statement, ast.Assign)
22
+ for target in statement.targets
23
+ if isinstance(target, ast.Name) and target.id == '__version__')
24
+ except StopIteration as exception:
25
+ raise OSError(
26
+ 'Unable to find the `__version__` attribute in the module.'
27
+ ) from exception
28
+
29
+
30
+ if __name__ == '__main__':
31
+ parser = argparse.ArgumentParser()
32
+ parser.add_argument('GITHUB_REF',
33
+ help='The GITHUB_REF environmental variable')
34
+ args = parser.parse_args()
35
+ assert args.GITHUB_REF.startswith(
36
+ 'refs/tags/v'
37
+ ), f'GITHUB_REF should start with "refs/tags/v": {args.GITHUB_REF}'
38
+ tag_version = args.GITHUB_REF[11:]
39
+ package_version = get_version_from_module(
40
+ Path('aiida_hyperqueue/__init__.py').read_text(encoding='utf-8'))
41
+ error_message = (
42
+ f'The tag version `{tag_version}` is different from the package version `{package_version}`'
43
+ )
44
+ assert tag_version == package_version, error_message
@@ -0,0 +1,7 @@
1
+ ## v0.1.1
2
+
3
+ Only a small fix to the `README.md` was added here, this release is mainly to test the automated deployment to PyPI.
4
+
5
+ ## v0.1.0
6
+
7
+ First release on PyPI, tested with HyperQueue v0.15.0.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aiida-hyperqueue
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: AiiDA plugin for the HyperQueue metascheduler
5
5
  Author: Marnik Bercx
6
6
  Requires-Python: >=3.6
@@ -32,7 +32,7 @@ Provides-Extra: tests
32
32
 
33
33
  [![Build Status](https://github.com/aiidateam/aiida-hyperqueue/workflows/ci/badge.svg?branch=main)](https://github.com/aiidateam/aiida-hyperqueue/actions)
34
34
  [![Docs status](https://readthedocs.org/projects/aiida-hyperqueue/badge)](http://aiida-hyperqueue.readthedocs.io/)
35
- <!-- [![PyPI version](https://badge.fury.io/py/aiida-hyperqueue.svg)](https://badge.fury.io/py/aiida-hyperqueue) -->
35
+ [![PyPI version](https://badge.fury.io/py/aiida-hyperqueue.svg)](https://badge.fury.io/py/aiida-hyperqueue)
36
36
 
37
37
  # AiiDA HyperQueue plugin
38
38
 
@@ -1,6 +1,6 @@
1
1
  [![Build Status](https://github.com/aiidateam/aiida-hyperqueue/workflows/ci/badge.svg?branch=main)](https://github.com/aiidateam/aiida-hyperqueue/actions)
2
2
  [![Docs status](https://readthedocs.org/projects/aiida-hyperqueue/badge)](http://aiida-hyperqueue.readthedocs.io/)
3
- <!-- [![PyPI version](https://badge.fury.io/py/aiida-hyperqueue.svg)](https://badge.fury.io/py/aiida-hyperqueue) -->
3
+ [![PyPI version](https://badge.fury.io/py/aiida-hyperqueue.svg)](https://badge.fury.io/py/aiida-hyperqueue)
4
4
 
5
5
  # AiiDA HyperQueue plugin
6
6
 
@@ -5,4 +5,4 @@ aiida_hyperqueue
5
5
  AiiDA plugin for the HyperQueue metascheduler
6
6
  """
7
7
 
8
- __version__ = '0.1.0'
8
+ __version__ = '0.1.1'
@@ -4,11 +4,11 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "aiida-hyperqueue"
7
- version = "0.1.0"
7
+ dynamic = ['version']
8
+ description = "AiiDA plugin for the HyperQueue metascheduler"
8
9
  authors = [
9
10
  {name = "Marnik Bercx"}
10
11
  ]
11
- description = "AiiDA plugin for the HyperQueue metascheduler"
12
12
  readme = "README.md"
13
13
  license = {file = "LICENSE"}
14
14
  classifiers = [