Skip to content

New add_contents method#564

Open
aerithnetzer wants to merge 4 commits intomaterialsproject:mainfrom
aerithnetzer:main
Open

New add_contents method#564
aerithnetzer wants to merge 4 commits intomaterialsproject:mainfrom
aerithnetzer:main

Conversation

@aerithnetzer
Copy link
Contributor

Summary

New add_contents method of filepad to upload bytes instead of loading from file. It seems to me that the best way to add this feature without breaking changes is to just make a new method. Open to ideas on this one.

Major changes:

  • New method that accepts bytes-like obj for upload to GridFS.

Todos

  • Writing tests for method

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

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.

1 participant