Skip to content

Commit

Permalink
Merge branch 'master' into correction_in_getting_started
Browse files Browse the repository at this point in the history
  • Loading branch information
lang-m committed Nov 14, 2023
2 parents 18832a3 + 6a56ac2 commit a9d2170
Show file tree
Hide file tree
Showing 37 changed files with 20,645 additions and 17,584 deletions.
2 changes: 1 addition & 1 deletion .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge

dependencies:
- python==3.8
- python==3.10
- pip
- oommf
- pytest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: conda
on:
schedule:
- cron: '0 0 * * 1' # run every Monday
workflow_dispatch:

env:
PYTEST_ADDOPTS: "--color=yes"

jobs:
conda:
Expand All @@ -26,6 +30,9 @@ jobs:
auto-update-conda: true
activate-environment: conda-environment
environment-file: binder/environment.yml
miniforge-version: latest
miniforge-variant: Mambaforge
use-mamba: true

- name: Install testing packages
run: python -m pip install --upgrade pip pytest-cov nbval
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
schedule:
- cron: '0 0 * * 1' # run every Monday
workflow_dispatch:

env:
PYTEST_ADDOPTS: "--color=yes"

jobs:
workflow:
Expand All @@ -25,6 +29,9 @@ jobs:
auto-update-conda: true
activate-environment: conda-environment
environment-file: .github/environment.yml
miniforge-version: latest
miniforge-variant: Mambaforge
use-mamba: true

# The first import (of discretisedfield) on Windows produces a failure in the notebook tests
# (output mismatch) because of some (hidden) message on stderr (some IO error on Windows that
Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ channels:
- conda-forge

dependencies:
- python==3.8
- python==3.10
- ubermag

35,175 changes: 18,157 additions & 17,018 deletions demo.ipynb

Large diffs are not rendered by default.

64 changes: 35 additions & 29 deletions examples/07-tutorial-standard-problem3.ipynb

Large diffs are not rendered by default.

108 changes: 60 additions & 48 deletions examples/08-tutorial-standard-problem4.ipynb

Large diffs are not rendered by default.

32 changes: 22 additions & 10 deletions examples/09-tutorial-standard-problem5.ipynb

Large diffs are not rendered by default.

28 changes: 20 additions & 8 deletions examples/10-tutorial-standard-problem-fmr.ipynb

Large diffs are not rendered by default.

50 changes: 30 additions & 20 deletions examples/11-tutorial-deriving-fields.ipynb

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions examples/12-tutorial-stray-field.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Calculating a stray field using an airbox method\n",
"\n",
Expand Down Expand Up @@ -134,6 +140,10 @@
"cell_type": "code",
"execution_count": 5,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
Expand Down Expand Up @@ -169,7 +179,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.17"
"version": "3.10.12"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
60 changes: 38 additions & 22 deletions examples/13-tutorial-skyrmion.ipynb

Large diffs are not rendered by default.

64 changes: 39 additions & 25 deletions examples/STT-dw-motion.ipynb

Large diffs are not rendered by default.

22 changes: 17 additions & 5 deletions examples/choosing-runner.ipynb

Large diffs are not rendered by default.

50 changes: 30 additions & 20 deletions examples/energy-term-computations.ipynb

Large diffs are not rendered by default.

64 changes: 37 additions & 27 deletions examples/field-operations2.ipynb

Large diffs are not rendered by default.

26 changes: 19 additions & 7 deletions examples/finite-temperature.ipynb

Large diffs are not rendered by default.

36 changes: 27 additions & 9 deletions examples/fixed-subregions.ipynb

Large diffs are not rendered by default.

142 changes: 89 additions & 53 deletions examples/hysteresis.ipynb

Large diffs are not rendered by default.

28 changes: 20 additions & 8 deletions examples/multiple-terms.ipynb

Large diffs are not rendered by default.

26 changes: 19 additions & 7 deletions examples/negative-A.ipynb

Large diffs are not rendered by default.

32 changes: 21 additions & 11 deletions examples/periodic-boundary-conditions.ipynb

Large diffs are not rendered by default.

26 changes: 19 additions & 7 deletions examples/rkky.ipynb

Large diffs are not rendered by default.

22 changes: 16 additions & 6 deletions examples/sine-hysteresis.ipynb

Large diffs are not rendered by default.

32 changes: 24 additions & 8 deletions examples/space-time-field.ipynb

