• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mtlynch / resticpy / 2565df0f-b8aa-41d7-ab3d-dd8a04b247ec
97%

Build:
DEFAULT BRANCH: master
Ran 08 Mar 2025 02:18PM UTC
Jobs 1
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Mar 2025 02:16PM UTC coverage: 96.471% (+0.04%) from 96.429%
2565df0f-b8aa-41d7-ab3d-dd8a04b247ec

push

circleci

web-flow
Add files_from parameter to backup command (#190)

## Contributing process

- [x] I understand that this is [some guy's personal hobby
project](https://github.com/mtlynch/resticpy#resticpys-scope-and-future)
and reviews are on a best-effort basis
- [x] I've read the [contribution
guidelines](../blob/master/CONTRIBUTING.md)

## What type of PR is this? (check all applicable)

- [x] Refactor
- [x] Feature
- [ ] Bugfix
- [ ] Optimization
- [ ] Documentation Update

## Description

This PR adds an `files_from` parameter to the backup command.
`files_from` takes, as `exclude_files`, a list of files as an argument.
This allows to specify one (or multiple) file that contains a file list.

It will call restic with the `--files-from` option. 

In addition the following changes were necessary: 
- Changing `paths` to an optional argument with default None. This
allows to call backup with include_files, only.
- Ensure that either `paths` or `files_from_files` (or both) are
specified and not None. Raise `ValueError` in case both are None.
- Refactoring command extension with list into helper function.
circlci:build was failing with too many if clauses in function.

## Did you update the [API documentation](../blob/master/docs)?

- [x] Yes
- [ ] This change does not require documentation changes
- [ ] I need help updating documentation

## Have you added or updated tests?

- [x] Yes, I added unit tests
- [ ] Yes, I added [end-to-end tests](../blob/master/e2e/)
- [ ] No, and this is why: _please replace this line with details on why
tests have not been included_
- [ ] I need help writing tests

14 of 14 new or added lines in 1 file covered. (100.0%)

328 of 340 relevant lines covered (96.47%)

0.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2565df0f-b8aa-41d7-ab3d-dd8a04b247ec.1 08 Mar 2025 02:18PM UTC 21
96.47
CircleCI Job
Source Files on build 2565df0f-b8aa-41d7-ab3d-dd8a04b247ec
  • Tree
  • List 21
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #2565DF0F...
  • 610e1ad2 on github
  • Prev Build on master (#E14BB5AA...)
  • Next Build on master (#0BF74709...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc