Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into auto_dt_bunch
Browse files Browse the repository at this point in the history
Conflicts:
	wake_t/beamline_elements/field_element.py
	wake_t/beamline_elements/plasma_stage.py
  • Loading branch information
delaossa committed Jul 5, 2024
2 parents 3bf9eb5 + ed57f5a commit 80173ae
Show file tree
Hide file tree
Showing 62 changed files with 935 additions and 459 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ on:
jobs:
build-n-publish:
name: Build and publish package to PyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Install pypa/build
run: >-
python -m
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
python3 -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ __pycache__
/examples/tests.py
/old_stuff

# Test output
/tests_output

# IDEs
/.vscode

Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.7"
python: "3.8"
nodejs: "16"

# Build documentation in the docs/ directory with Sphinx
Expand Down
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ numpy
numba
scipy
matplotlib
aptools>=0.1.23
openpmd-api~=0.14.0
aptools~=0.2.0
openpmd-api
openpmd-viewer>=1.2.0
pydata-sphinx-theme
sphinx-panels
sphinx-design
sphinx-gallery
numpydoc
3 changes: 2 additions & 1 deletion docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
API reference
=============

🚧🚧 Page under construction 🚧🚧
This section contains the detailed documentation of the main classes and
methods needed to perform simulations with Wake-T.

.. toctree::
:maxdepth: 3
Expand Down
1 change: 1 addition & 0 deletions docs/source/api/laser/laser_pulses/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Laser pulses
LaguerreGaussPulse
FlattenedGaussianPulse
SummedPulse
OpenPMDPulse
21 changes: 14 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
# 'sphinx.ext.intersphinx',
'sphinx_panels',
'sphinx.ext.viewcode',
'sphinx_design',
'sphinx_gallery.gen_gallery',
'numpydoc'
]
Expand Down Expand Up @@ -75,18 +75,25 @@
{
"name": "GitHub",
"url": "https://github.com/AngelFP/Wake-T",
"icon": "fab fa-github-square",
"icon": "fa-brands fa-github",
},
{
"name": "Slack",
"url": "https://wake-t.slack.com/",
"icon": "fab fa-slack",
"icon": "fa-brands fa-slack",
},
]
],
"use_edit_page_button": True,
"pygment_light_style": "default",
"pygment_dark_style": "monokai",
}

# Prevent panels extension from modifying page style.
panels_add_bootstrap_css = False
html_context = {
"github_user": "AngelFP",
"github_repo": "Wake-T",
"github_version": "dev",
"doc_path": "docs/source",
}

# Do not show type hints.
autodoc_typehints = 'none'
Expand Down
4 changes: 0 additions & 4 deletions docs/source/development.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/examples/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Examples
========

🚧🚧 Page under construction 🚧🚧
Example scripts ready to run basic simulations.

.. toctree::
:maxdepth: 2
Expand Down
46 changes: 46 additions & 0 deletions docs/source/getting_started/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Getting started
===============

Installation
------------
Wake-T is available on PyPI and can be simply installed with

.. code::
pip install Wake-T
for more detailed instructions, including guides for installing Wake-T in HPC
clusters, check the :ref:`installation_ref` section.


.. toctree::
:maxdepth: 2
:hidden:

installation


Citing Wake-T
-------------
If your usage of Wake-T leads to a scientific publication, please consider
citing the original `publication <https://dx.doi.org/10.1088/1742-6596/1350/1/012056>`_:

A Ferran Pousa, R Assmann, A Martinez de la Ossa, Wake-T: a fast particle tracking code for plasma-based accelerators, *J. Phys.: Conf. Ser.* **1350** 012056 (2019)

Bibtex:

