Commit Graph
1832 Commits
Author SHA1 Message Date
Athanasius 2b4f275670 Needs a runs-on for the check_access 2020-07-28 17:15:14 +01:00
Athanasius e625a85823 Correct syntax 2020-07-28 17:14:27 +01:00
Athanasius dfb9160248 Don't run flake8_annotate if no access
This is using github.actor and checking who it is.  If they're not
someone who should have access then use a run with 'exit 1' to fail the
check job.

Then flake8_annotate job needs check_access to have succeeded.

This *will* flag the workflow action as failed if no access, hopefully
it will be obvious why.

Using 'AthanasiusTEST' so it fails for me on this commit/push.
2020-07-28 17:11:16 +01:00
Athanasius fb7d7ea674 S I N G L E Q U O T E S 2020-07-28 17:02:32 +01:00
Athanasius ae76059774 Attempt to limit flake8 annotations to Athanasius 2020-07-28 17:01:24 +01:00
Athanasius ef1c2cf840 Revert "Cause EDMC.py to diff to check the detection"
This reverts commit 3b55a7a5de.
2020-07-28 16:48:57 +01:00
Athanasius 3b55a7a5de Cause EDMC.py to diff to check the detection 2020-07-28 16:45:52 +01:00
Athanasius 12b100fd39 Gurantee exit 0 AND fix the echo
* GH Workflows run under "/bin/bash -e", which means if anything in it
 fails it all exits immediately.  So append " || true" to the egrep.
* The echo to magically set the env var back in the workflow needs to
 use "" not '' else the in-shell variable won't interpolate.
2020-07-28 16:42:57 +01:00
Athanasius 67803ec4ea *.py check should always exit 0 2020-07-28 16:32:06 +01:00
Athanasius e823b47811 Single quotes then ? 2020-07-28 16:29:42 +01:00
Athanasius c49231ae36 Try ENV var for passing presence of *.py files
This uses <https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#using-workflow-commands-to-access-toolkit-functions>
to set PYFILES env var globally in the job, so should be testable in
the following steps.
2020-07-28 16:25:27 +01:00
Athanasius ab8ec0fcbb *.py exit status was inverted
That'll teach me for testing with a commit only affecting *.yml files.
2020-07-28 16:10:04 +01:00
Athanasius 0f4ef1623c Remove extraneous 'needs:' 2020-07-28 16:08:15 +01:00
Athanasius becb7b2aec Do *.py check as step in flake8_annotate
And make both the 'Annotate with Flake8' and 'Set up Python 3.7' steps
dependent on it.
2020-07-28 16:06:48 +01:00
Athanasius 771ea531ee Only run flake8 annotation if there are *.py files in diff 2020-07-28 16:02:38 +01:00
Athanasius 8337e41d75 Final clean ups.
It works!  So, yes, need refs/remotes/origin/ prepended to the base_ref,
which will always be a branch for a PR.

* Remove debug lines (set -x, etc).
* No need for pytest here as yet.
* Fall back to requirements.txt if no requirements-dev.txt.
2020-07-28 15:39:39 +01:00
Athanasius cabaf2c637 See if prepending "refs/remotes/origin/" helps 2020-07-28 15:35:34 +01:00
Athanasius be98212f8b Attempt "git diff <branch> --"
As in "git diff [<options>] [<commit>] [--] [<path>...]", in case
it's an ambiguity rather than not knowing what 'develop' is.
2020-07-28 15:30:11 +01:00
Athanasius bb34ba414c Extra git commands for diagnosis 2020-07-28 15:28:20 +01:00
Athanasius 2b45847793 Try "fetch-depth: 0" on the extra checkouts 2020-07-28 15:23:35 +01:00
Athanasius 70f62668c9 Add 'set -x' to get feedback on all bash commands run 2020-07-28 15:21:26 +01:00
Athanasius 83979337d4 Correct "-name" -> "- name" 2020-07-28 15:19:56 +01:00
Athanasius b30d57d411 pr-checks: Changed to pull_request and fleshed out
* Name all steps
* After checkout@v2 fetch: 1) checkout base_ref, 2) checkout head_ref
* Set and use BASE_REF env var
2020-07-28 15:12:17 +01:00
Athanasius 44fe00a410 Copy push-checks.yml to pr-checks.yml 2020-07-28 15:03:20 +01:00
Athanasius e645ee5675 Revert "Change the push-checks back into also PRs."
This reverts commit 4da1d9df4e.
2020-07-28 15:02:32 +01:00
Athanasius a3ea7008b4 Merge pull request #646 from EDCD/enhancement/638-flake8-prs
Run flake8 for status on all pull requests
2020-07-28 13:49:07 +01:00
Athanasius 4da1d9df4e Change the push-checks back into also PRs.
Renamed to suit.
2020-07-28 13:45:55 +01:00
Athanasius 525ebae61d Merge pull request #625 from A-UNDERSCORE-D/fix/624-inara-too-fast
Switched to using a timer for inara updates
2020-07-28 11:26:51 +01:00
Athanasius cbb64a60a8 Merge pull request #636 from EDCD/cleanup/EDMarketConnector.py
Continuing work on passing flake8 in EDMarketConnector.py
2020-07-27 18:35:11 +01:00
Athanasius b1d35e0579 Merge branch 'fix/639-crash-linux-unset-journal-dir' into develop 2020-07-27 18:12:40 +01:00
A_D 6ab4433c59 Add TODO regarding type config 2020-07-27 19:07:54 +02:00
A_D 1b543e5820 Dont crash when journal_dir is None
Ensures that journal_dir is always at least an empty string.

Fixes #639
2020-07-27 18:55:59 +02:00
Athanasius a5b7bea2ca Move comment to line above if 2020-07-27 15:16:23 +01:00
Athanasius b17b3a4a72 Merge pull request #632 from A-UNDERSCORE-D/cleanup/eddb
Cleanup eddb plugin
2020-07-27 14:56:29 +01:00
A_D b27e4a3628 fixed tk import and type annotations 2020-07-27 15:15:56 +02:00
A_D cad5f72b0a updated type annotation 2020-07-27 15:15:55 +02:00
A_D 7b231fb244 removed unicode specifier from string
python3 strings are always unicode
2020-07-27 15:15:55 +02:00
A_D 07c43d3057 added type annotations to globals 2020-07-27 15:15:54 +02:00
A_D e0462d8719 Replaced complex oneliner with multiline if 2020-07-27 15:15:54 +02:00
A_D 37181264c9 Added newline after scope changes 2020-07-27 15:15:53 +02:00
A_D 4eed4404c6 Added Any type hint to this
Resolves most type warnings
2020-07-27 15:15:53 +02:00
A_D ab58aa6355 autoformatted file 2020-07-27 15:15:52 +02:00
A_D d4299c224f dont force a send on exit
just try and send if we can
2020-07-27 15:12:32 +02:00
A_D bb817eee3b removed outdated comment 2020-07-27 15:08:47 +02:00
A_D 340f8928b3 switched to using config for last update time 2020-07-27 15:08:47 +02:00
A_D 34760683e5 added some debug logging 2020-07-27 15:08:46 +02:00
A_D 72498b3bbc Switched to using a timer for inara updates
This adds a new thread that will run in a loop sending inara events once
ever 30 seconds. The old method of sending once for "special" events has
been removed.
2020-07-27 15:08:46 +02:00
Athanasius 9face638fe Minor cleanups all done.
Only remaining are:

 * TAE001 too few type annotations
 * Multiple "Cognitive complexity is too high" / "is too complex"
2020-07-27 13:00:59 +01:00
Athanasius e0324cb9cd More flake8 cleanup 2020-07-27 11:15:03 +01:00
Athanasius 9fcaeb5feb Merge pull request #630 from EDCD/enhancement/563-proper-logging
Enhancement/563 proper logging

Covers only a few files for now.  But let's get this merged so we can move on.
2020-07-27 11:07:50 +01:00