Skip to content

Commit f1cb1b5

Browse files
authored
Merge pull request #215 from easyscience/master
Trusted publishing for PyPi and dependencies
2 parents b1ca245 + bdc2f00 commit f1cb1b5

File tree

9 files changed

+37
-33
lines changed

9 files changed

+37
-33
lines changed

.github/workflows/python-publish.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ jobs:
2121
deploy:
2222

2323
runs-on: ubuntu-latest
24-
24+
permissions:
25+
id-token: write
26+
2527
steps:
2628
- uses: actions/checkout@v4
2729

2830
- uses: actions/setup-python@v5
2931
with:
30-
python-version: 3.10
32+
python-version: 3.12
3133

3234
- name: Install dependencies and build
3335
run: |
@@ -36,5 +38,5 @@ jobs:
3638
3739
- name: Publish distribution 📦 to PyPI
3840
uses: pypa/gh-action-pypi-publish@release/v1
39-
with:
40-
password: ${{ secrets.PYPI_PASSWORD }}
41+
#with:
42+
# password: ${{ secrets.PYPI_PASSWORD }}

docs/src/api/model.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. automodule:: easyreflectometry.experiment.model
1+
.. automodule:: easyreflectometry.model
22
:members:
33
:undoc-members:
44
:show-inheritance:

docs/src/api/sample.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
.. automodule:: easyreflectometry.sample.sample
2+
.. automodule:: easyreflectometry.sample
33
:members:
44
:undoc-members:
55
:show-inheritance:

docs/src/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525

2626
import easyreflectometry
2727

28-
sys.path.insert(0, os.path.abspath('../src'))
28+
# sys.path.insert(0, os.path.abspath('../src'))
29+
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "src"))
2930

3031
main_root = Path(__file__).parents[2]
3132
sys.path.append(str(main_root))

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ dev = [
6060
docs = [
6161
"myst_parser==4.0.1",
6262
"nbsphinx==0.9.7",
63-
"sphinx_autodoc_typehints==3.0.1",
64-
"sphinx_book_theme==1.1.4",
63+
"sphinx",
64+
"sphinx_autodoc_typehints",
65+
"sphinx-book-theme==1.1.4",
6566
"sphinx-copybutton==0.5.2",
6667
"toml==0.10.2",
6768
]

src/easyreflectometry/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.3.0'
1+
__version__ = '1.3.1'

src/easyreflectometry/data/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from .measurement import load_as_dataset
55

66
__all__ = [
7-
load,
8-
load_as_dataset,
9-
ProjectData,
10-
DataSet1D,
7+
"load",
8+
"load_as_dataset",
9+
"ProjectData",
10+
"DataSet1D",
1111
]

src/easyreflectometry/model/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from .resolution_functions import ResolutionFunction
66

77
__all__ = (
8-
LinearSpline,
9-
PercentageFwhm,
10-
ResolutionFunction,
11-
Model,
12-
ModelCollection,
8+
"LinearSpline",
9+
"PercentageFwhm",
10+
"ResolutionFunction",
11+
"Model",
12+
"ModelCollection",
1313
)

src/easyreflectometry/sample/__init__.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
from .elements.materials.material_solvated import MaterialSolvated
1515

1616
__all__ = (
17-
BaseAssembly,
18-
GradientLayer,
19-
Layer,
20-
LayerAreaPerMolecule,
21-
LayerCollection,
22-
Material,
23-
MaterialCollection,
24-
MaterialDensity,
25-
MaterialMixture,
26-
MaterialSolvated,
27-
Multilayer,
28-
RepeatingMultilayer,
29-
Sample,
30-
SurfactantLayer,
17+
"BaseAssembly",
18+
"GradientLayer",
19+
"Layer",
20+
"LayerAreaPerMolecule",
21+
"LayerCollection",
22+
"Material",
23+
"MaterialCollection",
24+
"MaterialDensity",
25+
"MaterialMixture",
26+
"MaterialSolvated",
27+
"Multilayer",
28+
"RepeatingMultilayer",
29+
"Sample",
30+
"SurfactantLayer",
3131
)

0 commit comments

Comments
 (0)