Skip to content

Commit

Permalink
Merge branch 'master' into update/version_python
Browse files Browse the repository at this point in the history
  • Loading branch information
VascoSch92 authored Oct 1, 2023
2 parents 6c17524 + f15b7c0 commit d3acfcf
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install flake8 pytest sympy
- name: Install package
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install .
- name: Test with pytest
run: |
pytest
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# List of requirements
# Run
sympy>=1.12
numpy>=1.25.2

sympy
numpy
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@

import sys
from setuptools import setup, find_packages
from abelian import __version__
VERSION = __version__
import re
import ast

_version_re = re.compile(r'__version__\s+=\s+(.*)')

with open('abelian/__init__.py', 'rb') as f:
VERSION = str(ast.literal_eval(_version_re.search(f.read().decode('utf-8')).group(1)))

with open('README.rst', 'r') as file:
README_TEXT = file.read()
Expand Down

0 comments on commit d3acfcf

Please sign in to comment.