bmad-sim / pytao

PyTao is Python interface for Tao, which is based on the Bmad subroutine library for relativistic charged–particle and X-ray simulations in accelerators and storage rings.
https://bmad-sim.github.io/pytao
GNU General Public License v3.0
9 stars 6 forks source link

REF/CLN: switch to pyproject.toml, setuptools-scm and clean codebase #82

Closed ken-lauer closed 3 days ago

ken-lauer commented 1 week ago

Description

Usage

Start pytao's GUI from the command-line with:

$ pytao-gui -init tao.init

Start a quick pytao session with IPython using:

$ pytao -init tao.init
------------------------------------------------------------
Initializing `tao` object with the following: -init tao.init
Type`tao.` and hit tab to see available commands.
------------------------------------------------------------

Python 3.12.0 | packaged by conda-forge | (main, Oct  3 2023, 08:36:57) [Clang 15.0.7 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: tao
Out[1]: <pytao.interface_commands.Tao at 0x13c43d4f0> 

To the reviewers

I wouldn't recommend looking at the full diff to avoid the reformatting commits. Take a look commit-by-commit for some of the syntax fixes, and then just the new files for pyproject.toml migration

ken-lauer commented 1 week ago

Tests are failing locally and on GHA due to an upstream change that I think was incorrect:

FAILED pytao/tests/test_interface_commands.py::test_ele_photon_1[Tao] - ValueError: Unknown bool: Not_set
FAILED pytao/tests/test_interface_commands.py::test_ele_photon_1[SubprocessTao] - ValueError: Unknown bool: Not_set

https://github.com/bmad-sim/bmad-ecosystem/issues/1026#issuecomment-2197331632

Pending: https://github.com/conda-forge/bmad-feedstock/pull/421

ChristopherMayes commented 6 days ago

FODO notebook should be fixed in master.

hhslepicka commented 4 days ago

Thanks for the heads up about looking at the commits, not the diff! 😄