open-contracting / ocdskit

A suite of command-line tools for working with OCDS data
https://ocdskit.readthedocs.io
BSD 3-Clause "New" or "Revised" License
17 stars 7 forks source link

Split project packages #159

Closed duncandewhurst closed 3 years ago

duncandewhurst commented 3 years ago

Closes #155

duncandewhurst commented 3 years ago

@jpmckinney how do I run the tests locally?

I'm not sure why the test is failing as tests/fixtures/oc4ids/project_package_split.json is the same as the first file generated by cat tests/fixtures/oc4ids/project_package.json | ocdskit split-project-packages 1 | split -l 1 -a 4

jpmckinney commented 3 years ago

To run the tests:

pip install .[test]
pytest
jpmckinney commented 3 years ago

The expected output needs to include the full output. I generated the file with:

cat tests/fixtures/oc4ids/project_package.json | ocdskit split-project-packages 1 > tests/fixtures/oc4ids/project_package_split.json
coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.02%) to 96.679% when pulling 47cb5c41a7d99e9ebd8b18ff8931b9427dad4c0d on split-project-packages into d57501dbd90fa38217124620c4cb78b4608094b4 on master.

jpmckinney commented 3 years ago

I added a note here about how to test packages: https://ocp-software-handbook.readthedocs.io/en/latest/python/packages.html#automated-testing

Also linked from https://ocp-software-handbook.readthedocs.io/en/latest/python/quality.html

jpmckinney commented 3 years ago

If you add a packages key to project_package.json, we can increase test coverage.

jpmckinney commented 3 years ago

If you add a packages key to project_package.json, we can increase test coverage.

Nevermind – I can just delete that code, since project packages don't have a packages field.