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: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install the latest version of rye
uses: eifinger/setup-rye@v4
id: setup-rye
- name: Install uv
uses: astral-sh/setup-uv@v5
id: setup-uv
with:
enable-cache: true
cache-prefix: ${{ matrix.python-version }}

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

- name: Publish To PyPi
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
rye build
rye run twine upload dist/* -u __token__ -p $PYPI_TOKEN
uv build
uv publish --token $PYPI_TOKEN
5 changes: 4 additions & 1 deletion magicalapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ class Settings(BaseSettings):
logging_format: str = "{asctime} [{levelname}] - {name} : {message}"

model_config = SettingsConfigDict(
env_file=".env", env_prefix="mag_", case_sensitive=False
env_file=".env",
env_prefix="mag_",
case_sensitive=False,
extra="ignore",
)


Expand Down
16 changes: 4 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ Homepage = "https://github.com/magicalapi/magicalapi-python"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.rye]
managed = true
dev-dependencies = [
[dependency-groups]
dev = [
"pytest>=7.4.4",
"faker>=22.4.0",
"pytest-dependency>=0.6.0",
Expand All @@ -60,15 +59,8 @@ dev-dependencies = [
"pkginfo>=1.12.0",
]

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["magicalapi"]

[tool.rye.scripts]
smoke = { cmd = "pytest -vs smoke", env-file = ".env"}
test = { cmd = "pytest -vs tests"}
[tool.uv]
package = true


[tool.pytest.ini_options]
Expand Down
43 changes: 0 additions & 43 deletions requirements.lock

This file was deleted.

6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ isolated_build = true
[testenv]
description = run the tests with pytest
skip_install = true
allowlist_externals = rye
allowlist_externals = uv
commands_pre =
rye sync --no-lock
uv sync
commands =
rye run pytest {posargs:tests}
uv run pytest {posargs:tests}
Loading
Loading