Skip to content

Commit

Permalink
fix(ci): Add build dependency, upload package artifacts as build as…
Browse files Browse the repository at this point in the history
…sets
  • Loading branch information
AdrianoKF committed Aug 2, 2024
1 parent 343ce96 commit f116085
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 27 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
release:
types:
- released
- published

permissions:
contents: write
Expand All @@ -22,13 +22,34 @@ jobs:
pythonVersion: "3.11"
# Package build
- name: Build and check
id: build
run: |
python -m build
echo "package_wheel=$(basename dist/*.whl)" >> $GITHUB_OUTPUT
echo "package_sdist=$(basename dist/*.gz)" >> $GITHUB_OUTPUT
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- name: Add wheel as release asset
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/${{ steps.build.outputs.package_wheel }}
asset_name: ${{ steps.build.outputs.package_wheel }}
asset_content_type: application/zip
- name: Add sdist as release asset
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/${{ steps.build.outputs.package_sdist }}
asset_name: ${{ steps.build.outputs.package_sdist }}
asset_content_type: application/zip
# Docs
- name: Build release documentation
run: mkdocs build
Expand Down
50 changes: 25 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,39 @@ version = "0.1.0"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"docker",
"kubernetes",
"ray[train,default]==2.34.0",
"tensorflow",
"docker",
"kubernetes",
"ray[train,default]==2.34.0",
"tensorflow",
]
authors = [
{ name = "appliedAI Institute for Europe", email = "[email protected]" },
{ name = "appliedAI Institute for Europe", email = "[email protected]" },
]
maintainers = [
{ name = "Nicholas Junge", email = "[email protected]" },
{ name = "Max Mynter", email = "[email protected]" },
{ name = "Adrian Rumpold", email = "[email protected]" },
{ name = "Nicholas Junge", email = "[email protected]" },
{ name = "Max Mynter", email = "[email protected]" },
{ name = "Adrian Rumpold", email = "[email protected]" },
]

[project.scripts]
jobs_execute = "jobs.execute:execute"
jobby = "jobs.cli:main"

[project.optional-dependencies]
dev = ["ruff", "pytest", "pre-commit"]
dev = ["build", "ruff", "pytest", "pre-commit"]
docs = [
"mkdocs",
"mkdocs-callouts",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocs-section-index",
"mkdocs-material",
"mkdocstrings[python]",
"mkdocs-include-dir-to-nav",
"black", # formatting of signatures in docs
"mike",
"appnope", # required only on Darwin, but need to include in lockfile
"docstring-parser",
"mkdocs",
"mkdocs-callouts",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocs-section-index",
"mkdocs-material",
"mkdocstrings[python]",
"mkdocs-include-dir-to-nav",
"black", # formatting of signatures in docs
"mike",
"appnope", # required only on Darwin, but need to include in lockfile
"docstring-parser",
]

[tool.setuptools.package-data]
Expand All @@ -57,10 +57,10 @@ src = ["src"]
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
ignore = [
# Line too long
"E501",
# Allow capitalized variable names
"F841",
# Line too long
"E501",
# Allow capitalized variable names
"F841",
]

[tool.mypy]
Expand Down
7 changes: 6 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ babel==2.15.0
# via mkdocs-material
black==24.4.2
# via job-queue (pyproject.toml)
build==1.2.1
# via job-queue (pyproject.toml)
cachetools==5.3.3
# via google-auth
certifi==2024.7.4
Expand Down Expand Up @@ -237,6 +239,7 @@ optree==0.12.1
packaging==24.1
# via
# black
# build
# keras
# mkdocs
# pytest
Expand Down Expand Up @@ -298,6 +301,8 @@ pymdown-extensions==10.9
# mkdocstrings
pyparsing==3.1.2
# via mike
pyproject-hooks==1.1.0
# via build
pytest==8.2.2
# via job-queue (pyproject.toml)
python-dateutil==2.9.0.post0
Expand Down Expand Up @@ -353,7 +358,7 @@ rsa==4.9
# via google-auth
ruff==0.5.1
# via job-queue (pyproject.toml)
setuptools==70.3.0
setuptools==72.1.0
# via
# tensorboard
# tensorflow
Expand Down

0 comments on commit f116085

Please sign in to comment.