Skip to content

Commit

Permalink
Merge pull request #2 from lang-m/modernise-setup
Browse files Browse the repository at this point in the history
Remove old files, change structure
  • Loading branch information
lang-m authored Feb 6, 2025
2 parents c8e443c + 30a5182 commit 61494aa
Show file tree
Hide file tree
Showing 19 changed files with 127 additions and 232 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: workflow

on:
workflow_dispatch:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:
- name: checkout
uses: actions/checkout@v2

- name: install package
run: pip install .

# TODO move to pyproject.toml
- name: install test dependencies
run: pip install pycodestyle

- name: style
run: pycodestyle src/blaupause

- name: test
run: pytest
35 changes: 0 additions & 35 deletions .github/workflows/workflow.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .readthedocs.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

53 changes: 0 additions & 53 deletions Makefile

This file was deleted.

63 changes: 63 additions & 0 deletions README-old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Blaupause - Python package template
Martin Lang<sup>1</sup> and Marijan Beg<sup>1</sup>

<sup>1</sup> *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, United Kingdom*

| Description | Badge |
| --- | --- |
| Builds | [![Build status](https://ci.appveyor.com/api/projects/status/k4wb6m7btqy9lj86/branch/main?svg=true)](https://ci.appveyor.com/project/lang-m/blaupause/branch/main)|
| | [![Build Status](https://travis-ci.org/lang-m/blaupause.svg?branch=main)](https://travis-ci.org/lang-m/blaupause) |
| Coverage | [![codecov](https://codecov.io/gh/lang-m/blaupause/branch/master/graph/badge.svg?token=90KVILJ4F4)](https://codecov.io/gh/lang-m/blaupause) |
| Documentation | [![Documentation Status](https://readthedocs.org/projects/blaupause/badge/?version=latest)](https://blaupause.readthedocs.io/en/latest/?badge=latest)|
| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lang-m/blaupause/main?filepath=docs%2Fipynb%2Findex.ipynb) |
| License | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
| DOI | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4327500.svg)](https://doi.org/10.5281/zenodo.4327500) |

## About

A sample Python-based package that can be used a tutorial for setting up a project.

Demonstrated are:
- Testing with pytest/doctests
- continuous integration
- Travis
- Appveyor
- soon: GitHub actions
- code coverage
- docker
- make files
- packaging
- documentation
- licensing

It is available on Windows, MacOS, and Linux. It requires Python 3.8+.

## Documentation

APIs and tutorials are available in documentation. To access them, use the documentation badge in the table above.

## Installation, testing, and upgrade

We recommend installation using `conda` package manager. Instructions can be found in the documentation.

## Binder

This package can be used in the cloud via Binder. To access Binder, use the Binder badge in the table above.

## Support

If you require support, have questions, want to report a bug, or want to suggest an improvement, please raise an issue in this repository.

## License

Licensed under the BSD 3-Clause "New" or "Revised" License. For details, please refer to the [LICENSE](LICENSE) file.

## How to cite

Please cite this package as:

Martin Lang and Marijan Beg. Blaupause - Python package template. Zenodo. DOI: [10.5281/zenodo.4327500](http://doi.org/10.5281/zenodo.4327500) (2020).

## Acknowledgements

- EPSRC Programme grant on [Skyrmionics](http://www.skyrmions.ac.uk) (EP/N032128/1).
55 changes: 0 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,8 @@
# Blaupause - Python package template
Martin Lang<sup>1</sup> and Marijan Beg<sup>1</sup>

<sup>1</sup> *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, United Kingdom*

| Description | Badge |
| --- | --- |
| Builds | [![Build status](https://ci.appveyor.com/api/projects/status/k4wb6m7btqy9lj86/branch/main?svg=true)](https://ci.appveyor.com/project/lang-m/blaupause/branch/main)|
| | [![Build Status](https://travis-ci.org/lang-m/blaupause.svg?branch=main)](https://travis-ci.org/lang-m/blaupause) |
| Coverage | [![codecov](https://codecov.io/gh/lang-m/blaupause/branch/master/graph/badge.svg?token=90KVILJ4F4)](https://codecov.io/gh/lang-m/blaupause) |
| Documentation | [![Documentation Status](https://readthedocs.org/projects/blaupause/badge/?version=latest)](https://blaupause.readthedocs.io/en/latest/?badge=latest)|
| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lang-m/blaupause/main?filepath=docs%2Fipynb%2Findex.ipynb) |
| License | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
| DOI | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4327500.svg)](https://doi.org/10.5281/zenodo.4327500) |

## About

A sample Python-based package that can be used a tutorial for setting up a project.

Demonstrated are:
- Testing with pytest/doctests
- continuous integration
- Travis
- Appveyor
- soon: GitHub actions
- code coverage
- docker
- make files
- packaging
- documentation
- licensing

It is available on Windows, MacOS, and Linux. It requires Python 3.8+.

## Documentation

APIs and tutorials are available in documentation. To access them, use the documentation badge in the table above.

## Installation, testing, and upgrade

We recommend installation using `conda` package manager. Instructions can be found in the documentation.

## Binder

This package can be used in the cloud via Binder. To access Binder, use the Binder badge in the table above.

## Support

If you require support, have questions, want to report a bug, or want to suggest an improvement, please raise an issue in this repository.

## License

Licensed under the BSD 3-Clause "New" or "Revised" License. For details, please refer to the [LICENSE](LICENSE) file.

## How to cite

Please cite this package as:

Martin Lang and Marijan Beg. Blaupause - Python package template. Zenodo. DOI: [10.5281/zenodo.4327500](http://doi.org/10.5281/zenodo.4327500) (2020).

## Acknowledgements

- EPSRC Programme grant on [Skyrmionics](http://www.skyrmions.ac.uk) (EP/N032128/1).
26 changes: 0 additions & 26 deletions appveyor.yml

This file was deleted.

9 changes: 0 additions & 9 deletions docker/Dockerfile

This file was deleted.

26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"


[project]
name = "blaupause"
version = "0.1.3"
dependencies = [
"pytest",
]
requires-python = ">=3.8"

authors = [
{name="Martin Lang"},
{name="Marijan Beg"},
]
description = "Example package used as a template for setting up Python packages/repositories."
readme = "README.md"
license = "BSD-3-Clause"
license-files = ["LICENSE"]


[project.urls]
Homepage = "https://github.com/lang-m/blaupause"
# Documentation
1 change: 0 additions & 1 deletion script/hello.sh

This file was deleted.

30 changes: 0 additions & 30 deletions setup.py

This file was deleted.

5 changes: 3 additions & 2 deletions blaupause/__init__.py → src/blaupause/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
'''

import pytest
import importlib.metadata
import pkg_resources
from .functions import add, subtract, multiply
from .blueprint import Blueprint

__version__ = pkg_resources.get_distribution(__name__).version
__dependencies__ = pkg_resources.require(__name__)
__version__ = importlib.metadata.version(__package__)


def test():
'''Run doctests.
'''
return pytest.main(['-v', '--pyargs', 'blaupause']) # pragma: no cover


if __name__ == '__main__':
main()
Loading

0 comments on commit 61494aa

Please sign in to comment.