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

Create optional dependency group for build, fix codecov #567

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

jlaundry
Copy link
Contributor

@jlaundry jlaundry commented Oct 5, 2024

Kia ora Sean,

I'm using parsedmarc to parse DMARC RUAs, but not using the built-in CLI. As a result, I get dependabot warning of outdated packages, as msgraph-core, elasticsearch, and elasticsearch-dsl are held back.

This is a breaking change, as people who are used to pip install parsedmarc will need to pip install parsedmarc[cli] instead. I know that's not ideal - I'm keen for your thoughts, and not merging this is a valid option 🙂

This PR:

  • Creates a build optional dependency group, and updates the GitHub CI workflow, so that tests always run with the current package dependencies (the packages in requirements.txt weren't always the same as the pyproject.toml)
  • Creates a cli optional dependency group, so that those like me who don't use the CLI, don't need to install elasticsearch / boto3 / opensearch-py
  • Fixes codecov (which stopped working in April), provided that the CODECOV_TOKEN Actions secret is set

Future work:

  • Update the msgraph-core package - I was thinking of going for this next, but need to get a test environment running first
  • Create a mail optional group (msgraph-core, imapclient, google-*) - that's not as easy, and would require a refactor of how MailboxConnection is imported

@seanthegeek
Copy link
Contributor

I would consider this change for a younger project, but I generally don't like breaking changes at this stage where the code is mature and so frequently downloaded.

The optional build group and codecov changes sound great though.

@jlaundry jlaundry changed the title Create optional dependency groups for build and cli Create optional dependency group for build, fix codecov Oct 6, 2024
@jlaundry
Copy link
Contributor Author

jlaundry commented Oct 6, 2024

Fair enough, I thought that might be the case - it's a bit unfortunate that optional-dependencies doesn't have a "default" option. Updated now.

Copy link

codecov bot commented Oct 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.63%. Comparing base (d6128ea) to head (b33abae).
Report is 63 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #567      +/-   ##
==========================================
+ Coverage   59.88%   60.63%   +0.74%     
==========================================
  Files          12       10       -2     
  Lines        1578     1679     +101     
==========================================
+ Hits          945     1018      +73     
- Misses        633      661      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seanthegeek seanthegeek merged commit 8444053 into domainaware:master Oct 7, 2024
7 checks passed
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.

2 participants