Skip to content

Commit a8093be

Browse files
authored
Merge pull request #89 from dmgav/repo-update
Update the repository to use single pyproject.toml and pixi
2 parents d53d171 + 6e6372e commit a8093be

76 files changed

Lines changed: 465 additions & 2867 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flake8

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

.github/workflows/black.yml

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

.github/workflows/docs.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,36 @@ on: [push, pull_request]
55
jobs:
66
build:
77

8+
name: Test building docs
9+
810
runs-on: ubuntu-latest
11+
12+
env:
13+
python_env: py313
14+
915
strategy:
10-
matrix:
11-
python-version: [3.12]
1216
fail-fast: false
1317

1418
steps:
15-
- uses: actions/checkout@v2
16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v2
18-
with:
19-
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
21-
run: |
22-
sudo apt install redis
23-
24-
# These packages are installed in the base environment but may be older
25-
# versions. Explicitly upgrade them because they often create
26-
# installation problems if out of date.
27-
python -m pip install --upgrade pip setuptools numpy
28-
29-
pushd ..
30-
git clone https://github.com/bluesky/bluesky-queueserver.git
31-
cd bluesky-queueserver
32-
pip install .
33-
popd
34-
35-
pip install .
36-
pip install -r requirements-dev.txt
37-
pip list
38-
- name: Build Docs
39-
run: |
40-
make -C docs/ html
19+
- uses: actions/checkout@v4
20+
with:
21+
# Need this to get version number from last tag
22+
fetch-depth: 0
23+
24+
- uses: shogo82148/actions-setup-redis@v1
25+
with:
26+
redis-version: "7.x"
27+
28+
- uses: prefix-dev/setup-pixi@v0.10.0
29+
30+
- name: Install dev dependencies
31+
run: |
32+
set -vxeuo pipefail
33+
pixi install --environment=${{ env.python_env }}
34+
pixi list --environment=${{ env.python_env }}
35+
pixi run --environment=${{ env.python_env }} pip list
36+
pixi run --environment=${{ env.python_env }} conda list
37+
38+
- name: Run pre-commit
39+
run: |
40+
pixi run --environment=${{ env.python_env }} make -C docs/ html

.github/workflows/docs_publish.yml

Lines changed: 39 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Docs
1+
name: Documentation
22

33
on:
44
push:
@@ -8,57 +8,50 @@ on:
88
jobs:
99
build:
1010
if: github.repository_owner == 'bluesky'
11+
12+
name: Build and publish docs
13+
1114
runs-on: ubuntu-latest
15+
16+
env:
17+
python_env: py313
18+
1219
strategy:
13-
matrix:
14-
python-version: [3.12]
1520
fail-fast: false
1621

1722
steps:
18-
- uses: actions/checkout@v3
19-
with:
20-
fetch-depth: 1000 # should be enough to reach the most recent tag
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
23-
with:
24-
python-version: ${{ matrix.python-version }}
25-
- uses: shogo82148/actions-setup-redis@v1
26-
with:
27-
redis-version: "7.x"
28-
- name: Install dependencies
29-
run: |
30-
sudo apt install redis
23+
- uses: actions/checkout@v4
24+
with:
25+
# Need this to get version number from last tag
26+
fetch-depth: 0
27+
28+
- uses: shogo82148/actions-setup-redis@v1
29+
with:
30+
redis-version: "7.x"
3131

32-
# Versioneer uses the most recent git tag to generate __version__, which appears
33-
# in the published documentation.
34-
git fetch --tags
32+
- uses: prefix-dev/setup-pixi@v0.10.0
3533

36-
# These packages are installed in the base environment but may be older
37-
# versions. Explicitly upgrade them because they often create
38-
# installation problems if out of date.
39-
python -m pip install --upgrade pip setuptools numpy
34+
- name: Install dev dependencies
35+
run: |
36+
set -vxeuo pipefail
37+
pixi install --environment=${{ env.python_env }}
38+
pixi list --environment=${{ env.python_env }}
39+
pixi run --environment=${{ env.python_env }} pip list
40+
pixi run --environment=${{ env.python_env }} conda list
4041
41-
pushd ..
42-
git clone https://github.com/bluesky/bluesky-queueserver.git
43-
cd bluesky-queueserver
44-
pip install .
45-
popd
42+
- name: Run pre-commit
43+
run: |
44+
pixi run --environment=${{ env.python_env }} make -C docs/ html
4645
47-
pip install .
48-
pip install -r requirements-dev.txt
49-
pip list
50-
- name: Build Docs
51-
run: |
52-
make -C docs/ html
53-
- name: Deploy documentation to blueskyproject.io
54-
# We pin to the SHA, not the tag, for security reasons.
55-
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
56-
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
57-
with:
58-
deploy_key: ${{ secrets.ACTIONS_DOCUMENTATION_DEPLOY_KEY }}
59-
publish_branch: master
60-
publish_dir: ./docs/build/html
61-
external_repository: bluesky/bluesky.github.io
62-
destination_dir: bluesky-httpserver
63-
keep_files: true # Keep old files.
64-
force_orphan: false # Keep git history.
46+
- name: Deploy documentation to blueskyproject.io
47+
# We pin to the SHA, not the tag, for security reasons.
48+
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
49+
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
50+
with:
51+
deploy_key: ${{ secrets.ACTIONS_DOCUMENTATION_DEPLOY_KEY }}
52+
publish_branch: master
53+
publish_dir: ./docs/build/html
54+
external_repository: bluesky/bluesky.github.io
55+
destination_dir: bluesky-httpserver
56+
keep_files: true # Keep old files.
57+
force_orphan: false # Keep git history.

