Skip to content

Commit

Permalink
Merge branch 'main' into feat/lock_refresh_token
Browse files Browse the repository at this point in the history
  • Loading branch information
natthan-pigoux authored Nov 4, 2024
2 parents 9bef10f + f5e50f1 commit 7c2b8b8
Show file tree
Hide file tree
Showing 27 changed files with 681 additions and 681 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.6.9'
rev: 'v0.7.1'
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -24,7 +24,7 @@ repos:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,24 @@
![Legacy tests](https://github.com/DIRACGrid/diracx/actions/workflows/integration.yml/badge.svg?branch=main)
![security: bandit](https://github.com/DIRACGrid/diracx/actions/workflows/main.yml/badge.svg?branch=main)

# DiracX Prototype
# DiracX

This repository contains the code for DiracX.
It is still incomplete. Check the current progress on our [status board](https://github.com/orgs/DIRACGrid/projects/2/views/2).

This repository contains the proof-of-concept code for DiracX.
It is still extremely incomplete and lacking in documentation.
Feel free to look around however try not to draw any conclusions as the code is still rapidly evolving.

## Getting started

Follow the instructions in the [diracx-charts README](https://github.com/DIRACGrid/diracx-charts?tab=readme-ov-file#running-the-demo-locally) to try it out.

## Documentation

The documentation is scattered around [various files](./docs/).

## Publications and presentations

- [The NeXt Dirac Incarnation - CHEP 24](https://indico.cern.ch/event/1338689/contributions/6010971/)
- [Eventually coming with some Documentation - Dirac User Workshop 24](https://indico.cern.ch/event/1341205/contributions/5972930/)
- [Demo and Technical details - Dirac & Rucio Workshop 23](https://indico.cern.ch/event/1252369/contributions/5515392/)
- [Dirac: future Part1](https://indico.cern.ch/event/1292287/) and [Part2 - Bild-Dev meeting June 23](https://indico.cern.ch/event/1297397/)
28 changes: 25 additions & 3 deletions diracx-cli/src/diracx/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,34 @@ def vo_callback(vo: str | None) -> str:

@app.async_command()
async def login(
vo: Annotated[Optional[str], typer.Argument(callback=vo_callback)] = None,
group: Optional[str] = None,
vo: Annotated[
Optional[str],
typer.Argument(callback=vo_callback, help="Virtual Organization name"),
] = None,
group: Optional[str] = typer.Option(
None,
help="Group name within the VO. If not provided, the default group for the VO will be used.",
),
property: Optional[list[str]] = typer.Option(
None, help="Override the default(s) with one or more properties"
None,
help=(
"List of properties to add to the default properties of the group. "
"If not provided, default properties of the group will be used."
),
),
):
"""Login to the DIRAC system using the device flow.
- If only VO is provided: Uses the default group and its properties for the VO.
- If VO and group are provided: Uses the specified group and its properties for the VO.
- If VO and properties are provided: Uses the default group and combines its properties with the
provided properties.
- If VO, group, and properties are provided: Uses the specified group and combines its properties with the
provided properties.
"""
scopes = [f"vo:{vo}"]
if group:
scopes.append(f"group:{group}")
Expand Down
6 changes: 3 additions & 3 deletions diracx-client/src/diracx/client/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand All @@ -9,13 +9,13 @@
try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
except ValueError:
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"Dirac",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
7 changes: 3 additions & 4 deletions diracx-client/src/diracx/client/generated/_serialization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down Expand Up @@ -235,7 +234,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore
:param datetime.timedelta offset: offset in timedelta format
"""

def __init__(self, offset):
def __init__(self, offset) -> None:
self.__offset = offset

def utcoffset(self, dt):
Expand Down Expand Up @@ -637,7 +636,7 @@ class Serializer(object): # pylint: disable=too-many-public-methods
"multiple": lambda x, y: x % y != 0,
}

def __init__(self, classes: Optional[Mapping[str, type]] = None):
def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.serialize_type = {
"iso-8601": Serializer.serialize_iso,
"rfc-1123": Serializer.serialize_rfc,
Expand Down Expand Up @@ -1550,7 +1549,7 @@ class Deserializer(object):
r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?"
)

def __init__(self, classes: Optional[Mapping[str, type]] = None):
def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.deserialize_type = {
"iso-8601": Deserializer.deserialize_iso,
"rfc-1123": Deserializer.deserialize_rfc,
Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/_vendor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions diracx-client/src/diracx/client/generated/aio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand All @@ -9,13 +9,13 @@
try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
except ValueError:
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"Dirac",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/aio/_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/aio/_vendor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/python@6.23.0)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand All @@ -19,5 +19,5 @@
"ConfigOperations",
"JobsOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
Loading

0 comments on commit 7c2b8b8

Please sign in to comment.