Skip to content

Commit

Permalink
Merge pull request #34 from slaclab/pre-release
Browse files Browse the repository at this point in the history
Release Candidate v3.5.3
  • Loading branch information
ruck314 authored Jan 11, 2021
2 parents 1cb801f + 26a8579 commit b3a8603
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 312 deletions.
37 changes: 37 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[flake8]
exclude = __init__.py
#############################################################
# Note: Comamnd to remove white space at the end of lines
# $ find . -type f -name "*.py" -print0 | xargs -0 sed -i 's/\s*$//g'
#############################################################
# E116 unexpected indentation (comment)
# E128 continuation line under-indented for visual indent
# E131 continuation line unaligned for hanging indent
# E201 whitespace after '('
# E202 whitespace before ')'
# E203 whitespace before ':'
# E211 whitespace before '('
# E221 multiple spaces before operator
# E222 multiple spaces after operator
# E225 missing whitespace around operator
# E226 missing whitespace around arithmetic operator
# E227 missing whitespace around bitwise or shift operator
# E228 missing whitespace around modulo operator
# E231 missing whitespace after ','
# E241 multiple spaces after ','
# E251 unexpected spaces around keyword / parameter equals
# E261 at least two spaces before inline comment
# E262 inline comment should start with '# '
# E265 block comment should start with '# '
# E266 too many leading '#' for block comment
# E272 multiple spaces before keyword
# E302 expected 2 blank lines, found 1
# E303 too many blank lines
# E305 expected 2 blank lines after class or function definition
# E306 expected 1 blank line before a nested definition, found 0
# E501 line too long
#############################################################
ignore = E116,E128,E131,\
E201,E202,E203,E211,E221,E222,E225,E226,E227,E228,E231,E241,E251,E261,E262,E265,E266,E272,\
E302,E303,E305,E306,\
E501
163 changes: 163 additions & 0 deletions .github/workflows/lcls2_pgp_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# ----------------------------------------------------------------------------
# Title : LCLS2 PGP FW GitHub Actions CI Script
# ----------------------------------------------------------------------------
# This file is part of the 'LCLS2 PGP Firmware library'. It is subject to
# the license terms in the LICENSE.txt file found in the top-level directory
# of this distribution and at:
# https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
# No part of the 'LCLS2 PGP Firmware library', including this file, may be
# copied, modified, propagated, or distributed except according to the terms
# contained in the LICENSE.txt file.
# ----------------------------------------------------------------------------
# The following environment variables are required for this process:
# secrets.GH_TOKEN
# secrets.CONDA_UPLOAD_TOKEN_DEV
# secrets.CONDA_UPLOAD_TOKEN_TAG

name: Repo Integration
on: [push]

jobs:

test:
name: Test
runs-on: ubuntu-20.04
steps:

# This step checks out a copy of your repository.
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Python Syntax Check
run: |
python -m compileall -f python/
flake8 --count python/
gen_release:
name: Generate Release
runs-on: ubuntu-20.04
needs: [test]
if: startsWith(github.ref, 'refs/tags/')
steps:

- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Get Image Information
id: get_image_info
run: |
echo ::set-output name=tag::`git describe --tags`
- name: Get Ruckus
run: |
git clone https://github.com/slaclab/ruckus.git
python -m pip install --upgrade pip
pip install -r ruckus/scripts/pip_requirements.txt
- name: Gen Release
env:
TRAVIS_REPO_SLUG: ${{ github.repository }}
TRAVIS_TAG: ${{ steps.get_image_info.outputs.tag }}
GH_REPO_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
python ruckus/scripts/releaseGen.py
conda_build:
name: Anaconda Build
needs: [test]
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/pre-release'
strategy:
matrix:
os:
- ubuntu-20.04
- macos-10.15
runs-on: ${{ matrix.os }}
steps:

