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

needs.json not deleting #68

Closed
hagopboz opened this issue Sep 6, 2018 · 2 comments
Closed

needs.json not deleting #68

hagopboz opened this issue Sep 6, 2018 · 2 comments
Assignees
Labels

Comments

@hagopboz
Copy link

hagopboz commented Sep 6, 2018

I noticed that when you already have a needs.json with all the needs, then you remove a need and re-run the needs builder it doesn't remove the need for the json and it doesn't update the number of total needs.

If you remove the json and run needs build again it will generate the list without the removed ones, but shouldn't the list be updated with removed needs as well?

@danwos
Copy link
Member

danwos commented Sep 7, 2018

You are right, the removed need should disappear from the json list.

I think we need to wipe out the complete need-list for the current doc-version from the json and create it from scratch.
So somewhere in builder.py we need to have something like this:

needs_list.load_json()

# Delete complete need-list to ensure that removed needs from rst-files are 
# no longer part of the needs.json export.
needs_list.wipe_version(version) 

for key, need in needs.items():
   needs_list.add_need(version, need)

@danwos danwos added the bug label Sep 7, 2018
@danwos danwos self-assigned this Sep 7, 2018
danwos added a commit that referenced this issue Sep 28, 2018
@danwos
Copy link
Member

danwos commented Sep 28, 2018

Fixed with new release 0.3.0

@danwos danwos closed this as completed Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants