Skip to content

Commit

Permalink
Merge pull request #2 from eodcgmbh/initial-implementation
Browse files Browse the repository at this point in the history
update module src, dev environment, and github action
  • Loading branch information
SerRichard authored Nov 28, 2024
2 parents 2c5f8b1 + efda5a2 commit 20db846
Show file tree
Hide file tree
Showing 11 changed files with 305 additions and 70 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "rucio",

"dockerComposeFile": "./docker-compose.yml",

"service": "workspace",

"workspaceFolder": "/stac-rucio",

// "postCreateCommand": "chown -R postgres /opt/rucio && chown -R postgres /rucio && chown -R postgres /tmp && su postgres",

// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/opt/stac-rucio/.venv",
"python.venvPath": "/opt/stac-rucio/.venv",
"python.pythonPath": "/opt/stac-rucio/.venv/bin/python",
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": true,
"python.testing.pytestEnabled": true,
"python.linting.enabled": true
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"eamodio.gitlens",
"GitLab.gitlab-workflow"
],

"remoteEnv": {
"GPG_TTY": "$(tty)`"
}
}
13 changes: 13 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3.8"

services:
workspace:
container_name: stac-rucio-devcontainer
build:
context: ..
dockerfile: "Dockerfile"
target: base
volumes:
- ../:/stac-rucio
- /opt/rucio/etc/rucio.cfg:/opt/rucio/etc/rucio.cfg
tty: true
43 changes: 34 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,39 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_version: 2.21.0
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

- name: Run unit tests
run: |
nix-shell --command "poetry run python3 -m pytest"
# - name: Get full Python version
# id: full-python-version
# run: echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT

# - name: Bootstrap poetry
# run: |
# curl -sL https://install.python-poetry.org | python - -y

# - name: Update PATH
# run: echo "$HOME/.local/bin" >> $GITHUB_PATH

# - name: Configure poetry
# run: poetry config virtualenvs.in-project true

# - name: Install dependencies
# run: poetry install --with dev --all-extras

# - name: Pre-commit hooks
# run: poetry run pre-commit run

# - name: Run pytest
# run: poetry run pytest --cov=openeo-fastapi --cov-report=xml

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# files: ./coverage.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,4 @@ cython_debug/

notebooks/
.notebooks/
.poetry
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM dvrbanec/rucio-client:latest as base

WORKDIR /bin

RUN pip install --upgrade setuptools wheel

USER root

RUN dnf install -y git epel-release && \
git clone --depth 1 --branch v1.12.2 https://github.com/cern-fts/gfal2-python.git && \
gfal2-python/ci/fedora-packages.sh && \
cd gfal2-python/packaging && \
RPMBUILD_SRC_EXTRA_FLAGS="--without docs --without python2" make srpm && \
dnf builddep -y gfal2-python-1.12.2-1.el9.src.rpm && \
pip install gfal2-python

RUN pip install rucio==33.6.1 rucio_clients==33.6.1 ipykernel pystac_client pydantic
Loading

0 comments on commit 20db846

Please sign in to comment.