pulserver 0.1.0__tar.gz → 0.1.2__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 (115) hide show
  1. pulserver-0.1.2/.github/workflows/docker.yml +39 -0
  2. pulserver-0.1.0/.github/workflows/test-cicd.yml → pulserver-0.1.2/.github/workflows/test-ci.yml +25 -20
  3. {pulserver-0.1.0 → pulserver-0.1.2}/PKG-INFO +27 -1
  4. pulserver-0.1.2/README.rst +77 -0
  5. pulserver-0.1.2/docker/Dockerfile +17 -0
  6. pulserver-0.1.2/docker/install_pulserver.sh +44 -0
  7. {pulserver-0.1.0 → pulserver-0.1.2}/pyproject.toml +5 -1
  8. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_version.py +2 -2
  9. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver.egg-info/PKG-INFO +27 -1
  10. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver.egg-info/SOURCES.txt +5 -1
  11. pulserver-0.1.2/src/pulserver.egg-info/entry_points.txt +2 -0
  12. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver.egg-info/requires.txt +2 -0
  13. pulserver-0.1.0/README.rst +0 -53
  14. {pulserver-0.1.0 → pulserver-0.1.2}/.github/workflows/style.yml +0 -0
  15. {pulserver-0.1.0 → pulserver-0.1.2}/.github/workflows/tags-release.yml +0 -0
  16. {pulserver-0.1.0 → pulserver-0.1.2}/.gitignore +0 -0
  17. {pulserver-0.1.0 → pulserver-0.1.2}/LICENSE.txt +0 -0
  18. {pulserver-0.1.0 → pulserver-0.1.2}/docs/Makefile +0 -0
  19. {pulserver-0.1.0 → pulserver-0.1.2}/docs/_templates/autosummary/base.rst +0 -0
  20. {pulserver-0.1.0 → pulserver-0.1.2}/docs/_templates/autosummary/class.rst +0 -0
  21. {pulserver-0.1.0 → pulserver-0.1.2}/docs/_templates/autosummary/function.rst +0 -0
  22. {pulserver-0.1.0 → pulserver-0.1.2}/docs/_templates/autosummary/module.rst +0 -0
  23. {pulserver-0.1.0 → pulserver-0.1.2}/docs/api.rst +0 -0
  24. {pulserver-0.1.0 → pulserver-0.1.2}/docs/binder/apt.txt +0 -0
  25. {pulserver-0.1.0 → pulserver-0.1.2}/docs/binder/environment.yml +0 -0
  26. {pulserver-0.1.0 → pulserver-0.1.2}/docs/client_server_architecture +0 -0
  27. {pulserver-0.1.0 → pulserver-0.1.2}/docs/conf.py +0 -0
  28. {pulserver-0.1.0 → pulserver-0.1.2}/docs/getting_started.rst +0 -0
  29. {pulserver-0.1.0 → pulserver-0.1.2}/docs/hands-on.ipynb +0 -0
  30. {pulserver-0.1.0 → pulserver-0.1.2}/docs/index.rst +0 -0
  31. {pulserver-0.1.0 → pulserver-0.1.2}/docs/misc/code_of_conduct.rst +0 -0
  32. {pulserver-0.1.0 → pulserver-0.1.2}/docs/misc/contributors.rst +0 -0
  33. {pulserver-0.1.0 → pulserver-0.1.2}/docs/misc/development.rst +0 -0
  34. {pulserver-0.1.0 → pulserver-0.1.2}/docs/misc/license.rst +0 -0
  35. {pulserver-0.1.0 → pulserver-0.1.2}/docs/requirements.txt +0 -0
  36. {pulserver-0.1.0 → pulserver-0.1.2}/docs/sequence_representation +0 -0
  37. {pulserver-0.1.0 → pulserver-0.1.2}/docs/sg_execution_times.rst +0 -0
  38. {pulserver-0.1.0 → pulserver-0.1.2}/docs/sphinx_add_colab_link.py +0 -0
  39. {pulserver-0.1.0 → pulserver-0.1.2}/setup.cfg +0 -0
  40. {pulserver-0.1.0 → pulserver-0.1.2}/setup.py +0 -0
  41. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/__init__.py +0 -0
  42. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_apps/SPGR2D.py +0 -0
  43. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_apps/SPGR3D.py +0 -0
  44. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_apps/bar.py +0 -0
  45. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_apps/foo.py +0 -0
  46. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_cli.py +0 -0
  47. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_core/__init__.py +0 -0
  48. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_core/_autoseg.py +0 -0
  49. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_core/_ceq.py +0 -0
  50. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_core/_sequence.py +0 -0
  51. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_server/__init__.py +0 -0
  52. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/_server/_server.py +0 -0
  53. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/__init__.py +0 -0
  54. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_grad/_make_spiral.py +0 -0
  55. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_misc/__init__.py +0 -0
  56. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_misc/_make_spoiler_gradient.py +0 -0
  57. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_phaseenc/__init__.py +0 -0
  58. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_phaseenc/_make_phase_blip.py +0 -0
  59. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_phaseenc/_make_phase_encoding.py +0 -0
  60. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_readout/__init__.py +0 -0
  61. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_readout/_make_line_readout.py +0 -0
  62. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_readout/_make_spiral_readout.py +0 -0
  63. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_readout/rosette_readout.py +0 -0
  64. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/__init__.py +0 -0
  65. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_make_spsp_pulse.py +0 -0
  66. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_plot.py +0 -0
  67. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/__init__.py +0 -0
  68. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/_slr.py +0 -0
  69. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/_utils.py +0 -0
  70. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/rf_ripple.py +0 -0
  71. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/spec_interp.py +0 -0
  72. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_alias.py +0 -0
  73. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_design.py +0 -0
  74. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_ep.py +0 -0
  75. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_filters.py +0 -0
  76. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_flyback.py +0 -0
  77. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_fourier.py +0 -0
  78. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_globals.py +0 -0
  79. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_grad.py +0 -0
  80. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_spect_correct.py +0 -0
  81. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/blocks/_rfpulse/_spsp/ss_verse.py +0 -0
  82. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/__init__.py +0 -0
  83. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_cartesian2D.py +0 -0
  84. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_cartesian3D.py +0 -0
  85. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_iterators/__init__.py +0 -0
  86. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_iterators/_base.py +0 -0
  87. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_iterators/_cartesian2D_iterator.py +0 -0
  88. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_iterators/_cartesian3D_iterator.py +0 -0
  89. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_iterators/_noncartesian2D_iterator.py +0 -0
  90. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_iterators/_noncartesian3D_iterator.py +0 -0
  91. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_iterators/_stack3D_iterator.py +0 -0
  92. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_noncartesian2D.py +0 -0
  93. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_noncartesian3D.py +0 -0
  94. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_ordering.py +0 -0
  95. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_phase_cycling.py +0 -0
  96. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_sampling/__init__.py +0 -0
  97. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_sampling/_grid_sampling.py +0 -0
  98. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_sampling/_partial_fourier.py +0 -0
  99. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_sampling/_poisson_sampling.py +0 -0
  100. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_sampling/_tilt.py +0 -0
  101. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/plan/_stack3D.py +0 -0
  102. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/sequences/__init__.py +0 -0
  103. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/sequences/_design_2D_spgr.py +0 -0
  104. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver/sequences/_design_3D_spgr.py +0 -0
  105. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver.egg-info/dependency_links.txt +0 -0
  106. {pulserver-0.1.0 → pulserver-0.1.2}/src/pulserver.egg-info/top_level.txt +0 -0
  107. {pulserver-0.1.0 → pulserver-0.1.2}/tests/_core/test_autoseg.py +0 -0
  108. {pulserver-0.1.0 → pulserver-0.1.2}/tests/_core/test_ceq.py +0 -0
  109. {pulserver-0.1.0 → pulserver-0.1.2}/tests/_core/test_seqparams.py +0 -0
  110. {pulserver-0.1.0 → pulserver-0.1.2}/tests/_core/test_sequence.py +0 -0
  111. {pulserver-0.1.0 → pulserver-0.1.2}/tests/_server/test_server.py +0 -0
  112. {pulserver-0.1.0 → pulserver-0.1.2}/tests/helpers/__init__.py +0 -0
  113. {pulserver-0.1.0 → pulserver-0.1.2}/tests/helpers/asserts.py +0 -0
  114. {pulserver-0.1.0 → pulserver-0.1.2}/tests/plan/test_cartesian.py +0 -0
  115. {pulserver-0.1.0 → pulserver-0.1.2}/tests/plan/test_noncartesian.py +0 -0
