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
18 changes: 14 additions & 4 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install build setuptools twine wheel
- name: Build and publish
pip install --upgrade pip build

- name: Build package
shell: bash
run: |
python -m build --sdist --wheel

- name: Publish
shell: bash
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build --sdist --wheel
twine upload dist/*
28 changes: 0 additions & 28 deletions .github/workflows/pytests.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install .
- name: Test with pytest
run: |
pytest

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
shell: bash
run: |
pip install --upgrade pip build

- name: Build package
shell: bash
run: |
python -m build --sdist --wheel

- name: Install tarball
shell: bash
run: |
pip install dist/*.gz

- name: Test installation
shell: bash
run: |
mlky --version
2 changes: 1 addition & 1 deletion mlky/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
import importlib.metadata

__version__ = importlib.metadata.version("mlky")
__version__ = "4.2.5"

# Instantiate before the CLI
from .configs import *
Expand Down
19 changes: 8 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
license-files = []

[tool.setuptools.packages.find]
include = ["mlky"]

[project]
name = "mlky"
version = "4.2.4"
dynamic = ["version"]
description = "Flexible Configurations: Because it's the only Way"
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -48,3 +38,10 @@ documentation = "https://jammont.github.io/mlky/"

[project.scripts]
mlky = "mlky:cli.cli.commands"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

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