Skip to content

Commit c5adf91

Browse files
authored
Merge pull request #437 from alhom/master
Dev up-to-date to master, pruning the rtree
2 parents ccfbe0b + 839b14a commit c5adf91

143 files changed

Lines changed: 1228 additions & 1237 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/generate_reference_plots.yml‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,19 @@ jobs:
4343
mkdir $DATAPATH
4444
touch $DATAPATH/.lockfile
4545
sbatch -W -o testpackage_gen_verf.txt --job-name gen_verf_plots ./testpackage/run_testpackage_generate_verf_set.sh $DATAPATH > jobid.txt
46+
cat testpackage_gen_verf.txt
4647
export JOBID=$(grep -Po '\d+' jobid.txt)
4748
export SACCT_LOG=$(sacct -j $JOBID -o job,state,node | grep FAILED)
4849
if [[ $SACCT_LOG ]]; then
4950
echo "Some job failed on a node"
5051
echo $SACCT_LOG
5152
exit 1
5253
fi
53-
cat testpackage_gen_verf.txt
54-
55-
python ./testpackage/testpackage_get_job_error.py testpackage_gen_verf.txt
54+
.github/workflows/make_sbatch_job.sh run_testpackage_generate_verf_set $DATAPATH
5655
rm $DATAPATH/.lockfile
5756
- name: Comparing plotted data
5857
run: |
5958
export TMPDIR=$RUNNER_TEMP
6059
module load Python/3.10.4-GCCcore-11.3.0
6160
. CI_env/bin/activate
62-
sbatch -W -o "testpackage_compare.txt" ./testpackage/run_compare.sh verf_set
63-
cat testpackage_compare.txt
64-
python ./testpackage/testpackage_get_job_error.py testpackage_compare.txt
65-
61+
.github/workflows/make_sbatch_job.sh run_compare verf_set
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
workflow_dispatch:
13+
release:
14+
types: [published]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
release-build:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
python-version: ["3.6","3,7","3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Build release distributions
34+
run: |
35+
python -m pip install --upgrade build
36+
python -m build
37+
38+
- name: Upload distributions
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: release-dists
42+
path: dist/
43+
44+
pypi-publish:
45+
runs-on: ubuntu-latest
46+
needs:
47+
- release-build
48+
permissions:
49+
# IMPORTANT: this permission is mandatory for trusted publishing
50+
id-token: write
51+
52+
# Dedicated environments with protections for publishing are strongly recommended.
53+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
54+
environment:
55+
name: testpypi
56+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
57+
# url: https://pypi.org/p/YOURPROJECT
58+
#
59+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
60+
# ALTERNATIVE: exactly, uncomment the following line instead:
61+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
62+
63+
steps:
64+
- name: Retrieve release distributions
65+
uses: actions/download-artifact@v4
66+
with:
67+
name: release-dists
68+
path: dist/
69+
70+
- name: Publish release distributions to PyPI
71+
uses: pypa/gh-action-pypi-publish@release/v1
72+
with:
73+
repository-url: https://test.pypi.org/legacy/
74+
packages-dir: dist/

‎Documentation/README.rst‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
==========================
2+
Building documentation
3+
==========================
4+
5+
Documentation is automatically built and deployed using Sphinx as part of the continuous integration of the repository. If you want to build the documentation locally, you need to install a few more packages::
6+
7+
python -m venv CI_env
8+
. CI_env/bin/activate
9+
pip install ../analysator[all]
10+
pip install sphinx numba yt geopack sphinx-rtd-theme
11+
12+
after which you can generate e.g. the html documentation::
13+
14+
cd Documentation/sphinx
15+
make dirhtml
16+

‎Documentation/sphinx/analysator_exercises.rst‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ Setting the keword ``fsaved=True`` will add contours delienating all spatial cel
9595
Vector quantities can be overplotted as streamlines or vector maps. Give some a go!
9696
.. code-block:: python
9797
98-
:kword vectors: Set to a vector variable to overplot (unit length vectors, color displays variable magnitude)
99-
:kword vectordensity: Aim for how many vectors to show in plot window (default 100)
100-
:kword vectorcolormap: Colormap to use for overplotted vectors (default: gray)
101-
:kword vectorsize: Scaling of vector sizes
98+
:kwarg vectors: Set to a vector variable to overplot (unit length vectors, color displays variable magnitude)
99+
:kwarg vectordensity: Aim for how many vectors to show in plot window (default 100)
100+
:kwarg vectorcolormap: Colormap to use for overplotted vectors (default: gray)
101+
:kwarg vectorsize: Scaling of vector sizes
102102
103-
:kword streamlines: Set to a vector variable to overplot as streamlines
104-
:kword streamlinedensity: Set streamline density (default 1)
105-
:kword streamlinecolor: Set streamline color (default white)
106-
:kword streamlinethick: Set streamline thickness
103+
:kwarg streamlines: Set to a vector variable to overplot as streamlines
104+
:kwarg streamlinedensity: Set streamline density (default 1)
105+
:kwarg streamlinecolor: Set streamline color (default white)
106+
:kwarg streamlinethick: Set streamline thickness
107107
108108
If a pre-generated fluxfunction file is available (only for 5D simulations), magnetic field lines can be plotted
109109
with greater accuracy than via streamlines. Flux functions are generated with the fluxfunction tool distributed as part of Vlasiator. A plotting example:
@@ -119,21 +119,21 @@ Several keywords exist for fine-tuning Analysator plot properties. As usual, the
119119
120120
.. code-block:: python
121121
122-
:kword noborder: Plot figure edge-to-edge without borders (default off)
123-
:kword noxlabels: Suppress x-axis labels and title
124-
:kword noylabels: Suppress y-axis labels and title
125-
:kword scale: Scale text size (default=1.0)
126-
:kword thick: line and axis thickness, default=1.0
127-
:kword nocb: Set to suppress drawing of colourbar
128-
:kword internalcb: Set to draw colorbar inside plot instead of outside. If set to a text
122+
:kwarg noborder: Plot figure edge-to-edge without borders (default off)
123+
:kwarg noxlabels: Suppress x-axis labels and title
124+
:kwarg noylabels: Suppress y-axis labels and title
125+
:kwarg scale: Scale text size (default=1.0)
126+
:kwarg thick: line and axis thickness, default=1.0
127+
:kwarg nocb: Set to suppress drawing of colourbar
128+
:kwarg internalcb: Set to draw colorbar inside plot instead of outside. If set to a text
129129
string, tries to use that as the location, e.g. "NW","NE","SW","SW"
130-
:kword highres: Creates the image in high resolution, scaled up by this value (suitable for print).
131-
:kword tickinterval: Interval at which to have ticks on axes (not colorbar)
132-
:kword title: string to use as plot title instead of time.
130+
:kwarg highres: Creates the image in high resolution, scaled up by this value (suitable for print).
131+
:kwarg tickinterval: Interval at which to have ticks on axes (not colorbar)
132+
:kwarg title: string to use as plot title instead of time.
133133
Special case: Set to "msec" to plot time with millisecond accuracy or "musec"
134134
for microsecond accuracy. "sec" is integer second accuracy.
135-
:kword cbtitle: string to use as colorbar title instead of map name
136-
:kword nooverwrite: Set to only perform actions if the target output file does not yet exist
135+
:kwarg cbtitle: string to use as colorbar title instead of map name
136+
:kwarg nooverwrite: Set to only perform actions if the target output file does not yet exist
137137
138138
Plotting 3D/6D simulation data
139139
------------------------------

‎Documentation/sphinx/calculations.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ calculations
44
.. automodule:: analysator.calculations
55
:members:
66
:imported-members:
7+
:ignore-module-all:

‎Documentation/sphinx/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
extensions = [
2424
'sphinx.ext.autodoc'
25-
]
25+
]
2626

