Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
doc_ubuntu:
name: Build documentation on Ubuntu
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -20,6 +20,6 @@ jobs:
python -m pip install --upgrade pip
pip3 install .[docs]

- name: Build doc
- name: Build documentation
run: |
sphinx-build -a docs ./build-docs
109 changes: 109 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: CI/CD

on:
push:
branches:
- main
- github-actions-test
paths:
- '**.py'
- '.github/workflows/lint.yml'
pull_request:
branches:
- main
paths:
- '**.py'
- '.github/workflows/lint.yml'
types:
- opened
- synchronize
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
name: Code Style Check 🎨
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies [pip]
run: |
python -m pip install --upgrade pip
pip install black isort

- name : Check Black
run: |
black . --check

- name : Check Isort
run: |
isort --profile black --check .

test:
needs: lint
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]

name: Run tests on ${{ matrix.os }} for Python ${{ matrix.python-version }} 🧪
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install package [pip]
run: |
python -m pip install --upgrade pip
pip install .[test]

- name: Run tests with Pytest
run: |
python -m coverage run -m pytest

- name: Coverage
if: ${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest' }}
run: |
python -m coverage report
python -m coverage json

- name: Upload coverage artifact
if: ${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.json

- name: Metadata check
if: ${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest' }}
run: |
python .github/scripts/metadata_checker

upload-coverage:
runs-on: ubuntu-latest
needs: test
name: Upload coverage report to Codecov 📊
steps:
- name: Download coverage report
uses: actions/download-artifact@v4
with:
name: coverage-report

- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}


46 changes: 0 additions & 46 deletions .github/workflows/lint.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/test.yml

This file was deleted.

34 changes: 4 additions & 30 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,13 @@
black==24.3.0
click==8.1.6
colorama==0.4.6
coverage==7.2.7
exceptiongroup==1.1.2
filelock==3.12.2
flake8==6.1.0
iniconfig==2.0.0
furo
isort==5.12.0
Jinja2==3.1.6
MarkupSafe==2.1.3
mccabe==0.7.0
mpmath==1.3.0
mypy-extensions==1.0.0
networkx==3.1
numpy==1.25.2
myst-parser
numpy==1.26.4
numpydoc==1.6.0
packaging==23.1
pathspec==0.11.2
platformdirs==3.10.0
pluggy==1.2.0
pycodestyle==2.11.0
pyflakes==3.1.0
pytest==7.4.0
readthedocs-sphinx-search==0.3.2
sphinx==7.1.2
sphinx-rtd-theme==1.3.0
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sympy==1.12
tomli==2.0.1
torch==2.2.0
tqdm==4.66.3
typing_extensions==4.7.1
tqdm==4.66.3
Loading