Large diffs are not rendered by default.

40 changes: 24 additions & 16 deletions examples/spatially-varying-parameters1.ipynb

Large diffs are not rendered by default.

48 changes: 28 additions & 20 deletions examples/spatially-varying-parameters2.ipynb

Large diffs are not rendered by default.

110 changes: 58 additions & 52 deletions examples/time-dependent-field-current.ipynb

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions examples/time-dependent-field.ipynb

Large diffs are not rendered by default.

626 changes: 609 additions & 17 deletions getting-started/dw-pair-conversion.ipynb

Large diffs are not rendered by default.

28 changes: 17 additions & 11 deletions getting-started/dynamics-equation.ipynb

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions getting-started/energy-equation.ipynb

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions getting-started/first-ubermag-simulation.ipynb

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions getting-started/mag2exp.ipynb

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions getting-started/magnetisation-field.ipynb

Large diffs are not rendered by default.

52 changes: 40 additions & 12 deletions getting-started/python-basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Python basics\n",
"\n",
Expand Down Expand Up @@ -396,7 +402,7 @@
{
"data": {
"text/plain": [
"2.6535897933527304e-06"
"2.65358979335273e-06"
]
},
"execution_count": 16,
Expand Down Expand Up @@ -706,7 +712,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[29], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m b[\u001b[38;5;241m2\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m3\u001b[39m\n",
"Cell \u001b[0;32mIn[29], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mb\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m2\u001b[39;49m\u001b[43m]\u001b[49m \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m3\u001b[39m\n",
"\u001b[0;31mTypeError\u001b[0m: 'tuple' object does not support item assignment"
]
}
Expand Down Expand Up @@ -1307,17 +1313,22 @@
"cell_type": "code",
"execution_count": 52,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"raises-exception"
"raises-exception",
"nbval-ignore-output"
]
},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (1951381238.py, line 1)",
"evalue": "expected ':' (1951381238.py, line 1)",
"output_type": "error",
"traceback": [
"\u001b[0;36m Cell \u001b[0;32mIn[52], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m def speed(s, t)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
"\u001b[0;36m Cell \u001b[0;32mIn[52], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m def speed(s, t)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m expected ':'\n"
]
}
],
Expand All @@ -1337,17 +1348,22 @@
"cell_type": "code",
"execution_count": 53,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"raises-exception"
"raises-exception",
"nbval-ignore-output"
]
},
"outputs": [
{
"ename": "IndentationError",
"evalue": "expected an indented block (3863715070.py, line 2)",
"evalue": "expected an indented block after function definition on line 1 (3863715070.py, line 2)",
"output_type": "error",
"traceback": [
"\u001b[0;36m Cell \u001b[0;32mIn[53], line 2\u001b[0;36m\u001b[0m\n\u001b[0;31m return s/t\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block\n"
"\u001b[0;36m Cell \u001b[0;32mIn[53], line 2\u001b[0;36m\u001b[0m\n\u001b[0;31m return s/t\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block after function definition on line 1\n"
]
}
],
Expand Down Expand Up @@ -1445,7 +1461,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[56], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mscipy\u001b[39;00m \n\u001b[0;32m----> 2\u001b[0m \u001b[43mscpy\u001b[49m\u001b[38;5;241m.\u001b[39mfft\u001b[38;5;241m.\u001b[39mfft()\n",
"Cell \u001b[0;32mIn[56], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mscipy\u001b[39;00m \n\u001b[0;32m----> 2\u001b[0m \u001b[43mscpy\u001b[49m\u001b[38;5;241m.\u001b[39mfft\u001b[38;5;241m.\u001b[39mfft() \u001b[38;5;66;03m# typo: scpy instead of scipy\u001b[39;00m\n",
"\u001b[0;31mNameError\u001b[0m: name 'scpy' is not defined"
]
}
Expand Down Expand Up @@ -1524,7 +1540,19 @@
"nbval-ignore-output"
]
},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"\u001b[0;31mSignature:\u001b[0m \u001b[0mmath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msqrt\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m/\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mDocstring:\u001b[0m Return the square root of x.\n",
"\u001b[0;31mType:\u001b[0m builtin_function_or_method"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import math\n",
"math.sqrt?"
Expand Down Expand Up @@ -1586,7 +1614,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.10.12"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
Loading

0 comments on commit a9d2170

Please sign in to comment.