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

Show withdrawn codelist codes as withdrawn (v2.03) #175

Merged

Conversation

andylolz
Copy link
Contributor

@andylolz andylolz commented May 9, 2018

This relies on IATI/IATI-Codelists#155.

It adds a “Status” column to the codes tables like this one:
http://iatistandard.org/codelists/Sector/#codes

The values in the cells of the status column are either:

  • blank for active codes, or
  • “Withdrawn” for withdrawn codes.

withdrawal-date and activation-date are not shown.

Refs #142.

Looks like this:
screencast

@andylolz andylolz force-pushed the 142-show-withdrawn-v2.03 branch from 6c77d7c to 632313e Compare May 9, 2018 10:36
@andylolz andylolz changed the title Mark withdrawn codelist codes as withdrawn Mark withdrawn codelist codes as withdrawn (v2.03) May 9, 2018
@andylolz andylolz changed the title Mark withdrawn codelist codes as withdrawn (v2.03) Show withdrawn codelist codes as withdrawn (v2.03) May 9, 2018
@andylolz
Copy link
Contributor Author

andylolz commented Jul 9, 2018

I’ve duplicated this for v2.02 (#186) and v2.01 (#185). I haven’t for v1.05 or v1.04, because the gen.py script for those branches is already a bit inconsistent, and I’m not sure how you want that resolved. E.g. Category and URL columns are always shown for version 1.0x codelist pages.

@markbrough
Copy link

This issue has come up in Myanmar for the following code, which is repeated in the Sector codelist. 15164 has been withdrawn; you can find that in the XML but it is not clear from the reference pages (or from the JSON or CSV). It would be great if this could be fixed as I would imagine this is also causing confusion elsewhere.

grafik

@andylolz
Copy link
Contributor Author

andylolz commented Sep 10, 2018

^^ Tagging @PetyaKangalova and @bill-anderson, because they’re both on the email thread with Valerie from the DAC technical team, who also raised this as an issue and seemed happy with this solution.

@Ocre42
Copy link
Contributor

Ocre42 commented Oct 19, 2018

Requires PR #222 on IATI-Websites:
withdrawnpreview

@amylsilcock
Copy link

@Ocre42 the wording looks good to go

gen.py Outdated
@@ -503,6 +503,9 @@ def codelists_to_docs(lang):
if not fname.endswith('.json'): continue
with open(json_file) as fp:
codelist_json = json.load(fp)
for i, x in enumerate(codelist_json['data']):
if ('status' in x and x['status'] != 'active'):
codelist_json['data'][i]['code'] = codelist_json['data'][i]['code'] + " (withdrawn)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it amends withdrawn codes in order to display them differently. I wonder if would be better to do this in the template.

It would save a loop (since there’s already a loop that happens in the template) and might look neater. Also, I guess changing codelist codes like this could lead to surprise consequences – I don’t know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, seems sensible to do it in the template instead, although I recall @Ocre42 mentioning something being a bit of a nag to deal with in the template (can't recall the full conversation, so deferring to him here). If that wasn't the case, doing it on the template should be the preferred implementation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've followed your suggestion but github is still having some issues updating requests, thanks for the suggestion @andylolz

@samuele-mattiuzzo samuele-mattiuzzo merged commit 493bee6 into IATI:version-2.03 Oct 23, 2018
@andylolz andylolz deleted the 142-show-withdrawn-v2.03 branch October 23, 2018 10:11
@andylolz
Copy link
Contributor Author

Is this due to be deployed?

I notice lots of things have been fixed recently (which is great) but nothing has been deployed. Is that in part because deploying is a faff?

@samuele-mattiuzzo
Copy link
Contributor

Hey @andylolz yes this is all due to be deployed, we're still focussing on SSOT till the TAG, just avoiding atomic deployments in favor of bigger batches of work.
Thursday is normally the day we evaluate if we have enough to deploy and act accordingly, so expect a deployment or at least an update on the status during the upcoming days :)

@andylolz
Copy link
Contributor Author

focussing on SSOT till the TAG

Cool! That’s good to know.

avoiding atomic deployments in favor of bigger batches of work

Fair enough. I guess this is because the process of deploying the reference site is a bit involved?

an update on the status during the upcoming days

Cool! Thanks

@samuele-mattiuzzo
Copy link
Contributor

Fair enough. I guess this is because the process of deploying the reference site is a bit involved?

Ish, plush also trying to be a bit less reactionary and more stable when we perform these sort of operations. Plus, the backup system is all over the place (1kb change results in a full site backup, 10 small deployments might end up eating all of our space and... well, I can let you imagine the rest...) and till all of the Ops and infrastructure side of IATI gets allotted some time and love, it'll stay like that, so we have to be very cautious

@andylolz
Copy link
Contributor Author

andylolz commented Nov 2, 2018

plush also trying to be a bit less reactionary and more stable when we perform these sort of operations.

If deploying were cheap (even just deploying to staging) then I’m not sure why it wouldn’t be done frequently. Currently I do appreciate it very much isn’t cheap – it’s complicated! But staging could be continuously deployed (to github pages or other) from version branches (by travisCI or other). Even feature branches could be auto-deployed, so that BAs could see how their changes will appear. This would create a feedback loop that would help avoid syntax errors on production. See #164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants