Skip to content

Commit

Permalink
Merge branch 'v1.4.x' into test_under_slurm
Browse files Browse the repository at this point in the history
  • Loading branch information
djperrefort committed Oct 13, 2023
2 parents f020cdf + c66eec3 commit d035717
Show file tree
Hide file tree
Showing 10 changed files with 433 additions and 125 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 100
groups:
python-dependencies:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 100
groups:
actions-dependencies:
patterns:
- "*"
48 changes: 48 additions & 0 deletions .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CodeQL

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: 0 7 1 * *

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: /language:${{matrix.language}}

# Use this job for branch protection rules
report-codeql-status:
name: Report CodeQL Status
if: always()
needs: analyze
runs-on: ubuntu-latest
steps:
- name: Check build status
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
19 changes: 19 additions & 0 deletions .github/workflows/PackagePublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
environment: publish-pypi

steps:
<<<<<<< HEAD
=======
- name: Checkout source
uses: actions/checkout@v4

>>>>>>> v0.4.x
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -41,6 +47,7 @@ jobs:
with:
virtualenvs-create: false

<<<<<<< HEAD
- name: Checkout source
uses: actions/checkout@v3

Expand All @@ -50,14 +57,26 @@ jobs:
run: |
release_tag=${{github.ref}}
poetry version "${release_tag:11}"
=======
# Get the new package version from the release tag
# Git release tags are expected to start with "refs/tags/v"
- name: Set package version
run: |
release_tag=${{github.ref}}
poetry version "${release_tag#refs/tags/v}"
>>>>>>> v0.4.x

- name: Build package
run: poetry build -v

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
<<<<<<< HEAD
verbose: true
=======
print-hash: true
>>>>>>> v0.4.x
repository-url: ${{ matrix.host }}
user: ${{ secrets.REPO_USER }}
password: ${{ secrets.REPO_PASSWORD }}
29 changes: 29 additions & 0 deletions .github/workflows/PackageTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
workflow_dispatch:
workflow_call:
push:
<<<<<<< HEAD
=======
schedule:
- cron: 0 7 1,15 * *
>>>>>>> v0.4.x

jobs:
run-tests:
Expand All @@ -12,6 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
<<<<<<< HEAD
slurm_version:
- 20.02.5.1
- 20.11.9.1
Expand All @@ -37,6 +43,23 @@ jobs:
run: |
pip install poetry
poetry env use python${{ matrix.python_version }}
=======
python-version: [ "3.8", "3.9", "3.10", "3.11" ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
>>>>>>> v0.4.x

- name: Install dependencies
run: poetry install --with tests
Expand All @@ -50,7 +73,10 @@ jobs:
# Report partial coverage results to codacy for the current python version
- name: Report partial coverage results
if: github.event_name != 'release'
<<<<<<< HEAD
shell: bash
=======
>>>>>>> v0.4.x
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l Python -r coverage.xml
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
Expand All @@ -63,7 +89,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Finish reporting coverage
<<<<<<< HEAD
shell: bash
=======
>>>>>>> v0.4.x
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "shinigami"
name = "crc-shinigami"
packages = [
{ include = "shinigami" },
]
version = "0.0.0" # Version is set dynamically by the CI tool on publication
authors = ["Pitt Center for Research Computing"]
readme = "README.md"
Expand All @@ -28,7 +31,7 @@ shinigami = "shinigami.cli:Application.execute"
python = ">=3.8"
pydantic = "^2.0.3"
pydantic-settings = "^2.0.2"
asyncssh = {extras = ["bcrypt", "fido2"], version = "^2.13.2"}
asyncssh = { extras = ["bcrypt", "fido2"], version = "^2.13.2" }
pandas = "1.5.3" # Newer versions are incompatible with Python 3.8

[tool.poetry.group.tests]
Expand Down
2 changes: 1 addition & 1 deletion shinigami/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import importlib.metadata

try:
__version__ = importlib.metadata.version('shinigami')
__version__ = importlib.metadata.version('crc-shinigami')

except importlib.metadata.PackageNotFoundError: # pragma: no cover
__version__ = '0.0.0'
Loading

0 comments on commit d035717

Please sign in to comment.