Skip to content
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

Convert setuptools2poetry #29

Merged
merged 5 commits into from
Nov 14, 2024
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: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 199
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]



Expand Down
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,33 @@ Python client using CouchDB as a token pool server.
Installation
============

To install, first clone the repository and then use pip to install:
Development & Testing
---------------------

To install `picas` source code for development, first clone the repository and then use [`poetry`](https://python-poetry.org/docs/) to install. `poetry` is a tool for dependency managing and packaging in Python. If you don't have `poetry`, install it first with `pipx install poetry`.
```
git clone git@github.com:sara-nl/picasclient.git
cd picasclient
pip install -U .
poetry install --with test
```
Note that poetry will create a virtual environment if it is not running withing an activated virtual environment already. In that case, you will need to run `poetry run` before your commands to execute them within the poetry virtual environment.

Testing
=======

First, install the test dependencies with
```
pip install ".[test]"
```
To test, run
```
flake8 picas tests
pytest tests
```

Installing package
------------------
The latest release of `picas` can be installed as a package from PyPI with:
```
pip install picas
```
You can then write your custom Python program to use `picas` based on the examples below.



Examples
========

Expand Down Expand Up @@ -159,13 +166,13 @@ cc src/fractals.c -o bin/fractals -lm
And finally, the `process_task.sh` code needs to call a different command. Replace

```
eval $INPUT
bash -c "$INPUT"
```

with:

```
./fractals -o $OUTPUT $INPUT
bin/fractals -o $OUTPUT $INPUT
```

to ensure the fractal code is called.
Expand Down
171 changes: 171 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.poetry]
name = "picas"
version = "0.3.1"
description = "Python client using CouchDB as a token pool server."
authors = ["Jan Bot, Joris Borgdorff, Lodewijk Nauta, Haili Hu"]
license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
couchdb = "^1.2"
stopit = "^1.1.2"

[tool.poetry.group.test.dependencies]
pytest = "^8.3.3"
flake8 = "^7.1.1"

[tool.poetry.group.test]
optional = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

26 changes: 0 additions & 26 deletions setup.py

This file was deleted.