2727
templates_path = ['_templates']
2828
# Create a dummy _templates folder if it does not exist

‎Documentation/sphinx/index.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ documentation for details.
3131
analysator_supported
3232

3333
.. toctree::
34-
:maxdepth: 2
34+
:maxdepth: 2
3535
:caption: Analysator reference
3636

3737
plot
@@ -49,4 +49,4 @@ documentation for details.
4949
:maxdepth: 1
5050
:caption: About
5151

52-
about
52+
about
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
miscellaneous
22
==================================
33

4-
.. automodule:: miscellaneous
4+
.. automodule:: analysator.miscellaneous
55
:members:
66
:imported-members:
7+
:ignore-module-all:

‎Documentation/sphinx/plot.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
============================
12
plot
23
============================
34

45
.. automodule:: analysator.plot
56
:members:
67
:exclude-members: Version
78
:imported-members:
8-
9+
:ignore-module-all:

‎Documentation/sphinx/vlsvfile.rst‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
vlsvfile
22
============================
33

4-
VlsvFile is responsibe for implementing read and write functionality for the vlsv format, as well as defining data reducers and reduction pipelines. Some of this will be likely moved around to be more modular in some indefinite point in the future.
4+
VlsvFile is responsible for implementing read and write functionality for the vlsv format, as well as defining data reducers and reduction pipelines. Some of this will be likely moved around to be more modular in some indefinite point in the future.
55

66
.. automodule:: analysator.vlsvfile
77
:members:
88
:imported-members:
9+
:ignore-module-all:
10+
11+

0 commit comments

Comments
 (0)