-
Notifications
You must be signed in to change notification settings - Fork 3
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
Declaring the consolidated PPP extension #142
Comments
It seems reasonable to build a single extension as part of the build process. This may simply involve changing/copying the file paths (and anything that refers to the current paths) of the built The |
Agreed this should be fairly straightforward, and happy to have a look at it this week. |
The codelist CSVs in compiledCodelists are patched version of the base codelists, but for the consolidated ppp extension, we need to collect together the codelists from each extension which makes up the PPP profile (i.e. not the patched codelists, just the extensions) The extension codelists are currently written to docs/codelists by
To try and avoid confusing the terminology, I've used 'consolidatedExtension' rather than profile, so that there is a distinction between ppp extension in this repo, all the extensions which make up the profile (the consolidated extension) and the profile itself (the extended schema, codelists and docs) Note: the build will fail on the consolidated-extension branch unless you update your local requirements file to pull in the profile-consolidated-extension branch of the documentation-support repo. To do:
|
I've been reviewing this (and it's taken a while to unpick where things are happening in all the refactored scripts: @jpmckinney I wonder if we wouldn't be better recognising that profiles are still an evolving idea, and we don't want to over-optimise at this stage for maintenance whilst we're still learning how they will evolve?) With apologies for adding issues late in the day, and hopeful most should be fairly easy to resolve:
On (1) my proposal would be to have a separate ocds_ppp_profile_specific_extension with a README that basically says 'don't use this - use the profile!' and then to make the extension.json and release-schema.json in the root of this repo into the consolidated extension, with the README explaining this is a frozen snapshot of a set of other extensions. I.e. you can use them independently if you want, but to do OCDS for PPPs, this is the extension you should declare and use. In terms then of the location of the consolidated extension, it would be in this repo, and we wouldn't point to it anywhere else for now. (There is one other issue to work out there re: translation of extensions schema... but let's leave that for the moment). |
@duncandewhurst If you get chance to give thoughts on the above, we can try and perhaps chat later in the week to work out full plan? |
To respond to my mention: In terms of the refactor, there is only one new dependency ( The only other big change was to move to Make commands instead of one long script (see open-contracting/standard#666). The Make commands are described in the handbook. Rather than read the Make files, I highly recommend simply running Make commands with |
@timgdavies I'm in favour of separating out the ppp extension and ppp profile into separate repositories as I think having one repo being two extensions is confusing. Regarding versioning, I might be missing out on a nuance here, but I think the controls are:
Regarding codelists, I think So, yes, let's talk it through. |
I forgot about the Currently most extensions are pointing at the master branch, so we may want to create a release and pin to it once the current round of updates to the PPP extension are complete (and now that there are a few different publishers working on implementations) |
@jpmckinney I'm trying to check that declaring the consolidated extension works in the validator, but the build for the consolidated-extension branch is failing, I think due to a test:
I ran the tests locally against the public-private-partnerships repo and |
Ah, yeah, the error message for that test is not helpful, and the more verbose error message is getting mixed with a lot of informative warning messages. I'll update the scripts to prefix "ERROR:" to error messages. Anyhow, the error message is:
This is because, in an extension, the tests first discover which codelists are in the repository, and then check whether the schema actually makes use of all of them. This caught some real errors in the past. Anyhow, in OCDS for PPPs, the logic (for now anyway) needs to be a bit different, as the release-schema for the PPP extension and PPP profile are in the same repo. Once we move the PPP extension out of the PPP profile, we may be able to restore such logic. Once I merge open-contracting/standard-maintenance-scripts#102 you can re-run the build on Travis, and tests should pass. |
@jpmckinney thanks for that, it's still failing on a different test though:
These codes are added to I tried moving the changes to the enum into the qualification extension repository, which stops that test failing, but then the qualification extension build fails with:
Presumably because the tests don't allow additions to a closed codelist (noting that this is probably another reason the extension is described as incompatible with OCDS 1.X in it's description). I also tried the other way round (moving
Any ideas on a solution? I've closed the PR on the qualification extension because I think it might make more sense to keep changes which a normal extension wouldn't be permitted to make in one place (the ppp extension) |
Noting that with json_merge_patch it seems you can't patch an enum and instead need to replace the whole list |
The broad issue is that the tests don't anticipate a consolidated extension. I think it may be easiest to setup the PPPs extension and PPPs profile in the way that we think is correct, and then I can update the tests to work with the new arrangement. In the meantime, if it helps, you can comment out lines in .travis.yml. We can still run the tests manually during development. I forget if it's stated anywhere, but if I remember correctly, extensions shouldn't modify closed codelists. I don't think the test scripts fully cover this, as the qualifications extension passes the tests, while still having +releaseTag.csv. I created open-contracting/standard-maintenance-scripts#103 to follow up on that. In sum, we'll probably need to make a special case in the tests to allow OCDS for PPPs to modify the closed codelist. |
#148 is ready to review and merge (open-contracting-extensions/ocds_qualification_extension#23 and open-contracting-archive/documentation-support#10 should also be merged) |
Are we still planning on moving the root If we make that change, I can propose some changes to the layout of this repo that I think will improve the new consolidated extension pattern, for both this profile and future profiles. I can also more easily restore common tests. |
Yes we are, but we can do that at a later stage, since it won't affect how users declare the profile now that we have created the consolidated extension. Since deploying the consolidated extension is blocking providing feedback to a couple of publishers, that's the immediate priority and we can work one splitting out the repository afterwards |
I'm thinking that if we move the extension, then we can simply have the 'consolidated extension' in the root of the profile – the same as how an extension is in the root of its repo. However, moving the consolidated extension would change how it's declared. It doesn't seem like it would add too much time to split it out - would it? We can schedule a call to better understand the level of urgency for providing feedback. |
The consolidated extension is copied to the Regarding splitting out the extension, it shouldn't be too much work, but if we keep this repository as the profile/consolidated extension it will involve:
|
@jpmckinney pointed out that: is quite a long URL and we should aim to have something similar to the schema URLs used in the core standard, e.g
Since the PPP profile doesn't yet have a version number yet we can't construct exactly that type of URL, however in the core standard the schema files also reside at http://standard.open-contracting.org/latest/en/release-schema.json (this is the URL at which the schema is referenced from the docs and the location from which it is copied to So, for consistency we should make the consolidated extension available at:
I've staged updates to the docs and sample data on the
@Bjwebb and @timgdavies if you're able to work on this and get it deployed today that would be great. |
Sounds good, @duncandewhurst, and thanks for summarizing our call. I agree with this process. |
Thsi copies files there to the root directory of the docs.
Done in 3422070, we now have http://standard.open-contracting.org/profiles/ppp/update-extension-URL/en/extension.json which will become http://standard.open-contracting.org/profiles/ppp/latest/en/extension.json when this goes live. This is done via adding a line to the Sphinx conf.py, which I think is the easiest way for now. We'll need something different to handle translation of the schema, but I'm assuming this isn't a blocker for this going live, as we don't have this currently. |
I'm just working through steps here. I've hit one issue with extension.json missing I wasn't sure it this was generated by apply-extension.py or not (my understanding is not?) - but in testing re-running apply-extension.json I was getting major diffs against the master branch, which was unexpected. I thought this might be down to not all places in the apply-extension.py script using orderedDict, but even using a commit that handles for that, I get major diffs. The other possible explanation I can see for this is the order in which extensions are applied? As I understand we are now deferring to the extension registry for this - instead of a list within the profile. We seem to have really broken the principle of reproducible builds and profiles with all the abstraction and refactoring that has taken, and I think will have some work to discuss and hopefully untangle this. |
Ok. I've merged the changes I need. Over to @Bjwebb for the final deploy. |
@duncandewhurst I'm working on a fix, which will be available shortly. This issue can be swiftly corrected locally by using an OrderedDict when specifying the extensions to merge in conf.py, which had recently changed from a list to a dict. In general, the best way to ensure no hiccups is to slow things down. Duncan and I had a good relationship working through some of the challenges and uncertainties around profiles, so I was happy to proceed in a fashion that would achieve a quicker result, with the risk that things break for short periods of time. I am happy with the process thus far. As I’ve tried to point out before, the apply_extensions method is complex, but it is just as complex as it was before it was moved to documentation-support (in fact, it’s a little better documented than it was). There is no significant new abstraction or complexity. I would be eager to work out kinks in the process with Duncan, who has been deep in this work and who I believe will have fruitful observations and experiences to share. I trust that we can work out any issues. |
See #155 for a fix. I also noticed that I couldn't reproduce and hadn't encountered this issue, because I use Python 3.6, where dicts are insertion ordered. (In Python 3.7, to be released soon, insertion order will become a language feature, not only an implementation detail.) |
Also, to clarify, profiles don't defer any logic to the extension registry. Previously, profiles would defer the choice of version of each extension to the registry. This is no longer the case. |
This is deployed live now http://standard.open-contracting.org/profiles/ppp/latest/en/ |
🎉 |
@duncandewhurst What updates did you anticipate to the standard development handbook (in your checklist)? You can create an issue there if appropriate. Also, is the checklist item about the spreadsheet template logged as an issue in the CRM (or elsewhere)? Just want to be sure we don't forget it. |
To reflect changes in open-contracting-extensions/public-private-partnerships#142
@jpmckinney I've made the handbook updates in open-contracting/standard-development-handbook#178 and updated the spreadsheet template (simply changing the extensions key in the meta tab) |
The technical guidance section of the docs includes the following statement;
There is a consolidated extension but I don't think there is currently a way of declaring it.
Instead the example data declares all the constituent extensions.
That approach is messy and also makes it harder for publishers to pin to a specific version of the PPP profile.
Is there a way we can adapt the build process for the profile so we end up with an
extension.json
for the consolidated extension built somewhere?(I think that would also involve pulling together the codelists from all the constituent extensions into one folder.)
Thoughts @jpmckinney @timgdavies @kindly ?
The text was updated successfully, but these errors were encountered: