Skip to content

Added copyrighter, tests, and pre-commit hooks.#1

Merged
alexkfreed merged 11 commits intodevelopfrom
feature/copyrighter
Apr 22, 2022
Merged

Added copyrighter, tests, and pre-commit hooks.#1
alexkfreed merged 11 commits intodevelopfrom
feature/copyrighter

Conversation

@alexkfreed
Copy link
Copy Markdown
Contributor

No description provided.

@alexkfreed alexkfreed requested a review from jonbeare April 14, 2022 22:24
@alexkfreed alexkfreed self-assigned this Apr 14, 2022
if not match:
return None, None

start_year = int(match.group()[14:18])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest adding a comment about how end_year will eq start_year if there is no (-dddd) in the line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,250 @@
#!/usr/bin/env python3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the python linting checks that run on nimble should also run in this repo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i'm working on setting that up now. I did check these file with the nimble linting before moving it over here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added pre-commit to this PR. Github actions is not setup to call pre-commit automatically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok now github actions calls it automatically

@jonbeare jonbeare requested a review from BTOdell April 15, 2022 22:22
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2022

Unit Test Results

  1 files    1 suites   0s ⏱️
42 tests 42 ✔️ 0 💤 0

Results for commit 1ff410a.

♻️ This comment has been updated with latest results.

@alexkfreed
Copy link
Copy Markdown
Contributor Author

alexkfreed commented Apr 16, 2022

I've added pre-commit to this PR. It is not automatically called by CI yet.

@alexkfreed
Copy link
Copy Markdown
Contributor Author

alexkfreed commented Apr 16, 2022

I've added CI unit tests to this PR.

@alexkfreed
Copy link
Copy Markdown
Contributor Author

CI now calls pre-commit automatically

@alexkfreed alexkfreed requested a review from jonbeare April 16, 2022 04:11
jonbeare
jonbeare previously approved these changes Apr 18, 2022
@alexkfreed alexkfreed force-pushed the feature/copyrighter branch from 2865817 to a8f0adc Compare April 20, 2022 01:22
@alexkfreed alexkfreed force-pushed the feature/copyrighter branch from 30ca2ec to e17e1a9 Compare April 20, 2022 22:39
@alexkfreed alexkfreed force-pushed the feature/copyrighter branch from e17e1a9 to d5d9f03 Compare April 21, 2022 00:53
BTOdell
BTOdell previously approved these changes Apr 21, 2022
The basic github token doesn't allow a workflow's commit to re-trigger
the workflow. (The CI actions won't run on the pre-commit fixes).

Added tibdex/github-app-token@v1 to the workflow.

Some setup must also be done in the repo:
> go to GitHub
> megh-pre-commit-agent
> generate a private key (or reuse existing one)
> copy private key and app id
> go to repo
> settings > secrets > actions
>     name: PRE_COMMIT_AGENT_APP_ID, value: ___
>     name: PRE_COMMIT_AGENT_PRIVATE_KEY, value: ___
@alexkfreed alexkfreed force-pushed the feature/copyrighter branch from 6399a70 to 1ff410a Compare April 22, 2022 01:33
@alexkfreed alexkfreed requested a review from BTOdell April 22, 2022 03:36
@alexkfreed alexkfreed requested a review from jonbeare April 22, 2022 03:36
@alexkfreed
Copy link
Copy Markdown
Contributor Author

@BTOdell let's close out this PR and I can setup the proper python installation in the next PR

@alexkfreed alexkfreed merged commit 6d225fa into develop Apr 22, 2022
@alexkfreed alexkfreed deleted the feature/copyrighter branch April 22, 2022 23:14
jonbeare pushed a commit that referenced this pull request Apr 28, 2022
Added
* copyrighter
* unit tests for copyrighter
* pre-commit hooks for other repos to use copyrighter
* pre-commit configuration for this repo
* github workflow to run pre-commit in this repo. It runs only on files changed in the triggering PR
* github workflow to run unit tests in this repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants