Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kaliv0 committed Dec 14, 2024
1 parent c9bcb1a commit 6bced1d
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 24 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: ci
on:
push:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/checkout@v4
- name: Run lint
run: |
ruff check
ruff format --diff --line-length 100
- name: Run tests
run: pytest -v .
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<p align="center">
<img src="https://github.com/kaliv0/alter-ego/blob/main/assets/alter-ego.jpg?raw=true" width="250" alt="Alter Efo">
<img src="https://github.com/kaliv0/alterpy/blob/main/assets/alter-ego.jpg?raw=true" width="250" alt="Alter Ego">
</p>

---

# Alter Ego
# AlterPy
## My alter ego

[![tests](https://img.shields.io/github/actions/workflow/status/kaliv0/alter-ego/ci.yml)](https://github.com/kaliv0/alter-ego/actions/workflows/ci.yml)
[![tests](https://img.shields.io/github/actions/workflow/status/kaliv0/alterpy/ci.yml)](https://github.com/kaliv0/alterpy/actions/workflows/ci.yml)
![Python 3.x](https://img.shields.io/badge/python-^3.11-blue?style=flat-square&logo=Python&logoColor=white)
[![PyPI](https://img.shields.io/pypi/v/alter-ego.svg)](https://pypi.org/project/alter-ego/)
[![Downloads](https://static.pepy.tech/badge/alter-ego)](https://pepy.tech/projects/alter-ego)
[![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](https://github.com/kaliv0/alter-ego/blob/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/alterpy.svg)](https://pypi.org/project/alterpy/)
[![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](https://github.com/kaliv0/alterpy/blob/main/LICENSE)

Multi-key dictionary, supports adding and manipulating key-aliases pointing to shared values
Empty file removed alter_ego/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions alterpy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .alias_dict import AliasDict as AliasDict
from .exception import AliasError as AliasError
from .exception import AliasValueError as AliasValueError
2 changes: 1 addition & 1 deletion alter_ego/alias_dict.py → alterpy/alias_dict.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import UserDict, defaultdict

from alter_ego.exception import AliasError, AliasValueError
from alterpy.exception import AliasError, AliasValueError


class AliasDict(UserDict):
Expand Down
File renamed without changes.
35 changes: 21 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
[tool.poetry]
name = "alter-ago"
version = "0.1.0"
[build-system]
requires = ["setuptools>=75.6.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "alterpy"
version = "1.0.0"
readme = "README.md"
authors = ["kaliv0 <kaloyan.ivanov88@gmail.com>"]
authors = [{ name = "Kaloyan Ivanov", email = "kaloyan.ivanov88@gmail.com" }]
description = "Multi-key dictionary, supports adding and manipulating key-aliases pointing to shared values"
keywords = ["multi-key dictionary", "multidict", "alias-dict"]
repository = "https://github.com/kaliv0/alter-ego"
urls = { repository = "https://github.com/kaliv0/alterpy" }

[tool.poetry.dependencies]
python = "^3.11"
requires-python = ">= 3.11"

[project.optional-dependencies]
dev = [
"pytest>=8.3.4",
"ruff>=0.8.3",
"build>=1.2.2",
"twine>=6.0.1",
]

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.4"
ruff = "^0.8.3"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.setuptools.packages.find]
where = ["."]
include = ["alterpy"]
exclude = ["tests"]
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pytest>=8.3.4
ruff>=0.8.3
build>=1.2.2
twine>=6.0.1
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from alter_ego.alias_dict import AliasDict
from alterpy.alias_dict import AliasDict


@pytest.fixture()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_alias_dict.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from alter_ego.alias_dict import AliasDict
from alter_ego.exception import AliasValueError, AliasError
from alterpy import AliasDict
from alterpy import AliasValueError, AliasError


def test_alias_dict(alias_dict):
Expand Down

0 comments on commit 6bced1d

Please sign in to comment.