@@ -0,0 +1,39 @@
1
+ name: Build and Push Docker Image
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v[0-9]+.[0-9]+.[0-9]+'
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ # Checkout the repository
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v3
16
+
17
+ # Set up Docker Buildx
18
+ - name: Set up Docker Buildx
19
+ uses: docker/setup-buildx-action@v2
20
+
21
+ # Log in to Docker Hub
22
+ - name: Log in to Docker Hub
23
+ uses: docker/login-action@v2
24
+ with:
25
+ username: ${{ secrets.DOCKER_USERNAME }}
26
+ password: ${{ secrets.DOCKER_TOKEN }}
27
+
28
+ # Build and push the Docker image
29
+ - name: Build and push Docker image
30
+ uses: docker/build-push-action@v5
31
+ with:
32
+ context: ./docker
33
+ file: ./docker/Dockerfile
34
+ push: true
35
+ tags: ${{ secrets.DOCKER_USERNAME }}/pulserver:latest
36
+
37
+ # Optionally, log out of Docker Hub
38
+ - name: Log out of Docker Hub
39
+ run: docker logout
@@ -1,4 +1,4 @@
1
- name: CI/CD
1
+ name: CI-CD
2
2
 
3
3
  on:
4
4
  push:
@@ -9,11 +9,10 @@ on:
9
9
  jobs:
10
10
  test:
11
11
  runs-on: ubuntu-latest
12
- needs: [test]
13
-
12
+
14
13
  strategy:
15
14
  matrix:
16
- python-version: [3.10, 3.12] # Specify the desired Python versions
15
+ python-version: [3.11, 3.12] # Specify the desired Python versions
17
16
 
18
17
  steps:
19
18
  - name: Checkout code
@@ -29,29 +28,38 @@ jobs:
29
28
  pip install .[test]
30
29
 
31
30
  - name: Run tests
32
- run: pytest --cov --cov-report=xml tests
33
-
31
+ run: pytest --cov --cov-report=xml tests
32
+
34
33
  - name: Upload coverage reports to Codecov
35
34
  uses: codecov/codecov-action@v4.0.1
36
35
  with:
37
36
  token: ${{ secrets.CODECOV_TOKEN }}
38
- slug: INFN-MRI/pulserver
39
-
37
+ slug: INFN-MRI/pulserver
38
+
40
39
  docs:
41
40
  runs-on: ubuntu-20.04
42
41
  needs: [test]
43
42
  steps:
44
- - name: Get the docs_build artifact
45
- uses: actions/download-artifact@v4
43
+ - name: Checkout code
44
+ uses: actions/checkout@v4
45
+
46
+ - name: Set up Python
47
+ uses: actions/setup-python@v5
46
48
  with:
47
- name: docs_final
48
- path: docs_build
49
- run-id: ${{ github.event.workflow_run.id }}
50
- github-token: ${{ secrets.GITHUB_TOKEN }}
51
-
49
+ python-version: "3.10"
50
+
51
+ - name: Install dependencies
52
+ run: |
53
+ pip install .[doc]
54
+ python -m pip install -r docs/requirements.txt
55
+
56
+ - name: Build API documentation
57
+ run: |
58
+ python -m sphinx docs docs_build
59
+
52
60
  - name: Display structure of docs
