Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ac923b9
Preliminary setup: CI workflow, add base schema
EZoni Feb 12, 2025
2080677
Add pytest to conda environment, minimal .gitignore
EZoni Feb 12, 2025
a2af96e
Fix import statement in test file
EZoni Feb 12, 2025
2a3f341
Add GitHub Actions workflow file, requirements
EZoni Feb 12, 2025
ff5559b
Add thick base element
EZoni Feb 12, 2025
a87f5fc
Rename workflow file extension
EZoni Feb 12, 2025
febd2d3
Add line
EZoni Feb 12, 2025
24a32cc
Fix line
EZoni Feb 12, 2025
f5a14a2
Update .gitignore
EZoni Feb 12, 2025
ebfbcf6
Fix line
EZoni Feb 12, 2025
eba6ca7
Expand line test
EZoni Feb 13, 2025
3390169
Add unit test to write to/read from YAML file
EZoni Feb 13, 2025
31d4421
Downgrade Python version
EZoni Feb 18, 2025
5045165
Fix requirements file
EZoni Feb 18, 2025
615e542
Update CI workflow name
EZoni Feb 18, 2025
2ffbf1a
Upgrade Python version: 3.13
EZoni Mar 12, 2025
a666d9a
Add unit test to write to/read from JSON file
EZoni Mar 26, 2025
f9b6fc4
Remove temporary test files
EZoni Mar 31, 2025
9f34440
Rename attribute `length` to `Length`
EZoni Mar 31, 2025
e3b6e58
Add drift element
EZoni Mar 31, 2025
aaf35e0
Clean up
EZoni Mar 31, 2025
2f2cbd0
Add draft of quadrupole element
EZoni Apr 1, 2025
f94a930
Add custom validation for dynamic tilt parameters 'tiltN'
EZoni Apr 1, 2025
000cb2d
Add custom validation for dynamic normal, skew component parameters
EZoni Apr 2, 2025
8d86029
Improve unit test for quadrupole element
EZoni Apr 2, 2025
5b7ee19
Add class `Item`, rename `Length` as `length`
EZoni Apr 11, 2025
f16798b
Update README.md
EZoni Apr 11, 2025
936b582
Rename `element` as `kind`
EZoni Apr 11, 2025
70d3733
Start FODO example
EZoni Apr 11, 2025
abc928d
Revert to previous implementation without class `Item`
EZoni Apr 24, 2025
f131afd
Update README.md: how to run tests, examples locally
EZoni Apr 24, 2025
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
20 changes: 18 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pals
name: pals-python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -python suffixes added here are not really needed.

From the Python viewpoint, this repo is "pals".


on:
push:
Expand All @@ -7,7 +7,7 @@ on:
pull_request:

concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-pals
group: ${{ github.ref }}-${{ github.head_ref }}-pals-python
cancel-in-progress: true

jobs:
Expand All @@ -27,3 +27,19 @@ jobs:
- name: Test
run: |
pytest tests -v
examples:
name: examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test
run: |
python examples/fodo.py
163 changes: 2 additions & 161 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,163 +1,4 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# temporary files from demo.py
line.pmad.*
.ruff_cache/
*.swp
Loading