Skip to content

Commit

Permalink
Merge pull request #6 from PlasmaFAIR/release-prep
Browse files Browse the repository at this point in the history
Release prep
  • Loading branch information
JoelLucaAdams authored Oct 29, 2024
2 parents 589bf0f + 8326152 commit 4f47200
Show file tree
Hide file tree
Showing 5 changed files with 826 additions and 44 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build/publish Python Package

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package
run: |
python -m build --sdist --wheel
- name: Check package
run: |
python -m twine check dist/*
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/epyscan
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
16 changes: 16 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cff-version: 1.2.0
title: >-
epyscan - Create campaigns of EPOCH runs over a given parameter space using various sampling methods
message: 'If you use this software, please cite it using the metadata from this file.'
type: software
authors:
- family-names: Hill
given-names: Peter
orcid: 'https://orcid.org/0000-0003-3092-1858'
affiliation: University of York
- family-names: Adams
given-names: Joel L.
orcid: 'https://orcid.org/0009-0005-4889-5231'
affiliation: University of York
repository-code: 'https://github.com/PlasmaFAIR/epyscan'
date-released: '2024-05-07'
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# epyscan

Create campaigns of EPOCH runs over a given parameter space using
different sampling methods
various sampling methods

This is a work in progress, with only uniform grid scans implemented
so far.
## Installation

## Examples
Install from PyPI with:

```bash
pip install epyscan
```

or from a local checkout:

```bash
git clone https://github.com/PlasmaFAIR/epyscan.git
cd epyscan
pip install .
```

We recommend switching to [uv](https://docs.astral.sh/uv/) to manage packages.

## Usage

Parameter space to be sampled is described by a `dict` where keys
should be in the form of `block_name:parameter`, and values should
Expand Down
80 changes: 40 additions & 40 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
[build-system]
requires = [
"setuptools >= 65",
"setuptools_scm[toml] >= 6.2",
"wheel >= 0.29.0",
"setuptools >= 65",
"setuptools_scm[toml] >= 6.2",
"wheel >= 0.29.0",
]
build-backend = "setuptools.build_meta"

[project]
name = "epyscan"
dynamic = ["version"]
readme = "README.md"
license = { file = "LICENCE.md" }
authors = [
{name = "Peter Hill", email = "peter.hill@york.ac.uk"},
{name = "Joel Adams", email = "joel.adams@york.ac.uk"}
{ name = "Peter Hill", email = "peter.hill@york.ac.uk" },
{ name = "Joel Adams", email = "joel.adams@york.ac.uk" },
]
license = {text = "BSD"}
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"epydeck @ git+https://github.com/PlasmaFAIR/epydeck.git@main",
"numpy >= 1.24",
"scipy >= 1.10",
]
"epydeck @ git+https://github.com/PlasmaFAIR/epydeck.git@main",
"numpy >= 1.24",
"scipy >= 1.10",
]
description = "Create campaigns of EPOCH plasma PIC code runs over a given parameter space using various sampling methods."

[project.optional-dependencies]
docs = [
"sphinx >= 5.3",
"sphinx_autodoc_typehints >= 1.19",
"sphinx-book-theme >= 0.4.0rc1",
"sphinx-argparse-cli >= 1.10.0",
"sphinx-inline-tabs",
]
tests = [
"pytest >= 3.3.0",
"sphinx >= 5.3",
"sphinx_autodoc_typehints >= 1.19",
"sphinx-book-theme >= 0.4.0rc1",
"sphinx-argparse-cli >= 1.10.0",
"sphinx-inline-tabs",
]
tests = ["pytest >= 3.3.0"]
lint = ["ruff"]

[tool.setuptools_scm]
Expand All @@ -43,27 +43,27 @@ target-version = "py39"

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
ignore = [
"PLR2004", # magic-comparison
"B9", # flake8-bugbear opinionated warnings
"PLR2004", # magic-comparison
"B9", # flake8-bugbear opinionated warnings
]
Loading

0 comments on commit 4f47200

Please sign in to comment.