Skip to content

Commit ac89efe

Browse files
authored
Migrate to pyproject.toml, update for numpy 2.0 (#39)
* move to pyproject file * remove setup.py * not needed anymore * files included by default by Hatch since they are not ignored by VSC * ensure last empty line * switch to np.nan for numpy 2.0 compatibility * and bump patch version for release * and add to changelog * update authors metadata as discussed
1 parent 79f4de0 commit ac89efe

File tree

11 files changed

+93
-90
lines changed

11 files changed

+93
-90
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
with:
1414
src-dir: pylhc_submitter
1515
pytest-options: -m "not cern_network"
16-
secrets: inherit
16+
secrets: inherit

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ on: # Runs on any push event in a PR or any push event to master
1111

1212
jobs:
1313
documentation:
14-
uses: pylhc/.github/.github/workflows/documentation.yml@master
14+
uses: pylhc/.github/.github/workflows/documentation.yml@master

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ on: # Runs everytime a release is added to the repository
88
jobs:
99
deploy:
1010
uses: pylhc/.github/.github/workflows/publish.yml@master
11-
secrets: inherit
11+
secrets: inherit

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ jobs:
1515
uses: pylhc/.github/.github/workflows/tests.yml@master
1616
with:
1717
pytest-options: -m "not cern_network"
18-

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# `pylhc-submitter` Changelog
22

3+
## Version 2.0.4
4+
5+
- Fixed use of `np.NaN` to ensure compatibility with `numpy 2.0`.
6+
37
## Version 2.0.3
48

59
- Fixing `job_submitter`: Do not transfer any output files, when the `output_destination` is given.

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

pylhc_submitter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
__title__ = "pylhc_submitter"
1111
__description__ = "pylhc-submitter contains scripts to simplify the creation and submission of jobs to HTCondor at CERN"
1212
__url__ = "https://github.com/pylhc/submitter"
13-
__version__ = "2.0.3"
13+
__version__ = "2.0.4"
1414
__author__ = "pylhc"
1515
__author_email__ = "[email protected]"
1616
__license__ = "MIT"

pylhc_submitter/sixdesk_tools/post_process_da.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def _plot_seeds(ax, df_da: TfsDataFrame, da_col: str, interpolated: bool) -> Tup
261261
seed_mask = df_da[SEED] == seed
262262
angles = np.deg2rad(df_da.loc[seed_mask, ANGLE])
263263
da_data = df_da.loc[seed_mask, da_col]
264-
da_data.loc[da_data == 0] = np.NaN
264+
da_data.loc[da_data == 0] = np.nan
265265
if interpolated:
266266
seed_h, _, _ = _interpolated_line(
267267
ax,

pyproject.toml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[tool.hatch.version]
6+
path = "pylhc_submitter/__init__.py"
7+
8+
[tool.hatch.build.targets.sdist]
9+
exclude = [
10+
"/.github",
11+
"/doc",
12+
"/tests",
13+
]
14+
15+
[tool.hatch.build.targets.wheel]
16+
packages = ["pylhc_submitter"]
17+
18+
[project]
19+
name = "pylhc_submitter"
20+
readme = "README.md"
21+
description = "pylhc-submitter contains scripts to simplify the creation and submission of jobs to HTCondor at CERN"
22+
authors = [
23+
{name = "OMC Team", email = "[email protected]"}, # see zenodo file / commits for details
24+
]
25+
license = "MIT"
26+
dynamic = ["version"]
27+
requires-python = ">=3.9"
28+
29+
classifiers = [
30+
"Intended Audience :: Science/Research",
31+
"License :: OSI Approved :: MIT License",
32+
"Natural Language :: English",
33+
"Operating System :: OS Independent",
34+
"Programming Language :: Python :: 3 :: Only",
35+
"Programming Language :: Python :: 3.9",
36+
"Programming Language :: Python :: 3.10",
37+
"Programming Language :: Python :: 3.11",
38+
"Programming Language :: Python :: 3.12",
39+
"Programming Language :: Python :: Implementation :: CPython",
40+
"Topic :: Software Development :: Libraries :: Python Modules",
41+
"Typing :: Typed",
42+
]
43+
44+
dependencies = [
45+
"numpy >= 1.24",
46+
"scipy >= 1.10",
47+
"pandas >= 2.1",
48+
"tfs-pandas >= 3.8",
49+
"matplotlib >= 3.8",
50+
"htcondor >= 8.9.2 ; sys_platform=='linux'", # no bindings for macOS or windows on PyPI
51+
"generic-parser >= 1.1",
52+
]
53+
54+
[project.optional-dependencies]
55+
test = [
56+
"pytest>=7.0",
57+
"pytest-cov>=2.9",
58+
"pytest-mpl>=0.15",
59+
]
60+
doc = [
61+
"sphinx >= 7.0",
62+
"sphinx_rtd_theme >= 2.0",
63+
]
64+
65+
all = [
66+
"pylhc_submitter[test]",
67+
"pylhc_submitter[doc]",
68+
]
69+
70+
[project.urls]
71+
homepage = "https://github.com/pylhc/submitter"
72+
repository = "https://github.com/pylhc/submitter"
73+
documentation = "https://pylhc.github.io/submitter/"
74+
changelog = "https://github.com/pylhc/submitter/blob/master/CHANGELOG.md"
75+
76+
# ----- Testing ----- #
77+
78+
[tool.pytest.ini_options]
79+
markers = [
80+
"cern_network: tests that require access to afs or the technical network",
81+
]
82+
# Helpful for pytest-debugging (leave commented out on commit):
83+
# log_cli=true
84+
# log_level=DEBUG

setup.cfg

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)