.. code::
@article{FerranPousa_2019,
doi = {10.1088/1742-6596/1350/1/012056},
url = {https://dx.doi.org/10.1088/1742-6596/1350/1/012056},
year = {2019},
month = {nov},
publisher = {IOP Publishing},
volume = {1350},
number = {1},
pages = {012056},
author = {Ferran Pousa, A and Assmann, R and Martinez de la Ossa, A},
title = {Wake-{T}: a fast particle tracking code for plasma-based accelerators},
journal = {Journal of Physics: Conference Series}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. _installation_ref:

Installation
============
Wake-T is tested on Python 3.7 and above, so make sure to have an up-to-date version
Wake-T is tested on Python 3.8 and above, so make sure to have an up-to-date version
in order to avoid potential issues. It is recommended to install Wake-T in its
own virtual environment, either using ``venv`` or ``conda``. The installation should be
carried out with ``pip``, since Wake-T is available on `PyPI <https://pypi.org/project/Wake-T/>`_
Expand Down Expand Up @@ -32,8 +34,8 @@ using ``pip``::
Latest (development) version from GitHub
----------------------------------------
.. image:: https://travis-ci.org/AngelFP/Wake-T.svg?branch=dev
:target: https://travis-ci.org/AngelFP/Wake-T
.. image:: https://github.com/AngelFP/Wake-T/actions/workflows/test-package.yml/badge.svg
:target: https://github.com/AngelFP/Wake-T/actions

The latest release on PyPI might not be fully up to date with the newest additions
to the code. If you want to stay at the bleeding edge of new features and bug fixes
Expand Down
105 changes: 48 additions & 57 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Wake-T |release| documentation
==============================

.. |travis| image:: https://travis-ci.org/AngelFP/Wake-T.svg?branch=dev
:target: https://travis-ci.org/AngelFP/Wake-T
.. |tests| image:: https://github.com/AngelFP/Wake-T/actions/workflows/test-package.yml/badge.svg
:target: https://github.com/AngelFP/Wake-T/actions

.. |PyPI| image:: https://img.shields.io/pypi/v/Wake-T.svg?logo=python&logoColor=white
:target: https://pypi.org/project/Wake-T/
Expand All @@ -18,93 +18,84 @@ Wake-T |release| documentation
.. |license| image:: https://img.shields.io/github/license/AngelFP/Wake-T
:target: https://github.com/AngelFP/Wake-T/blob/master/LICENSE

|travis| |codefactor| |PyPI| |license|
|tests| |codefactor| |PyPI| |license|

.. panels::
:card: + intro-card text-center
:column: col-lg-6 col-md-6 col-sm-6 col-xs-12 p-2 d-flex
.. grid:: 1 2 2 2
:gutter: 2

---
.. grid-item-card:: Getting started
:text-align: center

**User guide**
^^^^^^^^^^^^^^
:octicon:`book;3em`

Instructions for getting the code up and running and basic information of
the key concepts behind Wake-T.
Get the code up and running.

+++
+++

.. link-button:: user_guide/index
:type: ref
:text: To the user guide
:classes: btn-outline-primary btn-block stretched-link
.. button-ref:: getting_started/index
:expand:
:color: primary
:click-parent:

---
To the guide

**Tutorials**
^^^^^^^^^^^^
.. grid-item-card:: Tutorials
:text-align: center

Step-by-step tutorials covering the functionality of Wake-T.
:octicon:`mortar-board;3em`

Step-by-step tutorials covering the functionality of Wake-T.

+++
+++

.. link-button:: tutorials/index
:type: ref
:text: To the tutorials
:classes: btn-outline-primary btn-block stretched-link
.. button-ref:: tutorials/index
:expand:
:color: primary
:click-parent:

---
To the tutorials

**Examples**
^^^^^^^^^^^^
.. grid-item-card:: Examples
:text-align: center

Explore quick examples showcasing how to use the code.
:octicon:`light-bulb;3em`

+++
Explore quick examples showcasing how to use the code.

.. link-button:: examples/index
:type: ref
:text: To the examples
:classes: btn-outline-primary btn-block stretched-link
+++

---
.. button-ref:: examples/index
:expand:
:color: primary
:click-parent:

**API reference**
^^^^^^^^^^^^^^^^^
To the examples

Detailed documentation of the Wake-T API.
.. grid-item-card:: API reference
:text-align: center

+++
:octicon:`code;3em`

Detailed documentation of the Wake-T API.

.. link-button:: api/index
:type: ref
:text: To the reference guide
:classes: btn-outline-primary btn-block stretched-link
+++

---
.. button-ref:: api/index
:expand:
:color: primary
:click-parent:

**Development**
^^^^^^^^^^^^^^^

Guidelines for contributing to Wake-T.

+++

.. link-button:: development
:type: ref
:text: To the development guide
:classes: btn-outline-primary btn-block stretched-link
To the reference guide


.. toctree::
:hidden:
:maxdepth: 4

user_guide/index
getting_started/index
tutorials/index
examples/index
api/index
development



9 changes: 0 additions & 9 deletions docs/source/user_guide/index.rst

This file was deleted.

4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ classifiers =
packages = find:
install_requires =
numpy
numba<0.57
numba!=0.57.0
scipy
aptools~=0.2.0
openpmd-api
tqdm
python_requires = >=3.7
python_requires = >=3.8

[options.extras_require]
test =
Expand Down
Loading

0 comments on commit 80173ae

Please sign in to comment.