artefactual / automation-tools

Tools to aid automation of Archivematica and AtoM.
GNU Affero General Public License v3.0
46 stars 33 forks source link

add feature file for duplicate detection #103

Closed peterVG closed 5 years ago

peterVG commented 5 years ago

first draft

peterVG commented 5 years ago

Thanks Ross. I committed these updates to my patch branch for your review and PR to your dev/issue-448-add-duplicate-reporting-mechanism if you agree.

ross-spencer commented 5 years ago

Looks great @peterVG - last thing is structure of the repository, can I propose:

├── duplicates
│   ├── appconfig.py
│   ├── config.json
│   ├── duplicates.py
│   ├── features    <--- New structure
│   │   ├── duplicates.feature    <--- Your feature file
│   │   └── steps    <--- We can add this folder another time
│   │       └── duplicates.steps
│   ├── __init__.py
│   ├── loggingconfig.py
│   ├── parsemets.py
│   ├── README.md
│   ├── requirements
│   │   ├── base.txt
│   │   ├── local.txt
│   │   └── production.txt
│   ├── requirements.txt
│   └── serialize_to_csv.py
├── __init__.py
└── README.md

Ref: https://behave.readthedocs.io/en/latest/gherkin.html#feature-testing-layout

I'm proposing this structure opposed to the tests layout, because in Archivematica our Unit Tests are normally under tests, and I think keeping these separated makes it clean and easy to understand what we're doing.

CC. @replaceafill this could be our first feature that uses Behave outside of AMAUAT - do you think this seems sensible as a layout for a standalone feature?

replaceafill commented 5 years ago

@ross-spencer Nice! And yes, it makes sense to me. I'd just rename duplicates.steps to duplicates_steps.py if that's a Python module.

ross-spencer commented 5 years ago

Closing in favor of https://github.com/artefactual/automation-tools/pull/118 the feature file work has been rebased and cherry-picked into there.