Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy
pip install scipy
pip install pydantic
pip install accelerator-toolbox
pip install accelerator-commissioning==1.1.0
pip install matplotlib
pip install h5py
pip install PyYaml
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .[test]
pip install flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
_version.py

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
19 changes: 4 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,10 @@ If manual intervention is required, please follow the instructions provided by t
#### Releasing a new version on PyPi

1. Create a branch for a release
2. Set the version in pyaml/__init__.py:

```
__title__ = "pyAML"
__description__ = "Python Accelerator Middle Layer"
__url__ = "https://github.com/python-accelerator-middle-layer/pyaml"
__version__ = "0.2.4"
__author__ = "pyAML collaboration"
__author_email__ = ""
```
3. Provide a list of changes and release description in the merge request. Justify a version bump is necessary.
4. Approve and merge the PR

5. Then tag to the corresponding version.
6. CI/CD will take care of PyPi release. (Make sure the version in CI/CD deployment pipeline matches the one you just tagged.)
2. Provide a list of changes and release description in the merge request. Justify a version bump is necessary.
3. Tag the corresponding version.
4. Approve and merge the PR.
5. CI/CD will take care of PyPi release. (Make sure the version in CI/CD deployment pipeline matches the one you just tagged.)
### 4. Documentation
- **Improving Docs:** Fix typos, clarify instructions, or add missing documentation. Submit a PR as you would for code changes.
- **Website:** Our project website is at [python-accelerator-middle-layer.github.io](https://python-accelerator-middle-layer.github.io/).
Expand Down
5 changes: 3 additions & 2 deletions pyaml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
pyAML
"""

from ._version import __version__

__title__ = "pyAML"
__description__ = "Python Accelerator Middle Layer"
__url__ = "https://github.com/python-accelerator-middle-layer/pyaml"
__version__ = "0.2.4"
__author__ = "pyAML collaboration"
__author_email__ = ""

Expand All @@ -17,7 +18,7 @@

from pyaml.common.exception import PyAMLConfigException, PyAMLException

__all__ = [__version__, "PyAMLException", "PyAMLConfigException"]
__all__ = ["PyAMLException", "PyAMLConfigException"]


config_file = os.getenv("PYAML_LOG_CONFIG", "pyaml_logging.conf")
Expand Down
43 changes: 23 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.version]
path = "pyaml/__init__.py"

[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"/tests",
]

[tool.hatch.build.targets.wheel]
packages = ["pyaml"]

[tool.hatch.metadata]
allow-direct-references = true

[project]
name = "accelerator-middle-layer"
description = "Python Accelerator Middle Layer"
Expand Down Expand Up @@ -91,6 +71,29 @@ Homepage = "https://github.com/python-accelerator-middle-layer/pyaml"
Documentation = "https://python-accelerator-middle-layer.github.io/pyaml/"
Repository = "https://github.com/python-accelerator-middle-layer/pyaml.git"

[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"/tests",
]

[tool.hatch.build.targets.wheel]
packages = ["pyaml"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.hooks.vcs]
version-file = "pyaml/_version.py"

[tool.ruff]
line-length = 88
target-version = "py311"
Expand Down
Loading