Skip to content

Commit

Permalink
Merge pull request #1 from clementsan/master
Browse files Browse the repository at this point in the history
Add pyproject.toml config file and GitHub action
  • Loading branch information
clementsan authored Apr 1, 2024
2 parents cea67fc + ec5fc3b commit 8daa2e3
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "master", "dev", "CuPy"]
pull_request:
branches: [ "master" ]
workflow_dispatch:

permissions:
contents: read

env:
CURSES: False
TERM: xterm
ECLIPSE: ECLIPSE

jobs:
build:

# runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Test with unittest
run: |
python -m unittest discover -s ./test -p 'test_nornir_pools*.py'
4 changes: 4 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)

For license text please see:
https://creativecommons.org/licenses/by-nc-sa/4.0/
36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = 'setuptools.build_meta'

[tool.setuptools.packages.find]
where = ["."]
include = ["nornir_pools"]

[project]
name = "nornir_pools"
version = "1.5.0"
authors = [
{ name="James Anderson", email="[email protected]" },
]
description = "A helper library that wraps python threads, multiprocessing, a process pool for shell commands, and parallel python with the same interface"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.7"
dependencies = [
"six",
"numpy",
"matplotlib",
"nornir_shared @ git+https://github.com/jamesra/nornir-shared#egg=nornir_shared-1.4.1",
]
classifiers = [
"Programming Language :: Python :: 3.7",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
]

[project.optional-dependencies]
test = ["nose"]

[project.urls]
Homepage = "https://github.com/jamesra/nornir-pools"
Issues = "https://github.com/jamesra/nornir-pools/issues"
4 changes: 2 additions & 2 deletions setup.py → tmp_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
@author: u0490822
'''

from ez_setup import use_setuptools
#from ez_setup import use_setuptools

if __name__ == '__main__':
use_setuptools()
#use_setuptools()

from setuptools import setup, find_packages

Expand Down

0 comments on commit 8daa2e3

Please sign in to comment.