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

chore: update CI with decoupled way of running pytest #114

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

clintval
Copy link
Member

No description provided.

Copy link
Member Author

Choose a reason for hiding this comment

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

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@@ -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).
Copy link
Member Author

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.

Copy link
Member Author

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.

Comment on lines -73 to -83
[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
"""
Copy link
Member Author

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:

  1. Python project config
  2. Project config


[tool.mypy]
files = ["prymer", "tests"]
python_version = "3.12"
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

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",
Copy link
Member Author

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"
Copy link
Member Author

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+?

Copy link
Member

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.

Copy link
Member Author

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.

Comment on lines +177 to +195
# 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
Copy link
Member Author

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.

@clintval clintval marked this pull request as ready for review January 17, 2025 21:42
@clintval clintval requested review from nh13 and tfenne as code owners January 17, 2025 21:42
Copy link
Member

@tfenne tfenne left a comment

Choose a reason for hiding this comment

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

Thank you @clintval !

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