Skip to content

Commit

Permalink
build: migrate to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ketiltrout committed Aug 15, 2024
1 parent 5e03e92 commit 569a838
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 84 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,15 @@ jobs:
lint-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install pip dependencies
run: |
pip install flake8 pytest black
pip install -r requirements.txt
python setup.py develop
# - name: Run flake8
# run: flake8 --show-source --ignore=E501,E741,E203,W503,E266 caput
run: pip install black

- name: Check code with black
run: black --check .
Expand All @@ -39,21 +33,18 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install pip dependencies
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
python setup.py develop
run: pip install -e .[test]

- name: Run serial tests
run: pytest -v tests/
- name: Run tests
run: pytest -v .

# run-docker-tests:

Expand Down
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "alpenhorn"
authors = [
{name = "Adam D. Hincks", email = "[email protected]"},
{name = "J. Richard Shaw", email = "[email protected]"},
{name = "D. V. Wiebe", email = "[email protected]"}
]
version="2.0.0a1"
description = "Data archive management software"
requires-python = ">=3.10"
dynamic = ["readme"]
license = {file = "LICENSE"}
dependencies = [
"Click >= 6.0",
"concurrent-log-handler",
"peewee >= 3.16",
"PyYAML",
"tabulate",
"watchdog"
]

[project.optional-dependencies]
test = [
"chimedb @ git+https://github.com/chime-experiment/chimedb.git",
"docker >= 3.0",
"pyfakefs >= 5.0",
"pytest >= 7.0"
]

[project.scripts]
alpenhorn = "alpenhorn.client:cli"
alpenhornd = "alpenhorn.service:cli"

[tool.setuptools]
packages = ["alpenhorn"]

[tool.setuptools.dynamic]
readme = {file = ["README.rst"], content-type = "text/x-rst"}
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

55 changes: 0 additions & 55 deletions setup.py

This file was deleted.

4 changes: 0 additions & 4 deletions test-requirements.txt

This file was deleted.

0 comments on commit 569a838

Please sign in to comment.