Skip to content

Commit

Permalink
Housekeeping (#84)
Browse files Browse the repository at this point in the history
* Move to pyproject.toml

* Workflow & readme

* ruff

* Fix build GHA

* pydantic version

* Docs build hack.

* Let's keep it with pydantic 1 for now here.

* Build docs on ubuntu-latest

* Revert some other changes.
  • Loading branch information
PeterKraus authored May 26, 2024
1 parent f18142b commit 0a6c4d7
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 2,982 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
matrix:
pyver: ['3.9']
os: ['windows-latest']
os: ['ubuntu-latest']
uses: ./.github/workflows/workflow-pages.yml
with:
pyver: ${{ matrix.pyver }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
shell: bash
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel
pip install -U setuptools build
- name: Build
shell: bash
run: |
python setup.py bdist_wheel
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist-${{ inputs.os }}-${{ inputs.pyver }}
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/workflow-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ on:
workflow_call:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: github/super-linter/slim@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: master
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_BLACK: true
VALIDATE_PYTHON_FLAKE8: true
VALIDATE_PYTHON_PYLINT: true
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- uses: chartboost/ruff-action@v1
with:
args: "format --check"
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@

- `example_counter`: an example device for testing purposes.

Partially supported hardware includes:

- `biologic`: device for BioLogic potentiostats via the EC-Lib library, Windows only.

See the [Documentation](https://dgbowl.github.io/tomato) for more detailed info.

## Contributors:
- [Peter Kraus](http://github.com/PeterKraus)
- [Loris Ercole](http://github.com/lorisercole)
- [Graham Kimbell](http://github.com/g-kimbell)

## Acknowledgements

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
# "sphinx.ext.autosummary",
"sphinx_autodoc_typehints",
# "sphinx_autodoc_typehints",
"sphinx_rtd_theme",
"sphinxcontrib.autodoc_pydantic",
"sphinxcontrib.mermaid",
Expand Down
65 changes: 65 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[build-system]
requires = ["setuptools >= 61.0", "setuptools-git-versioning"]
build-backend = "setuptools.build_meta"

[project]
dynamic = ["version"]
name = "tomato"
authors = [
{name = "Peter Kraus", email = "[email protected]"},
{name = "Graham Kimbell"},
]
maintainers = [
{name = "Peter Kraus", email = "[email protected]"},
]
description = "au-tomation without pain"
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
]
requires-python = ">= 3.9"
dependencies = [
"appdirs >= 1.4.0",
"toml >= 0.10",
"pyyaml >= 6.0",
"psutil >= 5.9",
"dgbowl_schemas >= 108",
"pyzmq >= 25.1",
"h5netcdf >= 1.3",
"xarray >= 2024.2",
"pydantic ~= 1.0",
]

[project.optional-dependencies]
testing = ["pytest"]
docs = [
"sphinx ~= 7.2",
"sphinx-rtd-theme ~= 1.3.0",
"autodoc-pydantic ~= 1.9.0",
"sphinxcontrib-mermaid ~= 0.9.2",
]

[project.urls]
Documentation = "https://dgbowl.github.io/tomato/master"
Issues = "https://github.com/dgbowl/tomato/issues"
Repository = "https://github.com/dgbowl/tomato/"

[project.scripts]
tomato = "tomato:run_tomato"
ketchup = "tomato:run_ketchup"
tomato-job = "tomato.daemon.job:tomato_job"
tomato-driver = "tomato.daemon.driver:tomato_driver"
tomato-daemon = "tomato.daemon:tomato_daemon"


[tool.setuptools-git-versioning]
enabled = true
dev_template = "{tag}.dev{ccount}"
dirty_template = "{tag}.dev{ccount}"

[tool.ruff]
11 changes: 0 additions & 11 deletions setup.cfg

This file was deleted.

69 changes: 0 additions & 69 deletions setup.py

This file was deleted.

5 changes: 3 additions & 2 deletions src/tomato/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import sys
from pathlib import Path

from importlib import metadata
import argparse
import logging
import zmq
import appdirs
import yaml

from tomato import tomato, ketchup, _version
from tomato import tomato, ketchup

sys.path += sys.modules["tomato"].__path__

__version__ = _version.get_versions()["version"]
__version__ = metadata.version("tomato")
VERSION = __version__
DEFAULT_TOMATO_PORT = 1234
logger = logging.getLogger(__name__)
Expand Down
Loading

0 comments on commit 0a6c4d7

Please sign in to comment.