Skip to content

Commit

Permalink
Fix for artifact creation
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed May 22, 2024
1 parent b61e595 commit 7ca39be
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

קישורים:
- [קובץ הטקסונומיה הנוכחי](taxonomy.yaml) בפורמט YAML
- [לפירוט של הטקסונומיות בשפה העברית](TAXONOMIES.md).
- [כיצד משנים את הטקסונומיה?](CONTRIBUTE.md).
- [לפירוט של הטקסונומיות בשפה העברית](TAXONOMIES.md)
- [כיצד משנים את הטקסונומיה?](CONTRIBUTE.md)

הפרויקט מבוסס בצורה משמעותית על עבודה שנעשתה בפרויקט Open Eligibility של Aunt Bertha - מצ״ב תיאור הפרויקט המקורי:
</div>
Expand Down
44 changes: 22 additions & 22 deletions tools/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,28 +125,28 @@ def write_pks(slug_to_pk, renames):
assert new_version == current_version, f'Version should be {new_version} but is {current_version}'
if new_version == latest_version:
print('No changes detected. Exiting.')
exit(0)

new_version_dir = VERSIONS_DIR / new_version
new_version_dir.mkdir(exist_ok=True)

report = []
for pk in sorted(added):
report.append(('added', pk, current_taxonomy[pk][0], current_taxonomy[pk][1], current_taxonomy[pk][2]))
for pk in sorted(removed):
report.append(('removed', pk))
for pk in sorted(changed):
report.append(('changed', pk, current_taxonomy[pk][0], current_taxonomy[pk][1], current_taxonomy[pk][2]))

out = io.StringIO()
writer = csv.writer(out)
writer.writerows(report)
print(out.getvalue())

(new_version_dir / CHANGELOG_FILENAME).write_text(out.getvalue())
with (new_version_dir / TAXONOMY_FILENAME).open('w') as f:
yaml.dump(current_taxonomy_orig, f, sort_keys=False, width=240, allow_unicode=True)
else:
new_version_dir = VERSIONS_DIR / new_version
new_version_dir.mkdir(exist_ok=True)

report = []
for pk in sorted(added):
report.append(('added', pk, current_taxonomy[pk][0], current_taxonomy[pk][1], current_taxonomy[pk][2]))
for pk in sorted(removed):
report.append(('removed', pk))
for pk in sorted(changed):
report.append(('changed', pk, current_taxonomy[pk][0], current_taxonomy[pk][1], current_taxonomy[pk][2]))

out = io.StringIO()
writer = csv.writer(out)
writer.writerows(report)
print(out.getvalue())

(new_version_dir / CHANGELOG_FILENAME).write_text(out.getvalue())
with (new_version_dir / TAXONOMY_FILENAME).open('w') as f:
yaml.dump(current_taxonomy_orig, f, sort_keys=False, width=240, allow_unicode=True)
(VERSIONS_DIR/ RENAMES_FILENAME).write_text('\n'.join(keep) + '\n')

with (ROOT / TAXONOMY_FILENAME).open('w') as f:
yaml.dump(current_taxonomy_orig, f, sort_keys=False, width=240, allow_unicode=True)
(VERSIONS_DIR/ RENAMES_FILENAME).write_text('\n'.join(keep) + '\n')
write_pks(slug_to_pk, renames)
2 changes: 1 addition & 1 deletion versions/renames.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Fill here any new renames you want to do-> in the format slug->new_slug
# Fill here any new renames you want to do, in the format slug->new_slug

0 comments on commit 7ca39be

Please sign in to comment.