.github/workflows/flake8.yml

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

.github/workflows/isort.yml

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

.github/workflows/pre-commit.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,36 @@ jobs:
1111
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
1212

1313
name: Check code style
14+
1415
runs-on: ubuntu-latest
16+
17+
env:
18+
python_env: py313
19+
1520
strategy:
1621
fail-fast: false
22+
1723
defaults:
1824
run:
1925
shell: bash -l {0}
2026

2127
steps:
22-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
29+
with:
30+
# Need this to get version number from last tag
31+
fetch-depth: 0
2332

24-
- uses: actions/setup-python@v4
33+
- uses: prefix-dev/setup-pixi@v0.10.0
2534

2635
- name: Install dev dependencies
2736
run: |
2837
set -vxeuo pipefail
29-
pip install -r requirements-dev.txt
30-
python -m pip list
38+
set -vxeuo pipefail
39+
pixi install --environment=${{ env.python_env }}
40+
pixi list --environment=${{ env.python_env }}
41+
pixi run --environment=${{ env.python_env }} pip list
42+
pixi run --environment=${{ env.python_env }} conda list
3143
3244
- name: Run pre-commit
33-
run: pre-commit run --all-files
45+
run: |
46+
pixi run --environment=${{ env.python_env }} pre-commit run --all-files

.github/workflows/testing.yml

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,40 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.10", "3.11", "3.12", "3.13"]
12-
# pydantic-version: ["<2.0.0", ">=2.0.0"]
13-
# exclude:
14-
# - python-version: "3.9"
15-
# pydantic-version: "<2.0.0"
16-
# - python-version: "3.11"
17-
# pydantic-version: "<2.0.0"
18-
# - python-version: "3.12"
19-
# pydantic-version: "<2.0.0"
20-
11+
python-env: ["py311", "py312", "py313", "py314"]
2112
fail-fast: false
2213

2314
steps:
2415
- name: Checkout
2516
uses: actions/checkout@v4
26-
- name: Fetch tags
27-
run: git fetch --tags --prune --unshallow
28-
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v5
3017
with:
31-
python-version: ${{ matrix.python-version }}
18+
# Need this to get version number from last tag
19+
fetch-depth: 0
20+
3221
- uses: shogo82148/actions-setup-redis@v1
3322
with:
3423
redis-version: "7.x"
24+
25+
- uses: prefix-dev/setup-pixi@v0.10.0
3526
- name: Install dependencies
3627
run: |
37-
# sudo apt install redis
28+
pixi install --environment=${{ matrix.python-env }}
29+
pixi list --environment=${{ matrix.python-env }}
30+
pixi run --environment=${{ matrix.python-env }} pip list
31+
pixi run --environment=${{ matrix.python-env }} conda list
3832
33+
- name: Start LDAP
34+
run: |
3935
# Start LDAP
4036
bash continuous_integration/scripts/start_LDAP.sh
4137
42-
# These packages are installed in the base environment but may be older
43-
# versions. Explicitly upgrade them because they often create
44-
# installation problems if out of date.
45-
python -m pip install --upgrade pip setuptools numpy
46-
47-
pushd ..
48-
git clone https://github.com/bluesky/bluesky-queueserver.git
49-
cd bluesky-queueserver
50-
pip install .
51-
popd
52-
53-
pushd ..
54-
git clone https://github.com/bluesky/bluesky-queueserver-api.git
55-
cd bluesky-queueserver-api
56-
pip install .
57-
popd
58-
59-
pip install --upgrade pip
60-
pip install .
61-
pip install -r requirements-dev.txt
62-
# pip install "pydantic${{ matrix.pydantic-version }}"
63-
# pip install bluesky==1.11.0
64-
65-
pip list
6638
- name: Test with pytest
6739
env:
6840
PYTEST_ADDOPTS: "--durations=20"
6941
run: |
70-
coverage run -m pytest -vv
71-
coverage report -m
42+
pixi run --environment=${{ matrix.python-env }} coverage run -m pytest -vv
43+
pixi run --environment=${{ matrix.python-env }} coverage report -m
44+
7245
- name: Dump LDAP diagnostics on failure
7346
if: failure()
7447
run: |

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ coverage.xml
5858
docs/build/
5959
docs/source/generated/
6060

61+
**/_version.py
62+
6163
# pytest
6264
.pytest_cache/
6365

@@ -84,3 +86,8 @@ target/
8486

8587
# Testing
8688
.docker-test-artifacts/
89+
90+
# pixi environments
91+
.pixi/*
92+
!.pixi/config.toml
93+
pixi.lock

.isort.cfg

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

0 commit comments

Comments
 (0)