diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 0636152..e1195b9 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,10 +1,8 @@ # Build documentation +# The build is uploaded as artifact if the triggering event is a push for a pull request +# The build is published to github pages if the triggering event is a push to the master branch (PR merge) name: Build and upload documentation -defaults: - run: - shell: bash - on: # Runs on any push event in a PR or any push event to master pull_request: push: @@ -13,48 +11,4 @@ on: # Runs on any push event in a PR or any push event to master jobs: documentation: - name: ${{ matrix.os }} / ${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - strategy: - matrix: # only lowest supported python on ubuntu-latest - os: [ubuntu-latest] - python-version: [3.9] - - steps: - - uses: actions/checkout@v3 - - - name: Install LaTeX - run: sudo apt-get install -y texlive-latex-base # texlive-fonts-extra texlive-fonts-recommended texlive-latex-extra texlive-latex-recommended ghostscript - - - name: Install optipng - run: sudo apt-get install -y optipng - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Upgrade pip - run: python -m pip install --upgrade pip - - - name: Install dependencies - run: python -m pip install -r doc/requirements.txt - - - name: Build documentation - run: python -m sphinx -v -b html doc doc_build -d doc_build - - - name: Upload build artifacts # upload artifacts so reviewers can have a quick look without building documentation from the branch locally - if: success() && github.event_name == 'pull_request' # only for pushes in PR - uses: actions/upload-artifact@v3 - with: - name: site-build - path: doc_build - retention-days: 5 - - - name: Upload documentation to gh-pages - if: success() && github.ref == 'refs/heads/master' # only for pushes to master - uses: JamesIves/github-pages-deploy-action@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages - folder: doc_build + uses: pylhc/.github/.github/workflows/documentation.yml@master diff --git a/README.md b/README.md index 26ee69e..6873627 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,20 @@ [![GitHub release](https://img.shields.io/github/release/pylhc/accelerator_timeline.svg?style=popout)](https://github.com/pylhc/accelerator_timeline/) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8316137.svg)](https://doi.org/10.5281/zenodo.8316137) -In this package, the main parameters of major historical, modern and possible future accelerators are +In this package, the main parameters of major historical, modern and possible future accelerators are collected, including references to the origin of the collected data, into a single csv: - - [accelerator-parameters.csv](accelerator-parameters.csv). +- [accelerator-parameters.csv](accelerator-parameters.csv). - - -## Installation +## Installation This package is mostly for collecting and sharing the data of the accelerators within -the CSV file. +the CSV file. - -To get the data, either download the [accelerator-parameters.csv](accelerator-parameters.csv) directly, +To get the data, either download the [accelerator-parameters.csv](accelerator-parameters.csv) directly, or clone the repository via `git`, e.g.:: -``` +```bash git clone https://github.com/pylhc/accelerator_timeline.git ``` @@ -28,16 +25,23 @@ git clone https://github.com/pylhc/accelerator_timeline.git In addition, small python scripts are provided to explore the data via and create Livingston-like plots. These charts are available interactively at: - - - [pylhc.github.io/accelerator_timeline](https://pylhc.github.io/accelerator_timeline). + +- [pylhc.github.io/accelerator_timeline](https://pylhc.github.io/accelerator_timeline). The python code itself can be found at - - [interactive_charts.py](interactive_charts.py), creating the interactive charts via plotly. - - [export_charts.py](export_charts.py), making publication-grade exports to pdf via matplotlib. +- [interactive_charts.py](interactive_charts.py), creating the interactive charts via plotly. +- [export_charts.py](export_charts.py), making publication-grade exports to pdf via matplotlib. The requirements for the scripts can be found in the respective `requirements_*.txt` file. ![Center of Mass](images/energy.png) ![Luminosity](images/luminosity.png) ![LuminosityVsEnergy](images/luminosity-vs-energy.png) + +## Note for Developers + +Updating the data in the CSV will automatically update the charts in the +[pylhc.github.io/accelerator_timeline](https://pylhc.github.io/accelerator_timeline) website via GitHub Actions. +The pictures in the `images/` folder (which are also linked in this `README`) are **not** automatically generated +and need to be updated manually by running the `export_charts.py` script and committing the changes. diff --git a/accelerator-parameters.csv b/accelerator-parameters.csv index 8a5157b..d6dff9c 100755 --- a/accelerator-parameters.csv +++ b/accelerator-parameters.csv @@ -43,8 +43,8 @@ FCC-ee WW,CERN,Switzerland,2043*,,e+e-,80,,2.8E+035,97750,https://journals.aps.o FCC-ee ZH,CERN,Switzerland,2045*,,e+e-,120,,8.5E+034,97750,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://doi-org.ezproxy.cern.ch/10.1140/epjst/e2019-900045-4 FCC-ee ttbar,CERN,Switzerland,2049*,,e+e-,182.5,,1.55E+034,97750,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://doi-org.ezproxy.cern.ch/10.1140/epjst/e2019-900045-4 FCC-hh,CERN,Switzerland,2070*,,p+p+,50000,,3E+035,97750,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 -CEPC,IHEP,China,2035*,,e+e-,45.5,,3.2E+035,100000,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://arxiv.org/abs/1809.00285 https://www.researchgate.net/publication/359254433_Snowmass_2021_White_Paper_AF4_-_SPPC -SppC,IHEP,China,2050*,,p+p+,37500,,1E+035,100000,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://www.researchgate.net/publication/359254433_Snowmass_2021_White_Paper_AF4_-_SPPC +CEPC,IHEP,China,2035*,,e+e-,45.5,,3.2E+035,100000,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://arxiv.org/abs/1809.00285 https://doi.org/10.48550/arXiv.2203.07987 +SppC,IHEP,China,2050*,,p+p+,37500,,1E+035,100000,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://doi.org/10.48550/arXiv.2203.07987 ILC v1,Fermilab,USA,2035*,,e+e-,125,,1.35E+034,20500,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://arxiv.org/pdf/1901.09829.pdf ILC v2,Fermilab,USA,2040*,,e+e-,250,,1.8E+034,31000,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://arxiv.org/pdf/1901.09829.pdf ILC v3,Fermilab,USA,2045*,,e+e-,500,,4.9E+034,40000,https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.93.015006 https://arxiv.org/pdf/1901.09829.pdf diff --git a/doc/Makefile b/doc/Makefile index f720b20..c3598ae 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -51,11 +51,6 @@ html: @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -josch: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ../../Documentation/accelerator_timeline-doc - @echo - @echo "Build finished. The HTML pages are in ../../Documentation/accelerator_timeline-doc." - dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css index 454b663..c52d4fb 100644 --- a/doc/_static/css/custom.css +++ b/doc/_static/css/custom.css @@ -1,5 +1,5 @@ :root { - --nav-side-width: 300px; /* default is 300px */ + --nav-side-width: 250px; /* default is 300px */ /* for 100% width */ /*--nav-content-width: 100%;*/ /*--local-toc-width: 300px;*/ @@ -7,7 +7,7 @@ /*--local-toc-left: calc(100% - var(--local-toc-width)); /* 100% here is w/o sidebar */ /* for fixed widths */ - --nav-content-width: 800px; /* default is 800px */ + --nav-content-width: 1000px; /* default is 800px */ --nav-content-width-wide: var(--nav-content-width); --local-toc-width: calc(100% - var(--nav-content-width-wide)); --local-toc-left: calc(var(--nav-content-width-wide) + var(--nav-side-width)); @@ -57,7 +57,7 @@ border: none; } -/* Hide the first two entries (combined in the first