aiida-pythonjob 0.1.0__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 (42) hide show
  1. aiida_pythonjob-0.1.0/.github/workflows/ci.yml +91 -0
  2. aiida_pythonjob-0.1.0/.github/workflows/python-publish.yml +40 -0
  3. aiida_pythonjob-0.1.0/.gitignore +162 -0
  4. aiida_pythonjob-0.1.0/.pre-commit-config.yaml +13 -0
  5. aiida_pythonjob-0.1.0/.readthedocs.yml +24 -0
  6. aiida_pythonjob-0.1.0/LICENSE +21 -0
  7. aiida_pythonjob-0.1.0/PKG-INFO +82 -0
  8. aiida_pythonjob-0.1.0/README.md +31 -0
  9. aiida_pythonjob-0.1.0/docs/Makefile +20 -0
  10. aiida_pythonjob-0.1.0/docs/environment.yml +7 -0
  11. aiida_pythonjob-0.1.0/docs/gallery/autogen/GALLERY_HEADER.rst +3 -0
  12. aiida_pythonjob-0.1.0/docs/gallery/autogen/how_to.py +311 -0
  13. aiida_pythonjob-0.1.0/docs/make.bat +35 -0
  14. aiida_pythonjob-0.1.0/docs/requirements.txt +8 -0
  15. aiida_pythonjob-0.1.0/docs/source/conf.py +161 -0
  16. aiida_pythonjob-0.1.0/docs/source/index.rst +26 -0
  17. aiida_pythonjob-0.1.0/docs/source/installation.rst +44 -0
  18. aiida_pythonjob-0.1.0/docs/source/pythonjob.ipynb +2503 -0
  19. aiida_pythonjob-0.1.0/docs/source/tutorial/dft.ipynb +1128 -0
  20. aiida_pythonjob-0.1.0/docs/source/tutorial/html/atomization_energy.html +290 -0
  21. aiida_pythonjob-0.1.0/docs/source/tutorial/html/pythonjob_eos_emt.html +290 -0
  22. aiida_pythonjob-0.1.0/docs/source/tutorial/index.rst +11 -0
  23. aiida_pythonjob-0.1.0/examples/test_add.py +15 -0
  24. aiida_pythonjob-0.1.0/pyproject.toml +149 -0
  25. aiida_pythonjob-0.1.0/src/aiida_pythonjob/__init__.py +16 -0
  26. aiida_pythonjob-0.1.0/src/aiida_pythonjob/calculations/__init__.py +3 -0
  27. aiida_pythonjob-0.1.0/src/aiida_pythonjob/calculations/pythonjob.py +306 -0
  28. aiida_pythonjob-0.1.0/src/aiida_pythonjob/config.py +14 -0
  29. aiida_pythonjob-0.1.0/src/aiida_pythonjob/data/__init__.py +4 -0
  30. aiida_pythonjob-0.1.0/src/aiida_pythonjob/data/pickled_data.py +87 -0
  31. aiida_pythonjob-0.1.0/src/aiida_pythonjob/data/pickled_function.py +145 -0
  32. aiida_pythonjob-0.1.0/src/aiida_pythonjob/data/serializer.py +122 -0
  33. aiida_pythonjob-0.1.0/src/aiida_pythonjob/launch.py +67 -0
  34. aiida_pythonjob-0.1.0/src/aiida_pythonjob/parsers/__init__.py +3 -0
  35. aiida_pythonjob-0.1.0/src/aiida_pythonjob/parsers/pythonjob.py +111 -0
  36. aiida_pythonjob-0.1.0/src/aiida_pythonjob/utils.py +31 -0
  37. aiida_pythonjob-0.1.0/tests/conftest.py +18 -0
  38. aiida_pythonjob-0.1.0/tests/input.txt +1 -0
  39. aiida_pythonjob-0.1.0/tests/inputs_folder/another_input.txt +1 -0
  40. aiida_pythonjob-0.1.0/tests/test_data.py +23 -0
  41. aiida_pythonjob-0.1.0/tests/test_parsers.py +0 -0
  42. aiida_pythonjob-0.1.0/tests/test_pythonjob.py +225 -0
