Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-28480: Update github action to py3.8 and ignore W503 #40

Merged
merged 3 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: lint

on:
- push
- pull_request
push:
branches:
- master
pull_request:

jobs:
lint:
Expand All @@ -13,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.8

- name: Install
run: pip install -r <(curl https://raw.githubusercontent.com/lsst/linting/master/requirements.txt)
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[flake8]
max-line-length = 110
ignore = E133, E226, E228, N802, N803, N806, N812, N815, N816, W504
ignore = E133, E226, E228, N802, N803, N806, N812, N815, N816, W503
exclude = __init__.py

[tool:pytest]
addopts = --flake8
flake8-ignore = E133 E226 E228 N802 N803 N806 N812 N815 N816 W504
flake8-ignore = E133 E226 E228 N802 N803 N806 N812 N815 N816 W503
14 changes: 7 additions & 7 deletions tests/test_kron.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ def measureKron(self, objImg, xcen, ycen, nsigma, kfac, nIterForRadius, disp=Non
shape = source.getShape()
if True: # nsigma*shape, the radius used to estimate R_K
shape = shape.clone()
shape.scale(source.get("ext_photometryKron_KronFlux_radius_for_radius") /
shape.getDeterminantRadius())
shape.scale(source.get("ext_photometryKron_KronFlux_radius_for_radius")
/ shape.getDeterminantRadius())
disp.dot(shape, xcen, ycen, ctype=afwDisplay.MAGENTA)
# Show R_K
shape = shape.clone()
Expand Down Expand Up @@ -320,8 +320,8 @@ def measureKronInPython(self, objImg, xcen, ycen, nsigma, kfac, nIterForRadius,
fpEllipse = afwDetection.Footprint(ellipse)

sumI = 0.0
sumR = (0.38259771140356325/ab*(1 + math.sqrt(2)*math.hypot(math.fmod(xcen, 1), math.fmod(ycen, 1))) *
objImg.image[int(xcen), int(ycen), afwImage.LOCAL])
sumR = (0.38259771140356325/ab*(1 + math.sqrt(2)*math.hypot(math.fmod(xcen, 1), math.fmod(ycen, 1)))
* objImg.image[int(xcen), int(ycen), afwImage.LOCAL])

gal = objImg.image

Expand Down Expand Up @@ -569,9 +569,9 @@ def testForced(self):
disp1.dot(shape, xc, yc, ctype=ct)
disp2 = afwDisplay.Display(frame=2)
disp2.mtv(warped, title=self._testMethodName + ": warped image")
transform = (wcs.linearizeSkyToPixel(source.getCoord(), lsst.geom.degrees) *
original.getWcs().linearizePixelToSky(source.getCoord(),
lsst.geom.degrees))
transform = (wcs.linearizeSkyToPixel(source.getCoord(), lsst.geom.degrees)
* original.getWcs().linearizePixelToSky(source.getCoord(),
lsst.geom.degrees))
shape = shape.transform(transform.getLinear())
radius = source.get("ext_photometryKron_KronFlux_radius")
xc, yc = wcs.skyToPixel(source.getCoord())
Expand Down