Skip to content

Commit

Permalink
epic: export and import fit result (#159)
Browse files Browse the repository at this point in the history
* ci: add GitHub workflow for epic branches (#144)
* ci: increase minimal coverage to 80%
* feat: add CSVSummary callback (#173)
* feat: add variable logging functionality using TensorFlow (#155)
* feat: implement YAML optimize callback (#154)
* feat: implement Loadable callback (#177)
* feat: log execute time in optimize call (#156 and #164)
* fix: copy initial parameters in optimize call (#174)
* fix: implement temporary solution for #171
* fix: remove pytest color output VSCode
* test: add additional resonance to fixture
* refactor: change fit result dict structure
* docs: use only 3 free parameters
  Speeds up CI and prevents memory problems on Read the Docs

Co-authored-by: sjaeger <sjaeger@ep1.rub.de>
Co-authored-by: spflueger <spfluege@gmail.com>
  • Loading branch information
3 people authored Jan 4, 2021
1 parent 06f9d51 commit cd560fa
Show file tree
Hide file tree
Showing 33 changed files with 728 additions and 149 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/ci-epic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# cspell:ignore CUDA

name: CI for epics

on:
pull_request:
branches:
- epic/*

jobs:
pytest:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r reqs/${{ matrix.python-version }}/requirements-test.txt
pip install .
- name: Test with pytest
env:
CUDA_VISIBLE_DEVICES: "-1"
run: pytest -n auto

documentation:
name: Build documentation
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r reqs/3.7/requirements-doc.txt
pip install tensorflow-cpu
pip install .
sudo apt-get -y install pandoc
- name: Build documentation
working-directory: docs
env:
CUDA_VISIBLE_DEVICES: "-1"
run: make html
- name: Test doctests in docstrings
working-directory: docs
run: make ignore-warnings=1 doctest

style:
name: Style checks
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r reqs/3.7/requirements-sty.txt
pip install .
- name: Perform style checks
run: pre-commit run -a
2 changes: 1 addition & 1 deletion .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: docker://agilepathway/pull-request-label-checker:latest
with:
any_of: Bug,💡 Enhancement,📝 Docs,🔨 Maintenance,🖱️ DX
none_of: Epic,❌ Won't fix,💫 Good first issue
none_of: ❌ Won't fix,💫 Good first issue
repo_token: ${{ secrets.GITHUB_TOKEN }}

check-title:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.pdf
*.png
*.svg
*.v2
*.xml
*.yaml
*.yml
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ coverage:
project:
default:
# basic
target: 75% # can't go below this percentage
target: 80% # can't go below this percentage
threshold: 3% # allow drops by this percentage
base: auto
# advanced
Expand Down
4 changes: 4 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@
"spflueger",
"struct",
"sympy",
"tensorboard",
"tensorflow",
"tensorwaves",
"toctree",
"topness",
"traceback",
"unbinned",
"venv",
"weisskopf",
Expand Down Expand Up @@ -119,6 +121,7 @@
"genindex",
"heli",
"histtype",
"iloc",
"iminuit",
"indeterministic",
"isort",
Expand All @@ -128,6 +131,7 @@
"linestyle",
"linkcheck",
"linspace",
"logdir",
"macos",
"markdownlint",
"mathrm",
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.csv
*.doctree
*.inv
*build/
Expand Down
6 changes: 1 addition & 5 deletions docs/usage/1_create_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"metadata": {},
"source": [
"```{admonition} Simplified model: $J/\\psi \\to f_0\\gamma$\n",
"---\n",
Expand Down
6 changes: 1 addition & 5 deletions docs/usage/2_generate_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"metadata": {},
"source": [
"````{admonition} Available kinematic variables\n",
"---\n",
Expand Down
Loading

0 comments on commit cd560fa

Please sign in to comment.