53
- run: ls -R docs_build/
54
-
61
+ run: ls -R docs_build/
62
+
55
63
  - name: Deploy to GitHub Pages
56
64
  uses: peaceiris/actions-gh-pages@v4
57
65
  with:
@@ -60,6 +68,3 @@ jobs:
60
68
  destination_dir: . # Ensure you deploy to the root of the gh-pages branch
61
69
  publish_branch: gh-pages
62
70
  keep_files: false
63
-
64
-
65
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulserver
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: A PyPulseq-based client/server MR sequence design toolbox.
5
5
  Author-email: Matteo Cencini <matteo.cencini@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/INFN-MRI/pulserver
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Python: >=3.10
17
17
  Description-Content-Type: text/x-rst
18
18
  License-File: LICENSE.txt
19
+ Requires-Dist: pyyaml
19
20
  Requires-Dist: numpy<2.0
20
21
  Requires-Dist: scipy<1.14
21
22
  Requires-Dist: numba
@@ -39,9 +40,34 @@ Requires-Dist: pydata-sphinx-theme; extra == "doc"
39
40
  Requires-Dist: myst-nb; extra == "doc"
40
41
  Requires-Dist: matplotlib; extra == "doc"
41
42
  Requires-Dist: mrtwin; extra == "doc"
43
+ Requires-Dist: sphinx-copybutton; extra == "doc"
42
44
 
43
45
  Pulserver
44
46
  =========
47
+ |Coverage| |CI/CD| |License| |Codefactor| |Sphinx| |PyPi| |Black| |PythonVersion|
48
+
49
+ .. |Coverage| image:: https://codecov.io/gh/INFN-MRI/pulserver/graph/badge.svg?token=qtB53xANwI
50
+ :target: https://codecov.io/gh/INFN-MRI/pulserver
51
+
52
+ .. |CI/CD| image:: https://github.com/INFN-MRI/pulserver/workflows/CI-CD/badge.svg
53
+ :target: https://github.com/INFN-MRI/pulserver
54
+
55
+ .. |License| image:: https://img.shields.io/github/license/INFN-MRI/pulserver
56
+ :target: https://github.com/INFN-MRI/pulserver/blob/main/LICENSE.txt
57
+
58
+ .. |Codefactor| image:: https://www.codefactor.io/repository/github/INFN-MRI/pulserver/badge
59
+ :target: https://www.codefactor.io/repository/github/INFN-MRI/pulserver
60
+
61
+ .. |Sphinx| image:: https://img.shields.io/badge/docs-Sphinx-blue
62
+ :target: https://infn-mri.github.io/pulserver
63
+
64
+ .. |PyPi| image:: https://img.shields.io/pypi/v/pulserver
65
+ :target: https://pypi.org/project/pulserver
66
+
67
+ .. |Black| image:: https://img.shields.io/badge/style-black-black
68
+
69
+ .. |PythonVersion| image:: https://img.shields.io/badge/Python-%3E=3.10-blue?logo=python&logoColor=white
70
+ :target: https://python.org
45
71
 
46
72
  Pulserver is a high-level wrapper over PyPulseq. It is designed to
47
73
  improve MR sequence code organization and provide a bridge
@@ -0,0 +1,77 @@
1
+ Pulserver
2
+ =========
3
+ |Coverage| |CI/CD| |License| |Codefactor| |Sphinx| |PyPi| |Black| |PythonVersion|
4
+
5
+ .. |Coverage| image:: https://codecov.io/gh/INFN-MRI/pulserver/graph/badge.svg?token=qtB53xANwI
6
+ :target: https://codecov.io/gh/INFN-MRI/pulserver
7
+
8
+ .. |CI/CD| image:: https://github.com/INFN-MRI/pulserver/workflows/CI-CD/badge.svg
9
+ :target: https://github.com/INFN-MRI/pulserver
10
+
11
+ .. |License| image:: https://img.shields.io/github/license/INFN-MRI/pulserver
12
+ :target: https://github.com/INFN-MRI/pulserver/blob/main/LICENSE.txt
13
+
14
+ .. |Codefactor| image:: https://www.codefactor.io/repository/github/INFN-MRI/pulserver/badge
15
+ :target: https://www.codefactor.io/repository/github/INFN-MRI/pulserver
16
+
17
+ .. |Sphinx| image:: https://img.shields.io/badge/docs-Sphinx-blue
18
+ :target: https://infn-mri.github.io/pulserver
19
+
20
+ .. |PyPi| image:: https://img.shields.io/pypi/v/pulserver
21
+ :target: https://pypi.org/project/pulserver
22
+
23
+ .. |Black| image:: https://img.shields.io/badge/style-black-black
24
+
25
+ .. |PythonVersion| image:: https://img.shields.io/badge/Python-%3E=3.10-blue?logo=python&logoColor=white
26
+ :target: https://python.org
27
+
28
+ Pulserver is a high-level wrapper over PyPulseq. It is designed to
29
+ improve MR sequence code organization and provide a bridge
30
+ between different Pulseq interpreter representations while providing
31
+ a familiar interface to PyPulseq user.
32
+
33
+ It also provide a server-based interface to enable online sequence design
34
+ routines, e.g., using the MR scanner as a client.
35
+
36
+ Features
37
+ --------
38
+
39
+
40
+
41
+ Installation
42
+ ------------
43
+ Pulserver can be installed via pip:
44
+
45
+ .. code-block:: bash
46
+
47
+ pip install pulserver
48
+
49
+ Development
50
+ -----------
51
+ If you want to modifiy the Pulserver code base:
52
+
53
+ .. code-block:: bash
54
+
55
+ git clone https://github.com/INFN-MRI/pulservert.git
56
+ pip install -e ./pulserver
57
+
58
+ Usage
59
+ -----
60
+
61
+ TODO: add quick example
62
+
63
+ Testing
64
+ -------
65
+ To run the tests, execute the following command in the terminal:
66
+
67
+ .. code-block:: bash
68
+
69
+ pytest .
70
+
71
+ License
72
+ -------
73
+ This project is licensed under the MIT License.
74
+
75
+ Contributing
76
+ ------------
77
+ Contributions are welcome! Please fork the repository and submit a pull request.
@@ -0,0 +1,17 @@
1
+ ARG BASE_IMAGE=ubuntu:22.04
2
+ FROM ${BASE_IMAGE} as base
3
+
4
+ ARG DEBIAN_FRONTEND=noninteractive
5
+
6
+ ARG PYTHON="python3.12"
7
+
8
+ # install python and pulserver dependencies
9
+ COPY install_pulserver.sh .
10
+ RUN bash install_pulserver.sh
11
+ RUN rm install_pulserver.sh
12
+
13
+ # set user
14
+ USER runner
15
+
16
+ # set entrypoint
17
+ ENTRYPOINT ["pulserver"]
@@ -0,0 +1,44 @@
1
+ # define apt-get installation command
2
+ APT_GET_INSTALL="apt-get install -yq --no-install-recommends"
3
+
4
+ # update, qq: quiet
5
+ apt-get update -qq
6
+
7
+ # ensure certificates are up to date
8
+ ${APT_GET_INSTALL} --reinstall ca-certificates
9
+
10
+ # base utilities
11
+ ${APT_GET_INSTALL} git software-properties-common gpg-agent
12
+
13
+ # add repo for python installation
14
+ add-apt-repository ppa:deadsnakes/ppa
15
+ apt update -qq
16
+ ${APT_GET_INSTALL} $PYTHON-full
17
+
18
+ # create alias for installed python version
19
+ ln -s /usr/bin/$PYTHON /usr/local/bin/python
20
+ ln -s /usr/bin/$PYTHON /usr/local/bin/python3
21
+
22
+ # clone repo to get requirements
23
+ git clone https://github.com/INFN-MRI/pulserver --depth 1 /opt/pulserver
24
+ cd /opt/pulserver
25
+ python -m ensurepip --upgrade
26
+ python -m pip install --upgrade pip
27
+
28
+ # create alias to ensure pip works in the same way as pip3
29
+ ln -s /usr/local/bin/pip3 /usr/local/bin/pip
30
+
31
+ # install mrpro and dependencies
32
+ python -m pip install --upgrade --upgrade-strategy "eager" .
33
+
34
+ # clean up
35
+ rm -r /opt/pulserver
36
+ apt-get clean && rm -rf /var/lib/apt/lists/*
37
+
38
+ # add user runner
39
+ adduser --disabled-password --gecos "" --uid 1001 runner \
40
+ && groupadd docker --gid 123 \
41
+ && usermod -aG sudo runner \
42
+ && usermod -aG docker runner \
43
+ && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
44
+ && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers
@@ -41,6 +41,7 @@ classifiers = [ # Optional
41
41
  ]
42
42
 
43
43
  dependencies = [
44
+ "pyyaml",
44
45
  "numpy<2.0",
45
46
  "scipy<1.14",
46
47
  "numba",
@@ -55,7 +56,7 @@ dependencies = [
55
56
  [project.optional-dependencies] # Optional
56
57
  dev = ["black", "isort"]
57
58
  test = ["pytest", "pytest-black", "pytest-cov", "pytest-sugar", "pytest-xdist"]
58
- doc = ["sphinx", "pydata-sphinx-theme", "myst-nb", "matplotlib", "mrtwin"]
59
+ doc = ["sphinx", "pydata-sphinx-theme", "myst-nb", "matplotlib", "mrtwin", "sphinx-copybutton"]
59
60
  # List URLs that are relevant to your project
60
61
  # This field corresponds to the "Project-URL" and "Home-Page" metadata fields:
61
62
  [project.urls] # Optional
@@ -63,6 +64,9 @@ doc = ["sphinx", "pydata-sphinx-theme", "myst-nb", "matplotlib", "mrtwin"]
63
64
  "Bug Reports" = "https://github.com/INFN-MRI/pulserver/issues"
64
65
  "Source" = "https://github.com/INFN-MRI/pulserver"
65
66
 
67
+ [project.scripts] # Optional
68
+ pulserver = "pulserver._cli:cli"
69
+
66
70
  [tool.setuptools.packages.find]
67
71
  where=["src"]
68
72
 
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.1.0'
16
- __version_tuple__ = version_tuple = (0, 1, 0)
15
+ __version__ = version = '0.1.2'
16
+ __version_tuple__ = version_tuple = (0, 1, 2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulserver
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: A PyPulseq-based client/server MR sequence design toolbox.
5
5
  Author-email: Matteo Cencini <matteo.cencini@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/INFN-MRI/pulserver
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Python: >=3.10
17
17
  Description-Content-Type: text/x-rst
18
18
  License-File: LICENSE.txt
19
+ Requires-Dist: pyyaml
19
20
  Requires-Dist: numpy<2.0
20
21
  Requires-Dist: scipy<1.14
21
22
  Requires-Dist: numba
@@ -39,9 +40,34 @@ Requires-Dist: pydata-sphinx-theme; extra == "doc"
39
40
  Requires-Dist: myst-nb; extra == "doc"
40
41
  Requires-Dist: matplotlib; extra == "doc"
41
42
  Requires-Dist: mrtwin; extra == "doc"
43
+ Requires-Dist: sphinx-copybutton; extra == "doc"
42
44
 
43
45
  Pulserver
44
46
  =========
47
+ |Coverage| |CI/CD| |License| |Codefactor| |Sphinx| |PyPi| |Black| |PythonVersion|
48
+
49
+ .. |Coverage| image:: https://codecov.io/gh/INFN-MRI/pulserver/graph/badge.svg?token=qtB53xANwI
50
+ :target: https://codecov.io/gh/INFN-MRI/pulserver
51
+
52
+ .. |CI/CD| image:: https://github.com/INFN-MRI/pulserver/workflows/CI-CD/badge.svg
53
+ :target: https://github.com/INFN-MRI/pulserver
54
+
55
+ .. |License| image:: https://img.shields.io/github/license/INFN-MRI/pulserver
56
+ :target: https://github.com/INFN-MRI/pulserver/blob/main/LICENSE.txt
57
+
58
+ .. |Codefactor| image:: https://www.codefactor.io/repository/github/INFN-MRI/pulserver/badge
59
+ :target: https://www.codefactor.io/repository/github/INFN-MRI/pulserver
60
+
61
+ .. |Sphinx| image:: https://img.shields.io/badge/docs-Sphinx-blue
62
+ :target: https://infn-mri.github.io/pulserver
63
+
64
+ .. |PyPi| image:: https://img.shields.io/pypi/v/pulserver
65
+ :target: https://pypi.org/project/pulserver
66
+
67
+ .. |Black| image:: https://img.shields.io/badge/style-black-black
68
+
69
+ .. |PythonVersion| image:: https://img.shields.io/badge/Python-%3E=3.10-blue?logo=python&logoColor=white
70
+ :target: https://python.org
45
71
 
46
72
  Pulserver is a high-level wrapper over PyPulseq. It is designed to
47
73
  improve MR sequence code organization and provide a bridge
@@ -3,9 +3,12 @@ LICENSE.txt
3
3
  README.rst
4
4
  pyproject.toml
5
5
  setup.py
6
+ .github/workflows/docker.yml
6
7
  .github/workflows/style.yml
7
8
  .github/workflows/tags-release.yml
8
- .github/workflows/test-cicd.yml
9
+ .github/workflows/test-ci.yml
10
+ docker/Dockerfile
11
+ docker/install_pulserver.sh
9
12
  docs/Makefile
10
13
  docs/api.rst
11
14
  docs/client_server_architecture
@@ -33,6 +36,7 @@ src/pulserver/_version.py
33
36
  src/pulserver.egg-info/PKG-INFO
34
37
  src/pulserver.egg-info/SOURCES.txt
35
38
  src/pulserver.egg-info/dependency_links.txt
39
+ src/pulserver.egg-info/entry_points.txt
36
40
  src/pulserver.egg-info/requires.txt
37
41
  src/pulserver.egg-info/top_level.txt
38
42
  src/pulserver/_apps/SPGR2D.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pulserver = pulserver._cli:cli
@@ -1,3 +1,4 @@
1
+ pyyaml
1
2
  numpy<2.0
2
3
  scipy<1.14
3
4
  numba
@@ -17,6 +18,7 @@ pydata-sphinx-theme
17
18
  myst-nb
18
19
  matplotlib
19
20
  mrtwin
21
+ sphinx-copybutton
20
22
 
21
23
  [test]
22
24
  pytest
@@ -1,53 +0,0 @@
1
- Pulserver
2
- =========
3
-
4
- Pulserver is a high-level wrapper over PyPulseq. It is designed to
5
- improve MR sequence code organization and provide a bridge
6
- between different Pulseq interpreter representations while providing
7
- a familiar interface to PyPulseq user.
8
-
9
- It also provide a server-based interface to enable online sequence design
10
- routines, e.g., using the MR scanner as a client.
11
-
12
- Features
13
- --------
14
-
15
-
16
-
17
- Installation
18
- ------------
19
- Pulserver can be installed via pip:
20
-
21
- .. code-block:: bash
22
-
23
- pip install pulserver
24
-
25
- Development
26
- -----------
27
- If you want to modifiy the Pulserver code base:
28
-
29
- .. code-block:: bash
30
-
31
- git clone https://github.com/INFN-MRI/pulservert.git
32
- pip install -e ./pulserver
33
-
34
- Usage
35
- -----
36
-
37
- TODO: add quick example
38
-
39
- Testing
40
- -------
41
- To run the tests, execute the following command in the terminal:
42
-
43
- .. code-block:: bash
44
-
45
- pytest .
46
-
47
- License
48
- -------
49
- This project is licensed under the MIT License.
50
-
51
- Contributing
52
- ------------
53
- Contributions are welcome! Please fork the repository and submit a pull request.
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