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
22 changes: 12 additions & 10 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version-file: ".python-version"

- name: Install the project
run: uv sync --all-extras --dev

- name: Install dependencies
run: |
python -m pip install poetry
poetry install
- name: Build the project
run: uv build

- name: Poetry publish
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"
poetry publish --build
- name: Upload the project to PyPI
run: uv publish --token "${{ secrets.PYPI_API_TOKEN }}"

- name: Release to Github
uses: softprops/action-gh-release@v1
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install poetry
poetry install
python-version-file: ".python-version"

- name: Pre Commit
uses: pre-commit/action@v3.0.1
22 changes: 11 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.py
- name: Install dependencies
run: |
python -m pip install poetry
poetry install

- name: Install the project
run: uv sync --all-extras --dev

- name: Ubuntu keyring setup
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: t1m0thyj/unlock-keyring@v1

- name: MacOS keychain setup
if: ${{ matrix.os == 'macos-latest' }}
run: |
Expand All @@ -39,6 +39,6 @@ jobs:

- name: Run tests
run: |
poetry run archivooor
poetry run archivooor keys set test_value test_secret
poetry run archivooor keys delete
uv run archivooor
uv run archivooor keys set test_value test_secret
uv run archivooor keys delete
27 changes: 7 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,13 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: no-commit-to-branch
- repo: https://github.com/psf/black
rev: 24.4.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.0
hooks:
- id: black
- id: ruff
- id: ruff-format
files: \.py$
- repo: https://github.com/PyCQA/isort
rev: 5.13.0
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.6.8
hooks:
# Use isort for sorting imports.
- id: isort
additional_dependencies: ["toml"]
files: \.py$
- repo: local
hooks:
- id: poetry-check
name: Poetry check
description:
Validates the content of the pyproject.toml file and its consistency
with the poetry.lock file.
entry: poetry check
language: system
pass_filenames: false
files: pyproject.toml
- id: uv-lock
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ help:
@echo "install-dev - install all dependencies for development"

install-dev:
poetry install --with dev --all-extras
uv sync --all-extras --dev

lint:
@ERROR=0; \
poetry run isort archivooor || ERROR=1; \
poetry run black archivooor || ERROR=1; \
poetry run pydocstyle archivooor || ERROR=1; \
poetry run pylint archivooor || ERROR=1; \
poetry run mypy archivooor || ERROR=1; \
poetry run pre-commit run --all || ERROR=1; \
uv run ruff check --fix || ERROR=1; \
uv run mypy archivooor || ERROR=1; \
exit $$ERROR
934 changes: 0 additions & 934 deletions poetry.lock

This file was deleted.

51 changes: 31 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
[tool.poetry]
[project]
name = "archivooor"
version = "0.0.7"
description = "A Python package to submit web pages to the Wayback Machine for archiving."
authors = ["Barabazs <31799121+Barabazs@users.noreply.github.com>"]
license = "MIT"
authors = [
{ name = "Barabazs", email = "31799121+Barabazs@users.noreply.github.com" },
]
license = { text = "MIT" }
readme = "README.md"
repository = "https://github.com/Barabazs/archivooor"
requires-python = ">=3.9,<4.0"

[tool.poetry.scripts]
archivooor = "archivooor.cli:cli"
dependencies = [
"click>=8.1.8",
"keyring>=25.6.0",
"requests>=2.32.3",
"urllib3>=2.3.0",
]

[project.urls]
Homepage = "https://github.com/Barabazs/archivooor"
Repository = "https://github.com/Barabazs/archivooor"

[tool.poetry.dependencies]
python = "^3.9,<4.0"
requests = "^2.32.1"
urllib3 = "^1.26.18"
keyring = "^25.2.1"
click = "^8.1.7"
[project.scripts]
archivooor = "archivooor.cli:cli"

[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
pre-commit = "^3.5.0"
mypy = "^1.10.0"
isort = "^5.13.2"
pydocstyle = "^6.3.0"
[dependency-groups]
dev = ["mypy>=1.15.0", "pre-commit>=4.2.0", "ruff>=0.11.0"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.ruff.lint]
select = [
"I", # isort
# "PL", # pylint
# "E", # pycodestyle
# "W", # pycodestyle

]
Loading