-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from xsuite/release/v0.2.0
Release 0.2.0
- Loading branch information
Showing
33 changed files
with
3,853 additions
and
586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This product includes software developed by: | ||
* [CERN](http://home.cern) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
# copyright ############################### # | ||
# This file is part of the Xaux package. # | ||
# Copyright (c) CERN, 2024. # | ||
# ######################################### # | ||
|
||
from xaux.tools import dev_make_release_branch | ||
# sys.tracebacklimit = 0 | ||
|
||
|
||
dev_make_release_branch("xaux") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
[tool.poetry] | ||
name = "xaux" | ||
version = "0.1.3" | ||
version = "0.2.0" | ||
description = "Support tools for Xsuite packages" | ||
authors = ["Frederik Van der Veken <[email protected]>", | ||
"Konstantinos Paraschou <[email protected]"] | ||
license = "Apache 2.0" | ||
authors = ["Frederik F. Van der Veken <[email protected]>", | ||
"Thomas Pugnat <[email protected]>", | ||
"Konstantinos Paraschou <[email protected]" | ||
] | ||
readme = "README.md" | ||
license = "Apache 2.0" | ||
include = ["LICENSE", "NOTICE"] | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
python = ">=3.8, <3.12" | ||
numpy = ">=1.0" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = ">=7.3" | ||
|
||
[tool.poetry.extras] | ||
tests = ["pytest"] | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
# Needed for pip install -e (BTW: need pip version 22) | ||
requires = ["poetry-core>=1.0.8"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
# pyproject.toml | ||
[tool.pytest.ini_options] | ||
addopts = "-ra --durations=10 --durations-min=1" | ||
python_functions = ["test_"] | ||
testpaths = [ | ||
"tests", | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
# copyright ############################### # | ||
# This file is part of the Xaux package. # | ||
# Copyright (c) CERN, 2024. # | ||
# ######################################### # | ||
|
||
from xaux.tools import dev_release | ||
# sys.tracebacklimit = 0 | ||
|
||
|
||
dev_release("xaux") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
# copyright ############################### # | ||
# This file is part of the Xaux package. # | ||
# Copyright (c) CERN, 2024. # | ||
# ######################################### # | ||
|
||
from xaux.tools import dev_rename_release_branch | ||
# sys.tracebacklimit = 0 | ||
|
||
|
||
dev_rename_release_branch("xaux") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import pytest | ||
from pathlib import Path | ||
import getpass | ||
import warnings | ||
|
||
from xaux.fs import afs_accessible, eos_accessible | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--user", action="store", default="sixtadm", help="Specify the user that has access to EOS and AFS." | ||
) | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def test_user(request): | ||
test_user = request.config.getoption("--user") | ||
afs_path = f"/afs/cern.ch/user/{test_user[0]}/{test_user}/public/test_xboinc/" | ||
eos_path = f"/eos/user/{test_user[0]}/{test_user}/test_xboinc/" | ||
skip_afs = True | ||
if afs_accessible: | ||
afs_paths_tried = [afs_path] | ||
if Path(afs_path).is_dir(): | ||
skip_afs = False | ||
else: | ||
test_user = getpass.getuser() | ||
afs_path = f"/afs/cern.ch/user/{test_user[0]}/{test_user}/public/test_xboinc/" | ||
if Path(afs_path).is_dir(): | ||
skip_afs = False | ||
else: | ||
afs_paths_tried.append(afs_path) | ||
warnings.warn("AFS test directory not accessible.\nPlease ensure the directory exists and verify " | ||
+ "your access rights (is your ticket still alive?).\nAlternatively, specify the test " | ||
+ "user account with the option `--user username`\nI Tried the following paths:\n " | ||
+ "\n ".join(afs_paths_tried) + "\nThe relevant AfsPath tests will be skipped.") | ||
skip_eos = True | ||
if eos_accessible: | ||
eos_paths_tried = [eos_path] | ||
if Path(eos_path).is_dir(): | ||
skip_eos = False | ||
else: | ||
# Do not overwrite test_user (as it will be used by the AFS ACL test) | ||
eos_path = f"/eos/user/{getpass.getuser()[0]}/{getpass.getuser()}/test_xboinc/" | ||
if Path(eos_path).is_dir(): | ||
skip_eos = False | ||
else: | ||
eos_paths_tried.append(eos_path) | ||
warnings.warn("EOS test directory not accessible.\nPlease ensure the directory exists and verify " | ||
+ "your access rights (is your ticket still alive?).\nAlternatively, specify the test " | ||
+ "user account with the option `--user username`\nI Tried the following paths:\n " | ||
+ "\n ".join(eos_paths_tried) + "\nThe relevant EosPath tests will be skipped.") | ||
return {"test_user": test_user, "afs_path": afs_path, "skip_afs": skip_afs, "eos_path": eos_path, "skip_eos": skip_eos} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# files="test_fs.py test_fs_api.py test_fs_afs.py test_fs_eos.py" | ||
files='' | ||
|
||
for i in 8 9 10 11 # 12 13 | ||
do | ||
source ~/miniforge3/bin/activate python3.$i | ||
python -c "import sys; print(f'Testing xaux FS in Python version {sys.version.split()[0]}')" | ||
pytest $files | ||
source ~/miniforge3/bin/activate | ||
done |
Oops, something went wrong.