Skip to content
Merged
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
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

## Types of changes

What types of changes does your code introduce to vtk2dolfinx?
<!--Put an `x` in the boxes that apply-->

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Code refactoring
- [ ] Documentation Update (if none of the other choices apply)
- [ ] New tests

## Checklist

<!--Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.-->

- [ ] Unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)

## Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
39 changes: 39 additions & 0 deletions .github/workflows/ci_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Conda CI
on: [pull_request, push]

jobs:
run-tests:
runs-on: ubuntu-latest

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

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: myenv
miniforge-version: latest
# use-mamba: true
channels: conda-forge

- name: Create Conda environment
shell: bash -l {0}
run: |
conda install -c conda-forge fenics-dolfinx=0.9.0 pyvista

- name: Install local package and dependencies
shell: bash -l {0}
run: |
pip install .[test]

- name: Run tests
shell: bash -l {0}
run: |
pytest test/ --cov vtk2dolfinx --cov-report xml --cov-report term

- name: Upload to codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
28 changes: 28 additions & 0 deletions .github/workflows/ci_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker CI
on: [pull_request, push]

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container_version: [v0.9.0, nightly]
container: dolfinx/dolfinx:${{ matrix.container_version }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install local package and dependencies
run: |
pip install .[test]

- name: Run tests
run: |
python3 -m pytest test/ --cov vtk2dolfinx --cov-report xml --cov-report term

- name: Upload to codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
30 changes: 30 additions & 0 deletions .github/workflows/code_formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install linting tools
run: pip install mypy ruff

- name: ruff format
run: |
ruff format --check .

- name: ruff check
continue-on-error: true
run: |
ruff check .

- name: mypy
continue-on-error: true
run: |
python -m mypy .
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore:
- "vtk2dolfinx/_version.py" # ignore version file
4 changes: 2 additions & 2 deletions src/vtk2dolfinx/vtk_reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import dolfinx
import pyvista


class VTKReader:
""""""

Expand All @@ -15,9 +16,8 @@ def __init__(self):
pass



class UnstructuredMeshReader(VTKReader):
""""""

def __init__(self):
pass
pass
5 changes: 5 additions & 0 deletions test/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import pytest


def test_example():
pass
Loading