Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with GitHub Actions #138

Merged
merged 13 commits into from
Nov 6, 2023
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@ on:

jobs:
release:
if: github.event.pull_request.merged == true
if: ${{ github.event.pull_request.merged == true }} && ${{ contains(github.event.head_commit.message, 'Release') }}
runs-on: ubuntu-latest
steps:
- name: Checkout latest version
uses: actions/checkout@v3
with:
ref: devel

- name: Set version
id: manual-tagger
run: echo "NEW_TAG=$(perun --version | cut -d' ' -f2)" >> "$GITHUB_OUTPUT"

- name: Tag the new version
uses: phish108/[email protected].51
uses: phish108/[email protected].64
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-branch: devel
bump: minor
tag: ${{ steps.manual-tagger.outputs.NEW_TAG }}

build-and-deploy-doc:
needs: release
Expand All @@ -42,9 +46,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Compile the documentation
- name: Generate docs for Python using Tox
run: |
make -C docs html
tox -e docs

- name: Deploy to GH pages
uses: JamesIves/github-pages-deploy-action@v4
Expand Down Expand Up @@ -74,10 +78,10 @@ jobs:
run: |
# Install and upgrade pip
python3 -m pip install --upgrade pip
# Install dependencies for build and deplo
# Install dependencies for build and deploy
python3 -m pip install setuptools wheel twine

- name: Build python release distrubution package
- name: Build python release distribution package
run: |
pip3 install -q build
make pypi-release
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
run: |
pip3 install dist/*.tar.gz

- name: Try running perun and getting help
run: |
perun --help

# Tests that documentation is buildable. We limit the test to version 3.11 in order to have less clutter in Actions
build-docs:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion perun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

import importlib.metadata

__version__ = importlib.metadata.version(__package__)
__version__ = importlib.metadata.version("perun-toolsuite")
2 changes: 1 addition & 1 deletion perun/utils/cli_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def split_requirement(requirement: str) -> str:
split = re.split(version_delimiter, requirement)
return split[0] if len(split) > 0 else ""

reqs = {split_requirement(req) for req in metadata.requires("perun") or []}
reqs = {split_requirement(req) for req in metadata.requires("perun-toolsuite") or []}

dump_directory = pcs.get_safe_path(os.getcwd())
dump_file = os.path.join(
Expand Down
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[build-system]
requires = ["setuptools>=60", "setuptools-scm>=8.0", "wheel"]
requires = ["setuptools>=60", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "perun"
name = "perun-toolsuite"
description = "Perun: Lightweight Performance Version System"
version = "0.21.1"
requires-python = ">=3.9"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down Expand Up @@ -56,8 +57,7 @@ dependencies = [
]
# (1) Optional dependencies are made dynamic so that we can reuse them in tox. The goal is to have each
# dependency and its version constraints specified only once to avoid inconsistencies.
# (2) Version is made dynamic, so it can be used to automatically infer and tag the version of Perun
dynamic = ["optional-dependencies", "version"]
dynamic = ["optional-dependencies"]


[project.urls]
Expand Down Expand Up @@ -116,6 +116,7 @@ exclude = [
"build",
"docs",
"perun.egg-info",
"perun_toolsuite.egg-info",
"venv",
# Fixme: Temporary exclude
"perun/collect/trace"
Expand Down Expand Up @@ -218,5 +219,3 @@ target-version = [
]
line-length = 100

# This line has to be there, because otherwise the setuptools_scm will not infer the version
[tool.setuptools_scm]
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2526,4 +2526,4 @@ def raise_exception():
cli.DEV_MODE = False

with pytest.raises(Exception):
cli.launch_cli_in_dev_mode()()
cli.launch_cli_in_dev_mode()
Loading