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

Monitor action #5

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
- name: Checkout repository contents
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
Expand Down
30 changes: 26 additions & 4 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,31 @@ jobs:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.11.0

- uses: DoozyX/clang-format-lint-action@v0.16.2
with:
clang-format-version: '15'
check-path: .
source: '.'
clangFormatVersion: 15
inplace: True
#- name: Run clang-format style check for C/C++/Protobuf programs.
#uses: jidicula/clang-format-action@v4.11.0
#with:
#clang-format-version: '15'
#check-path: .
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files

- name: List all changed files tracked and untracked files
run: |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"


- uses: actions/upload-artifact@v3
with:
name: my-artifact
path: ${{ steps.verify-changed-files.outputs.changed_files }}"

2 changes: 2 additions & 0 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
fail-fast: false

steps:
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Get dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4

- name: Set up Python
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
runs-on: ${{ matrix.os }}

steps:
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
- name: Versions
run: |
echo OS: ${{ matrix.os }}
Expand Down Expand Up @@ -111,7 +113,7 @@
cd gui/wxpython
pylint --persistent=no --py-version=${{ matrix.min-python-version }} --jobs=$(nproc) *

- name: Run Pylint on other files using pytest

Check warning on line 116 in .github/workflows/python-code-quality.yml

View workflow job for this annotation

GitHub Actions / Python Code Quality (ubuntu-22.04, 3.10, 3.7, 23.1.0, 3.9.2, 2.12.2)

Temporarily downgraded pytest-pylint to allow merging other PRs. The errors reported with a newer version seem legitimite and should be fixed (2023-10-18, see https://github.com/OSGeo/grass/pull/3205)
run: |
pip install pytest pytest-pylint==0.19
echo "::warning file=.github/workflows/python-code-quality.yml,line=116,col=42,endColumn=48::Temporarily downgraded pytest-pylint to allow merging other PRs. The errors reported with a newer version seem legitimite and should be fixed (2023-10-18, see https://github.com/OSGeo/grass/pull/3205)"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Lint code base
uses: github/super-linter@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
fail-fast: false

steps:
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4

- name: Get dependencies
Expand Down
10 changes: 5 additions & 5 deletions display/d.erase/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
int main(int argc, char *argv[])
{
struct Option *color;
struct Flag *eraseframe;
struct Flag * eraseframe;
struct GModule *module;

G_gisinit(argv[0]);

module = G_define_module();
G_add_keyword(_("display"));
G_add_keyword(_("graphics"));
G_add_keyword(_("graphics")) ;
G_add_keyword(_("monitors"));
module->description = _("Erases the contents of the active graphics "
"display frame with user defined color.");

color = G_define_standard_option(G_OPT_C);
color->key = "bgcolor";
color->label = _("Background color");
color->answer = DEFAULT_BG_COLOR;
color-> answer = DEFAULT_BG_COLOR;

eraseframe = G_define_flag();
eraseframe->key = 'f';
Expand All @@ -43,11 +43,11 @@ int main(int argc, char *argv[])
if (G_parser(argc, argv))
exit(EXIT_FAILURE);

D_open_driver();
D_open_driver();

D_setup_unity(0);

D_erase(color->answer);
D_erase(color->answer);

if (eraseframe->answer)
D__erase();
Expand Down
12 changes: 6 additions & 6 deletions display/d.extract/extract.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define M_START 1
#define M_ADD 2
#define M_DEL 3
#define M_END 4
#define M_END 4

int display(struct Map_info *Map, struct boxlist *List,
const struct color_rgb *color);
Expand All @@ -27,7 +27,7 @@ int extract(struct Map_info *In, struct Map_info *Out, int type,
struct boxlist *List, *CList;
struct bound_box box;
struct line_pnts *Points;
struct line_cats *Cats;
struct line_cats *Cats;

Points = Vect_new_line_struct();
Cats = Vect_new_cats_struct();
Expand All @@ -45,20 +45,20 @@ int extract(struct Map_info *In, struct Map_info *Out, int type,
G_message(
_(" - M: draw box with middle mouse button to remove from display"));
G_message(_(" - R: quit and save selected vectors to new map\n"));
while (1) {
while ( 1) {
G_message(_("L: add M: remove R: quit and save\n"));

if (mode == M_START) {
R_get_location_with_pointer(&screen_x, &screen_y, &button);
cur_screen_x = screen_x;
cur_screen_x = screen_x;
cur_screen_y = screen_y;
}
else {
R_get_location_with_box(cur_screen_x, cur_screen_y, &screen_x,
&screen_y, &button);
x1 = D_d_to_u_col((double)(cur_screen_x));
y1 = D_d_to_u_row((double)(cur_screen_y));
x2 = D_d_to_u_col((double)(screen_x));
x2 = D_d_to_u_col((double)(screen_x));
y2 = D_d_to_u_row((double)(screen_y));

if (x1 < x2) {
Expand All @@ -83,7 +83,7 @@ int extract(struct Map_info *In, struct Map_info *Out, int type,

/* TODO: check if line really intersects box, not only box intersects
* box */
switch (button) {
switch (button) {
case 1:
if (mode == M_START) {
mode = M_ADD;
Expand Down
Loading