@@ -0,0 +1,91 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ # only pushes to main trigger
6
+ branches: [main]
7
+ pull_request:
8
+ # always triggered
9
+
10
+ jobs:
11
+
12
+ tests:
13
+ runs-on: ubuntu-latest
14
+ timeout-minutes: 30
15
+ strategy:
16
+ matrix:
17
+ python-version: ['3.12']
18
+ aiida-version: ['stable']
19
+
20
+ services:
21
+ postgres:
22
+ image: postgres:10
23
+ env:
24
+ POSTGRES_DB: test_aiida
25
+ POSTGRES_PASSWORD: ''
26
+ POSTGRES_HOST_AUTH_METHOD: trust
27
+ options: >-
28
+ --health-cmd pg_isready
29
+ --health-interval 10s
30
+ --health-timeout 5s
31
+ --health-retries 5
32
+ ports:
33
+ - 5432:5432
34
+ rabbitmq:
35
+ image: rabbitmq:latest
36
+ ports:
37
+ - 5672:5672
38
+
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+
42
+ - name: Set up Python ${{ matrix.python-version }}
43
+ uses: actions/setup-python@v5
44
+ with:
45
+ python-version: ${{ matrix.python-version }}
46
+ - name: Install project manager
47
+ run: |
48
+ pip install hatch pytest pytest-cov
49
+ - name: Run test suite
50
+ env:
51
+ PYTEST_ADDOPTS: "--durations=0"
52
+ AIIDA_WARN_v3: 1
53
+ run: |
54
+ hatch test --cover
55
+ - name: Upload coverage reports to Codecov
56
+ uses: codecov/codecov-action@v5
57
+ with:
58
+ token: ${{ secrets.CODECOV_TOKEN }}
59
+
60
+
61
+ docs:
62
+ runs-on: ubuntu-latest
63
+ timeout-minutes: 15
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+ - name: Set up Python ${{ matrix.python-version }}
67
+ uses: actions/setup-python@v5
68
+ with:
69
+ python-version: ${{ matrix.python-version }}
70
+ - name: Install project manager
71
+ run: |
72
+ pip install hatch
73
+ - name: Build docs
74
+ run: |
75
+ hatch run docs:build
76
+
77
+ static-analysis:
78
+ runs-on: ubuntu-latest
79
+ timeout-minutes: 15
80
+ steps:
81
+ - uses: actions/checkout@v4
82
+ - name: Set up Python ${{ matrix.python-version }}
83
+ uses: actions/setup-python@v5
84
+ with:
85
+ python-version: ${{ matrix.python-version }}
86
+ - name: Install project manager
87
+ run: |
88
+ pip install hatch
89
+ - name: Run formatter and linter
90
+ run: |
91
+ hatch fmt --check
@@ -0,0 +1,40 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ deploy:
20
+
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - uses: actions/checkout@v3
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v3
27
+ with:
28
+ python-version: '3.x'
29
+ - name: Install dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install build
33
+ - name: Build package
34
+ run:
35
+ python -m build
36
+ - name: Publish package
37
+ uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
38
+ with:
39
+ user: __token__
40
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,162 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
@@ -0,0 +1,13 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: format
5
+ name: format
6
+ entry: hatch fmt -f
7
+ language: system
8
+ types: [python]
9
+ - id: lint
10
+ name: lint
11
+ entry: hatch fmt -l
12
+ language: system
13
+ types: [python]
@@ -0,0 +1,24 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: "ubuntu-22.04"
5
+ tools:
6
+ python: "miniconda3-3.12-24.1" # note that libmamba-solver is available since 22.1
7
+ nodejs: "20" # maybe need to be also miniconda
8
+ jobs:
9
+ post_create_environment:
10
+ - python -m pip install --no-cache-dir .[docs]
11
+ - python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
12
+ - rabbitmq-server -detached
13
+ - sleep 5
14
+ - rabbitmq-diagnostics status
15
+ - verdi presto
16
+ - verdi daemon start
17
+ - verdi status
18
+
19
+ conda:
20
+ environment: docs/environment.yml
21
+
22
+ # Build from the docs/ directory with Sphinx
23
+ sphinx:
24
+ configuration: docs/source/conf.py
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 AiiDA team
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,82 @@
1
+ Metadata-Version: 2.3
2
+ Name: aiida-pythonjob
3
+ Version: 0.1.0
4
+ Summary: Run Python functions on a remote computer.
5
+ Project-URL: Source, https://github.com/aiidateam/aiida-pythonjob
6
+ Author-email: Xing Wang <xingwang1991@gmail.com>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2024 AiiDA team
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+ Keywords: aiida,plugin
29
+ Classifier: Development Status :: 3 - Alpha
30
+ Classifier: Framework :: AiiDA
31
+ Classifier: Intended Audience :: Science/Research
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Natural Language :: English
34
+ Classifier: Programming Language :: Python
35
+ Requires-Python: >=3.9
36
+ Requires-Dist: aiida-core<3,>=2.3
37
+ Requires-Dist: cloudpickle
38
+ Requires-Dist: voluptuous
39
+ Provides-Extra: docs
40
+ Requires-Dist: furo; extra == 'docs'
41
+ Requires-Dist: markupsafe<2.1; extra == 'docs'
42
+ Requires-Dist: nbsphinx; extra == 'docs'
43
+ Requires-Dist: sphinx; extra == 'docs'
44
+ Requires-Dist: sphinx-gallery; extra == 'docs'
45
+ Requires-Dist: sphinx-rtd-theme; extra == 'docs'
46
+ Requires-Dist: sphinxcontrib-contentui; extra == 'docs'
47
+ Requires-Dist: sphinxcontrib-details-directive; extra == 'docs'
48
+ Provides-Extra: pre-commit
49
+ Requires-Dist: pre-commit~=3.5; extra == 'pre-commit'
50
+ Description-Content-Type: text/markdown
51
+
52
+ # AiiDA-PythonJob
53
+ [![PyPI version](https://badge.fury.io/py/aiida-pythonjob.svg)](https://badge.fury.io/py/aiida-pythonjob)
54
+ [![Unit test](https://github.com/aiidateam/aiida-pythonjob/actions/workflows/ci.yml/badge.svg)](https://github.com/aiidateam/aiida-pythonjob/actions/workflows/ci.yml)
55
+ [![codecov](https://codecov.io/gh/aiidateam/aiida-pythonjob/branch/main/graph/badge.svg)](https://codecov.io/gh/aiidateam/aiida-pythonjob)
56
+ [![Docs status](https://readthedocs.org/projects/aiida-pythonjob/badge)](http://aiida-pythonjob.readthedocs.io/)
57
+
58
+ Efficiently design and manage flexible workflows with AiiDA, featuring an interactive GUI, checkpoints, provenance tracking, error-resistant, and remote execution capabilities.
59
+
60
+
61
+
62
+ ## Installation
63
+
64
+ ```console
65
+ pip install aiida-pythonjob
66
+ ```
67
+
68
+ To install the latest version from source, first clone the repository and then install using `pip`:
69
+
70
+ ```console
71
+ git clone https://github.com/aiidateam/aiida-pythonjob
72
+ cd aiida-pythonjob
73
+ pip install -e .
74
+ ```
75
+
76
+
77
+ ## Documentation
78
+ Explore the comprehensive [documentation](https://aiida-pythonjob.readthedocs.io/en/latest/) to discover all the features and capabilities of AiiDA Workgraph.
79
+
80
+
81
+ ## License
82
+ [MIT](http://opensource.org/licenses/MIT)
@@ -0,0 +1,31 @@
1
+ # AiiDA-PythonJob
2
+ [![PyPI version](https://badge.fury.io/py/aiida-pythonjob.svg)](https://badge.fury.io/py/aiida-pythonjob)
3
+ [![Unit test](https://github.com/aiidateam/aiida-pythonjob/actions/workflows/ci.yml/badge.svg)](https://github.com/aiidateam/aiida-pythonjob/actions/workflows/ci.yml)
4
+ [![codecov](https://codecov.io/gh/aiidateam/aiida-pythonjob/branch/main/graph/badge.svg)](https://codecov.io/gh/aiidateam/aiida-pythonjob)
5
+ [![Docs status](https://readthedocs.org/projects/aiida-pythonjob/badge)](http://aiida-pythonjob.readthedocs.io/)
6
+
7
+ Efficiently design and manage flexible workflows with AiiDA, featuring an interactive GUI, checkpoints, provenance tracking, error-resistant, and remote execution capabilities.
8
+
9
+
10
+
11
+ ## Installation
12
+
13
+ ```console
14
+ pip install aiida-pythonjob
15
+ ```
16
+
17
+ To install the latest version from source, first clone the repository and then install using `pip`:
18
+
19
+ ```console
20
+ git clone https://github.com/aiidateam/aiida-pythonjob
21
+ cd aiida-pythonjob
22
+ pip install -e .
23
+ ```
24
+
25
+
26
+ ## Documentation
27
+ Explore the comprehensive [documentation](https://aiida-pythonjob.readthedocs.io/en/latest/) to discover all the features and capabilities of AiiDA Workgraph.
28
+
29
+
30
+ ## License
31
+ [MIT](http://opensource.org/licenses/MIT)
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,7 @@
1
+ name: base
2
+ channels:
3
+ - conda-forge
4
+ - defaults
5
+ dependencies:
6
+ - aiida-core
7
+ - aiida-core.services
@@ -0,0 +1,3 @@
1
+ ===========
2
+ Quick Start
3
+ ===========