-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: update CI with decoupled way of running pytest #114
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has special meaning in the GitHub interface and it is good practice to have it:
@@ -47,7 +47,7 @@ | |||
|
|||
## Recommended Installation | |||
|
|||
The package `prymer` requires installation of [Primer3](https://github.com/primer3-org/primer3) and [interactive `bwa`](https://github.com/fulcrumgenomics/bwa-aln-interactive). | |||
The package `prymer` requires installation of [interactive `bwa`](https://github.com/fulcrumgenomics/bwa-aln-interactive). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like primer3 is nuked, so I got rid of that.
docs/CONTRIBUTING.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This soft-link ensure there is only 1 source of contributor/developer documentation and it will show up nicely in GitHub and also get compiled into our docs website too.
[tool.git-cliff.changelog] | ||
header = "" | ||
trim = true | ||
body = """ | ||
{% for group, commits in commits | group_by(attribute="group") %} | ||
## {{ group | upper_first }} | ||
{% for commit in commits %} | ||
- {{ commit.message | upper_first }} ({{ commit.id | truncate(length=8, end="") }})\ | ||
{% endfor %} | ||
{% endfor %}\n | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is repo/CI configuration, I moved it to the bottom.
So the flow of the pyproject.toml
goes:
- Python project config
- Project config
|
||
[tool.mypy] | ||
files = ["prymer", "tests"] | ||
python_version = "3.12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the reasons here: https://github.com/fulcrumgenomics/python-template/pull/19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, thanks! I got bitten by this earlier this week!
ignore_missing_imports = true | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "7.4" | ||
addopts = [ | ||
"--import-mode=importlib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being explicit here I think is best practice.
pyproject.toml
Outdated
@@ -144,13 +148,88 @@ testpaths = [ | |||
[tool.ruff] | |||
include = ["prymer/**/*.py", "tests/**/*.py"] | |||
line-length = 100 | |||
target-version = "py311" | |||
target-version = "py312" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the project is now Py3.12+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now. I'd like to re-enable 3.11 when we're doing making big changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make a difference right now so I reverted to py311
.
# TODO: fixup the documentation so we can remove the following lints from the ignore list: | ||
"ARG001", # unused function argument | ||
"ARG003", # unused class method argument | ||
"D102", # missing docstring in public method | ||
"D103", # missing docstring in public function | ||
"D105", # missing docstring in magic method | ||
"D107", # missing docstring in __init__ | ||
"D214", # section is over-indented | ||
"D200", # one-line docstring should fit on one line | ||
"D202", # no blank lines allowed after function docstring | ||
"D205", # 1 blank line required between summary line and description | ||
"D209", # multi-line docstring closing quotes should be on a separate line | ||
"D213", # multi-line docstring summary should start at the second line | ||
"D412", # no blank lines allowed between a section header and its content ("Example") | ||
"D414", # section has no content | ||
"D415", # first line should end with a period, question mark, or exclamation point | ||
"D417", # missing argument description in the docstring | ||
"F841", # local variable `x` is assigned to but never used | ||
"N815", # variable `x` in class scope should not be mixedCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added in our ruff lints but then ignored all the ones that failed.
Fixing these will make the API docs render even more nicely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @clintval !
No description provided.