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

---

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

**To Reproduce**
Steps to reproduce the behavior:
for example:
1. use function XXX
2. insert this argument
3. 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.

**Desktop (please complete the following information):**
- OS: [e.g. Linux or Windows]
- F4Enix version
- Python version

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature request] - title of the issue"
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] or, it would be very handy to have [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/improve-documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Improve documentation
about: Help us improve our documentation
title: "[DOC] - title of the issue"
labels: documentation
assignees: ''

---

# What were you looking for?
Please try to describe concisely what kind of information you were looking for and where you were looking.

# Is the information available in the doc but not where you would expect?
let us know if you ended up finding the information you were looking for in another (unexpected) section of the doc.

# Is information completely lacking or partial?
Please specify if you are asking for a better explanation/clarification of the text or if the information is completely lacking.

# Where would you insert the missing information?
Describe here where you would put the information.

# Additional context
You can use this space to give any other additional information that you think would be useful to solve the issue.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Description

Please include a summary of the changes and the related issue (if applicable). Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Additional dependencies introduced.
- Dependency 1
- Dependency 2

## Type of change

Please select what type of change this is.

- [ ] Bug fix (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

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
58 changes: 58 additions & 0 deletions .github/workflows/AutomatedTests_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is a basic workflow to help you get started with Actions

name: testing Linux

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
TestBuild:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

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

# set up an headless display
- name: Setup headless display
if: runner.os == 'Linux'
uses: pyvista/setup-headless-display-action@v3

# Install the package
- name: Install the package
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]

# Run pytest
- name: Testing
run: |
pytest --cov=src/f4enix --cov-config=".coveragerc" --cov-report xml

- name: Upload coverage to Codecov
# do it only once for python 3.10
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v4
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/AutomatedTests_win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This is a basic workflow to help you get started with Actions

name: testing Windows

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
TestBuild:
# The type of runner that the job will run on
runs-on: windows-latest
env:
MPLBACKEND: Agg # To avoid issues with matplotlib on headless systems (TLC error)
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

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

# Install the package
- name: Install the package
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]

# Run pytest
- name: Testing
run: |
pytest
31 changes: 31 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
**/__pycache__
.pytest_cache/**
**/em_interpolator.egg-info
**/em_interpolator.egg-info
src/_version.py
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
[![Testing windows](https://github.com/Fusion4Energy/EM-interpolator/actions/workflows/AutomatedTests_win.yml/badge.svg?branch=main)](https://github.com/Fusion4Energy/EM-interpolator/actions/workflows/AutomatedTests_win.yml)
[![Testing linux](https://github.com/Radiation-Transport/EM-interpolator/actions/workflows/AutomatedTests_linux.yml/badge.svg?branch=main)](https://github.com/Fusion4Energy/EM-interpolator/actions/workflows/AutomatedTests_linux.yml)
[![PyPi version](https://badgen.net/pypi/v/em-interpolator/)](https://pypi.org/project/em-interpolator)
[![Documentation Status](https://readthedocs.org/projects/em-interpolator/badge/?version=latest)](https://em-interpolator.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/Fusion4Energy/EM-interpolator/graph/badge.svg?token=P4A85K0ACG)](https://codecov.io/gh/Fusion4Energy/EM-interpolator)

# EM forces interpolator

## Quickstart

First, after downloading the package, install it using:
``em-interpolator`` is now on PyPi. You can simply install it using:

```
pip install em-interpolator
```

and upgraded it to the latest version with

```
pip install .
pip install --upgrade em-interpolator
```

After that, start the GUI using:
Expand Down
17 changes: 8 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "em-interpolator"
license = { file = "LICENSE" }
# dynamic = ["version"]
version = "0.0.1"
dynamic = ["version"]
authors = [
{ name = "F4E mechanical team", email = "davide.laghi@f4e.europa.eu" },
]
Expand All @@ -27,16 +26,16 @@ dependencies = [
[project.optional-dependencies]
dev = ["pytest", "pytest-cov", "ruff"]

# [project.urls]
# Homepage = "https://github.com/fusion4energy"
# Repository = "https://github.com/Fusion4Energy/F4Enix"
# Documentation = "https://f4enix.readthedocs.io/en/latest/"
[project.urls]
Homepage = "https://github.com/Fusion4Energy"
Repository = "https://github.com/Fusion4Energy/EM-interpolator"
Documentation = "https://github.com/Fusion4Energy/EM-interpolator"

# [tool.setuptools_scm]
# write_to = "src/_version.py"
[tool.setuptools_scm]
write_to = "src/_version.py"

[tool.setuptools]
package-dir = { "" = "src" }

[tool.setuptools.package-data]
"f4enix" = ["**/*.xlsx", "**/*.txt", "**/*.csv"]
"em_interp" = ["**/*.xlsx", "**/*.txt", "**/*.csv"]
Loading