Skip to content

Add Pip 23.1 compatibility #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 6, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Funnel
Copyright (c) 2022-2023 Funnel

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
PYTHON_VERSION ?= 3.8

dist: clean-dist
python3 setup.py sdist
pip install --upgrade pip build
python3 -m build .

setup: venv

venv: dev-packages.txt
virtualenv venv --python=${PYTHON_VERSION}
. venv/bin/activate && \
pip3 install --upgrade pip && \
pip3 install -r dev-packages.txt
pip3 install --requirement dev-packages.txt

.PHONY: test
test: venv
@ . venv/bin/activate && PYTHONPATH=src/ pytest -rsx tests/ src/ --cov ./src/python_on_rails/ --no-cov-on-fail --cov-report term-missing --doctest-modules --doctest-continue-on-failure
@ . venv/bin/activate && PYTHONPATH=src/ pytest -vv -rsx tests/ src/ --cov ./src/python_on_rails/ --no-cov-on-fail --cov-report term-missing --doctest-modules --doctest-continue-on-failure
@ . venv/bin/activate && flake8 src --exclude '#*,~*,.#*'
@ . venv/bin/activate && black --check src tests

.PHONY: clean
clean: clean-dist
Expand Down
1 change: 1 addition & 0 deletions dev-packages.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
flake8
black
pytest
pytest-clarity
pytest-cov
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
36 changes: 35 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,38 @@
universal = 0

[flake8]
max-line-length = 100
max-line-length = 100

[metadata]
name = python_on_rails
version = attr: python_on_rails.__version__
author = The Funnel Dev Team
author_email = [email protected]
description = Railway-Oriented Programming in Python.
keywords = ["Railway-Oriented Programming"]
license = MIT
long_description = file: README.md
long_description_content_type = text/markdown
requires_python = ~=3.8
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Software Development :: Libraries
project_urls =
Bug Reports = https://github.com/funnel-io/python-on-rails/issues
Source = https://github.com/funnel-io/python-on-rails
url = https://github.com/funnel-io/python-on-rails

[options]
package_dir =
=src
packages = find:

[options.packages.find]
where = src

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

5 changes: 3 additions & 2 deletions src/python_on_rails/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VERSION = "1.0.0"

__all__ = []
__version__ = "1.0.1"

VERSION = __version__
8 changes: 8 additions & 0 deletions src/python_on_rails/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@ def as_result(*exceptions):


def failure(error):
"""
>>> failure("some error")
<Result error='some error' value=None>
"""
return Result.failure(error)


def success(value):
"""
>>> success("great success")
<Result error=None value='great success'>
"""
return Result.success(value)


Expand Down