Skip to content

Commit

Permalink
maintenance (#25)
Browse files Browse the repository at this point in the history
* Update workflows

* Change the way we ship

* Need the version
  • Loading branch information
odarbelaeze authored Sep 11, 2024
1 parent 4ea9b15 commit 3df234a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 27 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,45 @@
name: Upload Python Package

on:
push:
tags:
- "v*"
release:
types: ["plublished"]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Setup uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
uv-version: "0.4.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel hatch
hatch env create
uv venv .venv
uv pip install ".[dev]"
- name: Make sure we didn't forget anything in pre-commit
run: |
hatch run pre-commit run --all
uv run pre-commit run --all
- name: Test with pytest
run: |
hatch run pytest
uv run pytest
- name: Build and publish
env:
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_NON_INTERACTIVE: "1"
run: |
hatch build
hatch publish --no-prompt
uv build
uvx twine upload dist/*
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

- name: Setup uv
uses: yezz123/setup-uv@v4
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
uv-version: "0.4.9"
uv-venv: ".venv"

- name: Run tests for ${{ matrix.python-version }}
run: |
uv venv .venv
uv pip install ".[dev]"
uv run pre-commit run --all
uv run pytest
7 changes: 0 additions & 7 deletions Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,3 @@ build-backend = "hatchling.build"

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

[tool.hatch.envs.default]
features = ["dev"]
2 changes: 1 addition & 1 deletion src/bibx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"read_any",
]

__version__ = "0.0.1a9"
__version__ = "0.1.0"


def read_scopus_bib(*files: TextIO) -> Collection:
Expand Down

0 comments on commit 3df234a

Please sign in to comment.