Skip to content

Commit

Permalink
Rework setup and some cleanups
Browse files Browse the repository at this point in the history
Switch to PEP518+ pyproject.toml setup file.
Cleanup GH actions a bit.

Signed-off-by: Alexis Jeandet <[email protected]>
  • Loading branch information
jeandet committed Mar 27, 2024
1 parent 62a1971 commit 90074de
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 161 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/test_main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: Python package
name: Tests

on: [push]
on:
push:
pull_request:

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -36,7 +37,7 @@ jobs:
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.8'
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/test_pull_requests.yml

This file was deleted.

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# space

[![PyPI](https://img.shields.io/pypi/v/space)](https://pypi.python.org/pypi/space)
[![Tests](https://github.com/LaboratoryOfPlasmaPhysics/space/actions/workflows/test_main.yml/badge.svg)](https://github.com/LaboratoryOfPlasmaPhysics/space/actions/workflows/test_main.yml)
[![Documentation Status](https://readthedocs.org/projects/space/badge/?version=latest)](https://space.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://codecov.io/gh/LaboratoryOfPlasmaPhysics/space/branch/main/graph/badge.svg?branch=main)](https://codecov.io/gh/LaboratoryOfPlasmaPhysics/space/branch/main)

Space Plasma Analysis CodE

![space](https://user-images.githubusercontent.com/3200931/98716891-978e2180-238c-11eb-9487-07c66221e5bb.png)


* Free software: GNU General Public License v3
* Documentation: https://space.readthedocs.io.


## Features


## TODO

## Credits


This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template.
43 changes: 0 additions & 43 deletions README.rst

This file was deleted.

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

[project]
name = "space"
version = "0.1.0"
description = "Space Plasma Analysis CodE"
keywords = ["space", "plasma-physics"]
authors = [
{ name = "Nicolas Aunai", email = "[email protected]" }
]

maintainers = [
{ name = "Nicolas Aunai", email = "[email protected]" }
]

requires-python = ">=3.8"
license = { file = "LICENSE" }
readme = "README.md"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = ["pandas", "numpy", "matplotlib", "scipy"]
[project.urls]
homepage = "https://github.com/LaboratoryOfPlasmaPhysics/space"


14 changes: 5 additions & 9 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
pip==19.2.3
bump2version==0.5.11
wheel==0.33.6
watchdog==0.9.0
flake8==3.7.8
tox==3.14.0
coverage==4.5.4
Sphinx==1.8.5
twine==1.14.0
bump2version
flake8
tox
coverage
Sphinx

ddt
pandas
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ current_version = 0.1.0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:space/__init__.py]
search = __version__ = '{current_version}'
Expand Down
48 changes: 0 additions & 48 deletions setup.py

This file was deleted.

13 changes: 8 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
[tox]
envlist = py35, py36, py37, py38, flake8
envlist = py38, py39, py310, py311, py312, flake8
isolated_build = True

[travis]
python =
3.12: py312
3.11: py311
3.10: py310
3.9: py39
3.8: py38
3.7: py37
3.6: py36
3.5: py35

[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 space tests
commands = flake8 space --count --select=E9,F63,F7,F82 --show-source --statistics


[testenv]
setenv =
Expand Down

0 comments on commit 90074de

Please sign in to comment.