This repository was archived by the owner on Feb 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding pre-commit * apply formatting * add CI check * prune CI triggers
- Loading branch information
Showing
28 changed files
with
126 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,25 @@ jobs: | |
- name: isort | ||
run: isort --check-only . | ||
|
||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
|
||
- name: set PY | ||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
- uses: pre-commit/[email protected] | ||
# this action also provides an additional behaviour when used in private repositories | ||
# when configured with a github token, the action will push back fixes to the pull request branch | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
#typing-check-mypy: | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ coverage.xml | |
.hypothesis/ | ||
|
||
# Documentation | ||
docs/build | ||
docs/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
default_language_version: | ||
python: python3.8 | ||
|
||
ci: | ||
autofix_prs: true | ||
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions' | ||
# submodules: true | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: pretty-format-json | ||
|
||
#- repo: https://github.com/pre-commit/mirrors-autopep8 | ||
# rev: v1.5.7 | ||
# hooks: | ||
# - id: autopep8 | ||
# name: fixing PEP8 | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.8.0 | ||
hooks: | ||
- id: isort | ||
name: imports | ||
require_serial: false | ||
|
||
- repo: https://github.com/pre-commit/mirrors-yapf | ||
rev: v0.31.0 | ||
hooks: | ||
- id: yapf | ||
name: formatting | ||
language: python | ||
require_serial: false | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
name: PEP8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
show_downloads: true | ||
theme: jekyll-theme-leap-day | ||
theme: jekyll-theme-leap-day |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ myst-parser | |
nbsphinx>=0.8.5 | ||
pandoc | ||
docutils | ||
ipython | ||
ipython |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author Jiri Borovec | ||
* @date 13/06/2014 | ||
* @mail [email protected] | ||
* | ||
* @brief: This macro does export set of points from Multi-point tool | ||
* | ||
* @brief: This macro does export set of points from Multi-point tool | ||
* into .csv and .txt files (the name is specified during exporting) | ||
*/ | ||
|
||
|
@@ -40,4 +40,4 @@ for(i=0; i<lengthOf(xCoordinates); i++) { | |
setResult("Y", i, yCoordinates[i]); | ||
} | ||
updateResults(); | ||
saveAs("Results", fileName+".csv"); | ||
saveAs("Results", fileName+".csv"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author Jiri Borovec | ||
* @date 13/06/2014 | ||
* @mail [email protected] | ||
* | ||
* @brief: This macro does importing set of points from Multi-point tool | ||
* | ||
* @brief: This macro does importing set of points from Multi-point tool | ||
* from .csv and .txt files (the name is specified during exporting) | ||
*/ | ||
|
||
|
@@ -20,7 +20,7 @@ text = split(allText, "\n"); | |
|
||
// define array for points | ||
var xpoints = newArray; | ||
var ypoints = newArray; | ||
var ypoints = newArray; | ||
|
||
// in case input is in TXT format | ||
if (ext=="txt") { | ||
|
@@ -32,11 +32,11 @@ if (ext=="txt") { | |
// loading and parsing each line | ||
for (i = 2; i < (text.length); i++){ | ||
line = split(text[i]," "); | ||
setOption("ExpandableArrays", true); | ||
setOption("ExpandableArrays", true); | ||
xpoints[i-2] = parseInt(line[iX]); | ||
ypoints[i-2] = parseInt(line[iY]); | ||
print("p("+i-1+") ["+xpoints[i-2]+"; "+ypoints[i-2]+"]"); | ||
} | ||
ypoints[i-2] = parseInt(line[iY]); | ||
print("p("+i-1+") ["+xpoints[i-2]+"; "+ypoints[i-2]+"]"); | ||
} | ||
// in case input is in CSV format | ||
} else if (ext=="csv") { | ||
print("importing CSV point set..."); | ||
|
@@ -50,15 +50,15 @@ if (ext=="txt") { | |
// loading and parsing each line | ||
for (i = 1; i < (text.length); i++){ | ||
line = split(text[i],","); | ||
setOption("ExpandableArrays", true); | ||
setOption("ExpandableArrays", true); | ||
xpoints[i-1] = parseInt(line[iX]); | ||
ypoints[i-1] = parseInt(line[iY]); | ||
print("p("+i+") ["+xpoints[i-1]+"; "+ypoints[i-1]+"]"); | ||
} | ||
print("p("+i+") ["+xpoints[i-1]+"; "+ypoints[i-1]+"]"); | ||
} | ||
// in case of any other format | ||
} else { | ||
print("not supported format..."); | ||
print("not supported format..."); | ||
} | ||
|
||
// show the points in the image | ||
makeSelection("point", xpoints, ypoints); | ||
makeSelection("point", xpoints, ypoints); |
Oops, something went wrong.