Skip to content

Commit

Permalink
Initial commit: update pip3-skeleton with project specifics (#4)
Browse files Browse the repository at this point in the history
- Limit python compatibility to those versions supported by BlueAPI
  • Loading branch information
DiamondJoseph authored Aug 24, 2023
1 parent dc90103 commit ce24de5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
python: ["3.8", "3.9", "3.10", "3.11"]
install: ["-e .[dev]"]
# Make one version be non-editable to test both paths of version code
include:
- os: "ubuntu-latest"
python: "3.7"
install: ".[dev]"
python: ["3.9", "3.10", "3.11"]
install: [".[dev]", "-e .[dev]"]

runs-on: ${{ matrix.os }}
env:
Expand Down
40 changes: 25 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ dls-bluesky-core

|code_ci| |docs_ci| |coverage| |pypi_version| |license|

.. note::
This module stores Bluesky functionality that is common to multiple techniques or groups within the Diamond Light Source
organisation, such that it can be imported by instances of BlueAPI, or built upon within more focussed plan
repositories to reduce duplication.

This project contains template code only. For documentation on how to
adopt this skeleton project see
https://DiamondLightSource.github.io/python3-pip-skeleton-cli

This is where you should write a short paragraph that describes what your module does,
how it does it, and why people should use it.
The 'plans' package contains functions that describe a full operation which performs an experiment and captures data,
and may wish to be available to instances of BlueAPI to allow common experiment types to be maintained centrally.
The 'stubs' package contains modular partial instructions that may act as a building block for constructing plans, for
which the implementation is common: e.g. querying APIs, standard handling of metadata
The 'tasks' package contains instructions that are not sufficient to run a full experiment but are useful utilities for
providing functionality to instances of BlueAPI: e.g. moving a motor.

============== ==============================================================
PyPI ``pip install dls-bluesky-core``
Expand All @@ -19,19 +21,27 @@ Documentation https://DiamondLightSource.github.io/dls-bluesky-core
Releases https://github.com/DiamondLightSource/dls-bluesky-core/releases
============== ==============================================================

This is where you should put some images or code snippets that illustrate
some relevant examples. If it is a library then you might put some
introductory code here:
The module built from this repository is intended to either act directly as a source of plans for an instance of
BlueAPI by being a planFunctions source in the config of an instance:

.. code-block:: python
.. code-block:: yaml
from dls_bluesky_core import __version__
worker:
env:
sources:
- kind: planFunctions
module: dls_bluesky_core.plans
- kind: planFunctions
module: dls_bluesky_core.tasks
print(f"Hello dls_bluesky_core {__version__}")
Or else contributing functionality that may be common with other plan repositories within Diamond.

.. code-block:: python
Or if it is a commandline tool then you might put some example commands here::
import dls_bluesky_core.stubs as cps
$ python -m dls_bluesky_core --version
def technique_specific_plan(*args, **kwargs):
yield from cps.common_diamond_setup()
.. |code_ci| image:: https://github.com/DiamondLightSource/dls-bluesky-core/actions/workflows/code.yml/badge.svg?branch=main
:target: https://github.com/DiamondLightSource/dls-bluesky-core/actions/workflows/code.yml
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ name = "dls-bluesky-core"
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
description = "One line description of your module"
description = "Common Diamond specific Bluesky plans and functions"
dependencies = [
"typing-extensions;python_version<'3.8'",
] # Add project dependencies here, e.g. ["click", "numpy"]
dynamic = ["version"]
license.file = "LICENSE"
readme = "README.rst"
requires-python = ">=3.7"
requires-python = ">=3.9"

[project.optional-dependencies]
dev = [
Expand Down

0 comments on commit ce24de5

Please sign in to comment.