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

Small updates for v1.1.1 #271

Merged
merged 9 commits into from
Oct 8, 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
8 changes: 8 additions & 0 deletions .github/workflows/integration-tests-irods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ on:
push:
branches:
- develop
paths-ignore:
- 'docs/**'
- 'tutorials/**'
- 'README.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'tutorials/**'
- 'README.md'

jobs:
build:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/integration-tests-yoda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ on:
push:
branches:
- develop
paths-ignore:
- 'docs/**'
- 'tutorials/**'
- 'README.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'tutorials/**'
- 'README.md'

jobs:
build:
Expand Down
99 changes: 64 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,76 @@ on:
jobs:
build:
strategy:
fail-fast: false
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: windows-latest
python-version: "3.11"
python-version: "3.12"
- os: macos-latest
python-version: "3.11"
python-version: "3.12"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Clone the repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
pip install --upgrade pip
pip install ".[test]"

- name: Test with pytest
run: |
pytest tests

- name: Lint with PyLint
run: |
pylint ibridges

- name: Check types with MyPy
run: |
mypy ibridges

linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4

- name: Install dependencies
run: |
pip install --upgrade pip
pip install ".[test]"

- name: Lint with Ruff
run: |
ruff check ibridges


docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]

- name: Lint with Ruff
run: |
ruff check ibridges

- name: Lint with PyLint
run: |
pylint ibridges

- name: Check types with MyPy
run: |
mypy ibridges

- name: Check if documentation builds.
run: |
cd docs; make html SPHINXOPTS="--keep-going"

- name: Test with pytest
run: |
pip install pytest
pytest tests
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install dependencies
run: |
pip install ".[docs]"

- name: Check if documentation builds.
run: |
cd docs; make html SPHINXOPTS="--keep-going"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ irods-basicGUI/logs/*
irods-iBridgesGui.spec
*DS_Store
docs/source/api/generated
docs/outputdir

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
15 changes: 6 additions & 9 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ build:
os: ubuntu-20.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
configuration: docs/source/conf.py

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
install:
- method: pip
path: .
extra_requirements:
- docs
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# iBridges <img src="docs/logo.png" width="150" align="right">
# iBridges <img src="https://github.com/iBridges-for-iRods/iBridges/blob/main/docs/logo.png?raw=true" width="150" align="right">
iBridges is a library for scientific programmers who are working with data in iRODS. We provide a wrapper around the [python-irodsclient](https://pypi.org/project/python-irodsclient/) to facilitate easy interaction with the iRODS server. iBridges is currently still in very active development.

[![PyPI version](https://badge.fury.io/py/ibridges.svg)](https://badge.fury.io/py/ibridges)
[![](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-irods.yml/badge.svg?branch=develop)](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-irods.yml) [![](https://github.com/UtrechtUniversity/iBridges/actions/workflows/main.yml/badge.svg?branch=develop)](https://github.com/UtrechtUniversity/iBridges/actions/workflows/main.yml)
[![](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-yoda.yml/badge.svg)](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-yoda.yml) ![](https://readthedocs.org/projects/ibridges/badge/?version=latest&style=flat-default)
[![Run integration tests against iRODS](https://github.com/iBridges-for-iRods/iBridges/actions/workflows/integration-tests-irods.yml/badge.svg)](https://github.com/iBridges-for-iRods/iBridges/actions/workflows/integration-tests-irods.yml)
[![Run integration tests against Yoda](https://github.com/iBridges-for-iRods/iBridges/actions/workflows/integration-tests-yoda.yml/badge.svg)](https://github.com/iBridges-for-iRods/iBridges/actions/workflows/integration-tests-yoda.yml)
[![Python package](https://github.com/iBridges-for-iRods/iBridges/actions/workflows/main.yml/badge.svg)](https://github.com/iBridges-for-iRods/iBridges/actions/workflows/main.yml)
![](https://readthedocs.org/projects/ibridges/badge/?version=latest&style=flat-default)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12583187.svg)](https://doi.org/10.5281/zenodo.12583187)

## Highlights
Expand All @@ -20,17 +22,18 @@ iBridges is a library for scientific programmers who are working with data in iR
- Small number of dependencies (`python-irodsclient` and `tqdm`)
- Safe default options when working with your data.

**iBridges** also has a graphical user interface, which you can install [here](https://github.com/iBridges-for-iRods/iBridges-GUI).

<p align="center">
<a href="https://github.com/UtrechtUniversity/iBridges/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=%5BBUG%5D">Report Bug</a>
<a href="https://github.com/iBridges-for-iRods/iBridges/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=%5BBUG%5D">Report Bug</a>
.
<a href="https://github.com/UtrechtUniversity/iBridges/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=%5BFEATURE%5D">Request Feature</a>
<a href="https://github.com/iBridges-for-iRods/iBridges/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=%5BFEATURE%5D">Request Feature</a>
.
<a href="https://github.com/UtrechtUniversity/iBridges/discussions/categories/ideas">Share an idea</a>
<a href="https://github.com/iBridges-for-iRods/iBridges/discussions/categories/ideas">Share an idea</a>
.
<a href="https://github.com/UtrechtUniversity/iBridges/discussions/categories/general">Leave some feedback</a>
<a href="https://github.com/iBridges-for-iRods/iBridges/discussions/categories/general">Leave some feedback</a>
.
<a href="https://github.com/UtrechtUniversity/iBridges/discussions/categories/q-a">Ask a question</a>
<a href="https://github.com/iBridges-for-iRods/iBridges/discussions/categories/q-a">Ask a question</a>
</p>
</p>

Expand All @@ -45,7 +48,7 @@ pip install ibridges
If you want to install the unstable version to test out new features, you can install the development branch:

```bash
pip install git+https://github.com/UtrechtUniversity/iBridges.git@develop
pip install git+https://github.com/iBridges-for-iRods/iBridges.git@develop
```

## Configuration
Expand Down
49 changes: 31 additions & 18 deletions docker/irods_catalog_provider/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
FROM ubuntu:22.04
ARG os_name=jammy

ENV DEBIAN_FRONTEND=noninteractive
ARG ubuntu_name=focal

RUN apt-get update
RUN apt-get install -y lsb-release gnupg wget sudo
RUN apt-get clean && \
RUN apt-get update && \
apt-get install -y \
apt-transport-https \
gnupg \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

# IRODS SERVER PACKAGES
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | sudo apt-key add -
RUN sudo rm -rf /etc/apt/sources.list.d/renci-irods.list
RUN sudo echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" |sudo tee /etc/apt/sources.list.d/renci-irods.list
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - && \
echo "deb [arch=amd64] https://packages.irods.org/apt/ jammy main" | tee /etc/apt/sources.list.d/renci-irods.list

RUN apt-get update
RUN apt-get install -y python3 unixodbc
RUN apt-get clean && \
RUN apt-get update && \
apt-get install -y \
libcurl4-gnutls-dev \
python3 \
python3-distro \
python3-jsonschema \
python3-pip \
python3-psutil \
python3-requests \
rsyslog \
unixodbc \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

ARG irods_version=4.3.2
ARG irods_package_version_suffix=-0~${os_name}
ARG irods_version=4.3.3
ARG irods_package_version_suffix=-0~jammy
ARG irods_package_version=${irods_version}${irods_package_version_suffix}
#ARG irods_resource_plugin_version=${irods_version}.0${irods_package_version_suffix}
ARG irods_package_plugin_version_suffix=-0+${irods_version}~jammy

RUN apt-get update && \
apt-get install -y irods-database-plugin-postgres=$irods_package_version
RUN apt-get install irods-server=$irods_package_version
RUN apt-get clean && \
apt-get install -y \
irods-database-plugin-postgres=${irods_package_version} \
irods-runtime=${irods_package_version} \
irods-server=${irods_package_version} \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

COPY setup-${irods_version}.input /
Expand Down
29 changes: 29 additions & 0 deletions docker/irods_catalog_provider/setup-4.3.3.input
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@




irods-catalog
5432
ICAT
irods
y
testpassword

y
demoResc

tempZone
1247
20000
20199
1248

rods
y
TEMPORARY_ZONE_KEY
32_byte_server_negotiation_key__
32_byte_server_control_plane_key
rods



2 changes: 1 addition & 1 deletion docker/irods_client/environments/plain-irods/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
password = "rods"
server_version = "4.3.2"
server_version = "4.3.3"
can_write_pam_pass = false
has_cached_pw = true
resources = ["demoResc", "resc2"]
Expand Down
6 changes: 0 additions & 6 deletions docs/requirements.txt

This file was deleted.

22 changes: 11 additions & 11 deletions docs/source/data_transfers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ collections, :meth:`IrodsPath.create_collection` can be used.
.. note::
By default, no data will be overwritten. If you want to overwrite data, you
can set :code:`overwrite=True`. Beware that you can also overwrite newer data with older data this way.
If a file and a dataobject are exactly the same, iBridges will silently skip the transfer,
If a file and a dataobject are exactly the same, iBridges will skip the transfer and print a warning,
thereby saving time.

For all operations, iBridges will check that the transfer has been completed without
Expand All @@ -34,7 +34,7 @@ If the transfer concerned a folder, a new collection with the folder name will b
from ibridges import IrodsPath
from pathlib import Path

local_path = Path("/path/to the/data/to/upload")
local_path = Path("/path/to/the/data/to/upload")
irods_path = IrodsPath(session, '~', 'new_coll')
upload(session, local_path, irods_path)

Expand Down Expand Up @@ -114,13 +114,12 @@ With the `python-irodsclient` which `iBridges` is built on, we can open the file
That works without any problems for textual data.

.. code-block:: python

from ibridges import IrodsPath

obj_path = IrodsPath(session, "path", "to", "object")

with obj_path.open('r') as stream:
content = stream.read().decode()

obj_path = IrodsPath(session, "path", "to", "object")
with obj_path.open('r') as stream:
content = stream.read().decode()


Some python libraries allow to be instantiated directly from such a stream. This is supported by e.g. `pandas`, `polars` and `whisper`.
Expand All @@ -129,6 +128,7 @@ Some python libraries allow to be instantiated directly from such a stream. This

import pandas as pd

with obj_path.open('r') as stream:
df = pd.read_csv(stream)
print(df)
with obj_path.open('r') as stream:
df = pd.read_csv(stream)

print(df)
Loading
Loading