# This step checks out a copy of your repository.
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Setup anaconda
env:
OS_NAME: ${{ matrix.os }}
run: |
cd ${HOME}
if [ $OS_NAME == "macos-10.15" ]
then
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
fi
bash miniconda.sh -b -p ${HOME}/miniconda
export PATH="${HOME}/miniconda/bin:$PATH"
source ${HOME}/miniconda/etc/profile.d/conda.sh
conda config --set always_yes yes
conda install conda-build anaconda-client conda-verify
if [ $OS_NAME == "macos-10.15" ]
then
conda install libiconv libarchive -c conda-forge
fi
conda update -q conda conda-build
conda update --all
- name: Setup MacOS
if: matrix.os == 'macos-10.15'
run: |
cd ${HOME}
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz
tar xzf MacOSX10.15.sdk.tar.xz
sudo mkdir -p /opt/
sudo mv MacOSX10.15.sdk /opt/
CONDA_BUILD_SYSROOT=/opt/MacOSX10.15.sdk
CONDA_BUILD=1
echo "CONDA_BUILD_SYSROOT=$CONDA_BUILD_SYSROOT" >> $GITHUB_ENV
echo "CONDA_BUILD=$CONDA_BUILD" >> $GITHUB_ENV
- name: Get Image Information
id: get_image_info
env:
CONDA_UPLOAD_TOKEN_DEV: ${{ secrets.CONDA_UPLOAD_TOKEN_DEV }}
CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }}
OS_NAME: ${{ matrix.os }}
run: |
if [ ${GITHUB_REF} == "refs/heads/pre-release" ]
then
echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_DEV
else
echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_TAG
fi
if [ ${OS_NAME} == "macos-10.15" ]
then
echo ::set-output name=os::osx-64
else
echo ::set-output name=os::linux-64
fi
- name: Build And Upload
run: |
export PATH="${HOME}/miniconda/bin:$PATH"
source ${HOME}/miniconda/etc/profile.d/conda.sh
conda build --debug conda-recipe --output-folder bld-dir -c tidair-tag -c tidair-packages -c conda-forge
anaconda -t ${{ steps.get_image_info.outputs.token }} upload bld-dir/${{ steps.get_image_info.outputs.os }}/*.tar.bz2
110 changes: 0 additions & 110 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Copyright (c) 2020, The Board of Trustees of the Leland Stanford Junior
Copyright (c) 2021, The Board of Trustees of the Leland Stanford Junior
University, through SLAC National Accelerator Laboratory (subject to receipt
of any required approvals from the U.S. Dept. of Energy). All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# contained in the LICENSE.txt file.
#-----------------------------------------------------------------------------

import pyrogue as pr

from lcls2_pgp_fw_lib.hardware.shared import Hsio
from lcls2_pgp_fw_lib.hardware.SlacPgpCardG4 import SlacPgpCardG4TimingRx

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# contained in the LICENSE.txt file.
#-----------------------------------------------------------------------------

import pyrogue as pr

from lcls2_pgp_fw_lib.hardware.shared import Hsio
from lcls2_pgp_fw_lib.hardware.XilinxKcu1500 import Kcu1500TimingRx

Expand All @@ -28,4 +26,3 @@ def __init__(self,
enLclsII=enLclsII,
pgp3=pgp3,
**kwargs)

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
class Kcu1500TimingRx(TimingRx):
def __init__(self, numLanes = 4, **kwargs):
super().__init__(numLanes=numLanes, dualGTH=True, **kwargs)

3 changes: 0 additions & 3 deletions python/lcls2_pgp_fw_lib/hardware/shared/_Hsio.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

import pyrogue as pr

import lcls2_pgp_fw_lib.hardware.shared as shared

import surf.protocols.pgp as pgp
import surf.axi as axi

Expand Down Expand Up @@ -61,4 +59,3 @@ def __init__(
enLclsII = enLclsII,
numLanes = numLanes,
))

2 changes: 0 additions & 2 deletions python/lcls2_pgp_fw_lib/hardware/shared/_Root.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import pyrogue as pr
import pyrogue.interfaces.simulation

import rogue

class Root(pr.Root):
""" A generic Root class that sets up all of the common sub-devices and hardware connections that a PGP project would have."""
def __init__(self,
Expand Down
Loading

0 comments on commit b3a8603

Please sign in to comment.