Code Monkey home page Code Monkey logo

ewp-specs-api-courses's Introduction

Working with EWP Technical Documentation

This document is our proposal on how to work with the technical documentation within the EWP project (where to store it, how to submit change proposals, etc.).

The Structure of EWP Repositories

How documentation is to be divided?

  • Separate sections of the documentation SHOULD be stored in separate Git repositories.

  • The index of all documents (along with their current statuses) SHOULD be kept at this URL. It SHOULD be frequently updated.

Some of these repositories will probably not change much after their first release, while some others (like the APIs) will probably keep mutating perhaps even after the project is finished (though, in a backward-compatible way).

Why separate API repositories?

We chose to split EWP requirements into a couple of separate APIs, and host them in separate GitHub repositories:

  • We believe that partners (this includes all the future partners) should have the option to implement just a subset of all the features we have documented. This will make it easier for them to start off, claim that they have parts of EWP properly implemented, and then implement other parts later (possibly much later, with other teams of developers).

  • Having each API in separate repository has some great advantages, when it comes to versioning:

    • If a partner does not implement API X, then he also knows that he may ignore all the changes in API X's repository.

    • If a partner has already implemented API Y and wants to upgrade his implementation to include some new changes in new API release, he may simply review a diff (and/or release notes) in the Git repository between specific tags.

    • It allows us to use semantic versioning separately for each API. This allows the partners to easily spot backward-incompatible changes which may break their implementations.

  • It allows the project leaders to choose and manage separate teams for working with separate APIs.

Why GitHub?

We chose to use Git and GitHub as the primary tool for working and hosting documentation for developers:

  • Many developers are familiar with Git. Many developers are also familiar with GitHub. We will require developers to review and accept documentation often throughout the project. We believe that these tools will help them with this task.

  • Git allows us to easily keep track of all the changes. Having the option to produce a set of changes between particular versions of the documentation (e.g. "what has changed between versions 1.0.0 and 1.2.7?") is a very important feature, and it can be easily achieved with Git.

  • GitHub features include an integrated code review tools, issue trackers, change notifications, automated build tools - and many other features. We are aware that most of our repositories will be hosting documentation only, but we do find all these tools useful even in documentation-only projects.

Issue tracker

GitHub offers built-in issue tracking which should be entirely sufficient for purposes of developing the software and its documentation.

Every GitHub project may have its own separate issue tracker, and we have chosen to stick to this design decision. In other words, we will use multiple issue trackers. When you're reading documentation on GitHub and you find a bug, simply scroll to the top of the page, and click the Issues tab.

Pros:

  • We keep project's issues along with the project's code.
  • The Issues tab is always around.

Cons:

  • Issue numbers will not be unique within the entire EWP Project. When cross-referencing issues between sub-projects, absolute issue URLs will need to be used.

Rules for API Design and Versioning

Semantic Versioning

We will use Semantic Versioning for releases of EWP technical documentation. It has enormous advantages, when it comes to working (and reworking) API design:

  • We will assign documents their version numbers only after they are officially approved.

  • Semantic versioning scheme allows developers to easily determine when a breaking change occurs in a particular API.

  • It follows a set of quite explicit rules. Please get familiar with them (especially if you plan to design parts of the APIs).

  • Having a single, official latest version of the document, combined with the requirement of preparing an explicit and strict API specifications, allows us to easily answer the question: if something breaks then what should be fixed - the client or the server?

We "favor" server implementers

When designing APIs to be implemented by multiple partners, we believe it is generally profitable to slightly favor making the job easier for server implementers, rather than making it easier for the client implementers.

If our APIs are simple to implement for the servers, then it maximizes the chances that all such API implementations are 100% compatible with the specifications (and with each other).

It's true, that this often means more work for the clients. If you are implementing a client, you might keep asking yourself questions like Why do I need to make two requests instead of one here?, or Why we don't have any sophisticated search filters to use in this API?, etc. However, the important thing to appreciate here is that you can reasonably expect all different partner servers to work in the same way, because these specifications are made simpler for them.

Backward-compatibility

  • As required by the rules of semantic versioning, all breaking changes (aka backward-incompatible changes) SHOULD force the major API version number to be increased (e.g. 1.3.7 should become 2.0.0).

  • API designers MUST take care of backward-compatibility rules, to facilitate predictable workflow for all implementers.

  • Once a document is released, backward-incompatible changes SHOULD be avoided. Once first implementations are deployed on production servers, backward-incompatible changes MUST NOT occur, unless they cannot be avoided.

  • All non-trivial changes (especially the backward-incompatible ones) must go through the proposal acceptance process, as described in the Rules for Submitting API Change Proposals section.

Git branches (and XML namespaces)

  • All released specifications MUST be merged to a stable-v<N> branch, where N is the major version number of the specification (ideally, N will stay equal to 1 for the majority of all specifications).

  • XML namespaces used throughout the project SHOULD "self-describe" themselves. Namespace values SHOULD be valid GitHub URLs, pointing to stable-* GitHub branches. Every XML document SHOULD conform to the specification described in the stable-* branch given in its XML namespace.

  • Major changes in API versions SHOULD lead to a new stable-* (e.g. stable-v2) branch being created. If there is any XML namespace associated with API, then this also means that a new XML namespace will be created (and newer versions of XML documents will be required to use this namespace).

  • Unreleased (draft) APIs also SHOULD use valid GitHub URLs for theirs XML namespaces. They MAY use URLs referring to the master branch, but they also MAY use URLs referring to the - not yet existing - stable-v1 branch (for forward-compatibility). This DOES NOT mean that you can have draft changes in stable-v1 branch - it only means that you can use stable-v1 XML namespace in your master branch.

Changelogs (aka Release Notes)

  • Once a document is released, every subsequent release of such document MUST be accompanied by a changelog. All changes SHOULD be noted in this changelog (and backward-incompatible changes should be additionally highlighted).

Please note, that this requirement is for released documents only, and it does not imply the need of having a detailed changelog made for every change proposal (although many change proposals MAY be accompanied by such change logs).

Preferred Data Formats

We have decided to use XML as our primary data exchange format.

"Primary" not necessarilly means "the only one". It is still possible for some APIs to use other data formats (especially if the format is a well-established one, for exchanging some particular type of data). However, XML-based formats will be preferred.

Preferred Documentation Format

We have decided to use Markdown for text documentation, and XML Schema for describing data formats in detail.

  • Markdown - because it is very easy to understand even when displayed raw. This makes it a very good language to be reviewed in Git diffs.

  • XML Schema - because it is a well-established documentation format for XML, and makes it easier for developers to confirm that their documents meet the requirements. Schema validators are already built into many programming languages.

Preferred Documentation Style

We require all API specifications to be explicit and strict - with lots of "MUSTs" and "MUST NOTs" (as defined in RFC 2119) and detailed explanations for all the enumerations used). If any part of the specifications turns out to be vague, then a new version of such specification SHOULD be released, fixing the vague part.

Use permalinks!

Whenever you post a link to a specific version of a document somewhere, you SHOULD use a Git tag name (or a commit ID) in the posted URL. You should avoid posting links to the master branch (which can mutate, even to the point of having the link broken).

Hint: Try pressing y key on GitHub site to get a permalink (other useful keyboard shortcuts).

Document statuses

Before you read any EWP document on GitHub, make sure you know the status of this document. An index of official documents and drafts is kept here. You can also attempt determine the status yourself based the document's location and context.

Common document statuses include (but are not limited to):

  • RELEASED - All partners have approved the document and it has been assigned a version number (e.g. 1.0.0) in one of the official project repositories.

    • If there is no newer release of this document (no version with a greater tag name) then it is a Latest release.

    • If there exists a newer release of this document, then its status is OUTDATED. The latest release MAY be backward-incompatible with this document.

    • It is also possible for a document to be at its latest release, but the entire API (described by this document) has been DEPRECATED, and probably replaced by some other API. Such documents MUST explain (inside their contents) why they are deprecated, and which other APIs replace them. (Note, that this definition does not prohibit to undeprecate a document.)

  • CHANGE PROPOSAL - A document is a copy of another document with a set of changes applied. The partners are asked to comment on the changed parts of the document (e.g. when compared to the latest release).

    Change proposals may appear outside of the official repositories (i.e. in forks). They are often accompanied by open pull requests for merging them to official stable-* branches.

  • DRAFT - designers are still working on this document. It has not been approved, but everyone may comment on it. After being reviewed and accepted, drafts become releases.

"Official repositories" are the ones owned by the erasmus-without-paper GitHub organization.

Rules for Accepting API Change Proposals

How to propose a change to a document?

  • Option 1. Start a new thread in the issue tracker associated with this document (search for the Issues tab on the top of the GitHub page).

    The authors and maintainers of the APIs SHOULD subscribe for GitHub's issue notifications, and should be notified when you submit a new issue to their tracker.

  • Option 2. You MAY also fork the repository, change what you want changed, and send a pull request.

    If your pull request is complicated, consider creating a separate issue page for tracking it. Pull requests are NOT the proper place for longer discussions - such discussions SHOULD be conducted within the issue tracker.

How to get my draft (or change proposal) released?

These rules apply to developers with write-permissions to official EWP repositories. Developers MUST follow these rules whenever they want to release a new version of a document.

  • All change proposals SHOULD be accompanied by a pull request. Partners MUST be able to review a diff of all changes, and be allowed to comment on this diff somewhere.

    • This is also true when releasing drafts - e.g. if the draft is present in the master branch, then you should issue yourself a pull request to the stable-* branch.
  • Only trivial changes of already implemented APIs may be released without previously asking for the review of the other partners.

  • You CANNOT assume that all partners are watching all GitHub issues and/or pull requests. Whenever you mean to contact the partners, you MUST do so directly.

  • Whenever you contact the partners and ask for their review, you MAY give them a deadline for such review. After such deadline is reached, it MAY be assumed that all the partners who did not respond gave you their approval.

    • Deadlines should vary on the nature of the change. E.g. A one-week deadline might be enough for non-breaking changes, but breaking changes to already released documents may need a longer deadline.

    • If there is a strong reason to suspect that some partners may not like the change (e.g. you know the implementation has already started), you SHOULD attempt to contact them directly and get their explicit approval.

ewp-specs-api-courses's People

Contributors

mkurzydlowski avatar wrygiel avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ewp-specs-api-courses's Issues

Should we keep `<resultDistribution>`?

@erasmus-without-paper/all-members

Please take a look at the <resultDistribution> element proposed in the v0.1.0 version of the Courses API:

Do you think it would be of any use to you? Would you provide it? Do you think projects like EGRACONS might want to consume it?

In Poland, we do not provide this kind of data. During my work on EMREX and EWP, I was led to understand that some other countries treat student's grades very differently, but I'm far from understanding the policy exactly. Hence this issue.

Should we keep this element or not?

Free-form description in LOS element

LOS now contains a free-form description field (with language), but I have removed it from the model because I thought such fields should be replaced by PDF links for security reasons?

Introduce a grading scheme label

Moved from here.

@wrygiel:

What is the relationship between you propose, and the existing specifies/learningOpportunityInstance/credit/scheme element from the ELMO/EMREX?

@kaiqu:

LOS has a Grading Scheme, which corresponds more or less to the "category" element in ELMO/EMREX (a named collection of labels and associated counts).

Oh, so it is supposed to be a complex structure? What do you mean by "counts"? The "count" element in EMREX is bound to the number of students with particular grade, but don't have any student relationship here.

Should we allow multiple academic terms in LOIs?

Currently we allow LOI to refer to a single academic term only, even if it spans multiple academic terms ("Degree Programme" LOIs usually do). We also advise to include this reference for "Course" LOI types only.

This strategy was taken from EMREX ELMO, but - if I remember correctly - this decision has been disputed by EMREX team as well (and in future version of ELMO this may be changed).

I can see a couple of solutions:

  1. We wait and see how EMREX deals with it. After they release future version of EMREX ELMO, we adjust our Courses API in similar fashion. Note, that they probably cannot simply change the maxOccurs on the existing element as this would break backward-compatibility, they might deprecate the element and add a new one though.

  2. We simply allow maxOccurs="unbounded" in Courses API. Our response won't look exactly as EMREX ELMO, but it's doesn't anyway (we intend for our Courses API to be similar to EMREX ELMO format, but we never intended for both to be exactly the same).

I think I would go with option 2. @erasmus-without-paper/all-members

Practical mapping use case: Ghent University

@NicoVanMoortel sent me these questions, and I asked him for permission to forward it here, so that others may possibly learn from experience. I am quoting from his email below.

The biggest question is how to transform the UGent course catalog into the EWP structure when a request is received?

Below a simplified example, but it gives a nice view on how the course catalog is structured in our system (Oasis). Some information to help explain the structure

  • The highest level is the faculty. Each faculty administers several degree programs (in the example: “Exchange Programme in Law”)
  • Below the degree program a program is defined which is valid for a certain period (in the example there are two programs, each valid during a certain period)
  • A program is made up of modules, courses and course sessions.
    • A module has child modules and/or courses
    • A module can be placed in several programs. A module can be placed several times in the same program (in the example all modules are unique)
    • A course can be placed several times in the same program but also in other programs. (in the example Course 001 and 002)
    • A course session is valid for a certain period and linked to a unique course (in the example course 001 and 003 each have 2 unique course sessions)
  • In Oasis a degree program, program, module, course and course instance all have a unique UUID

image

Questions

  • What would be best practice? We could flatten the structure and send all unique course/course instances. Or is it better to maintain the structure?
  • If we maintain the structure which LOS/LOI should we create:
    • Can our degree program – program be seen as a LOS – LOI? (In the xsd it is mentioned that ‘academic term’ should not be used for degree program…)
    • Do we define the faculty as a course type? Or would it be useful to be able to link a degree program to an organizational unit?
    • Do you agree that for our purposes a module only is a LOS? (and no LOI)
    • Do we send all LOS-id’s through the course application API or only the top level LOS-ID’s?
  • For which academic terms do we send the catalog? In the documentation I find that also the programs of the past should be interfaced. For us that is starting 2004

Make Courses API stable

When would be a good time to release versions 1.0.0 of Courses API and Simple Course Replication API?

Judging from the dev catalogue, many partners have already implemented it. However, I'm also afraid, that none of these implementations have been cross-tested yet.

@erasmus-without-paper/all-members

Subject Area vs. ISCED code

Both subjectArea and iscedCode are included in the schema, where the former is documented as the "Erasmus code". I have understood Subject Area to be a general term where ISCED and Erasmus code are special cases, and that we have standardized on ISCED - is this not the case?

Introduce `snapshot_at_date` parameter

During the meeting in Warsaw some partners pointed out, that some important attributes of courses may change in time. Since designing and developing a mature Course Catalogue is not part of the EWP project, a simple solution was proposed to amend the problem - an extra date parameter.

It was stated that we will NOT require implementers to support this parameter (because we are not aware of the complexities of the Course Catalogue model used in different systems). In order to let the clients know wether the server supports this parameter, a new <snapshot-support> element will be added to the Courses API's manifest entry.

Confusion about LOS ID

The README.md states:

the type of each LOS MUST be included in its ID, in a clearly specified way (see XSD for details) [ ... ] Same is true for loi_id

But the XSD does not contain any such example (at least it doesn't hit my eye) and makes no mention of such a requirement whatsoever.

So my question: do los-id and loi-id need to contain their type or not? If so: how would something like that look like?

Ability to link a LOS to an ounit

@erasmus-without-paper/all-members

In issue #10 @NicoVanMoortel proposed to add a feature to link a degree program to an organizational unit.

We should think it through. Would this attribute have relevance in other types of LOSes besides "Degree Programme"? How should we document it? Would more partners fill it out?

In myself think it's a useful addition. I think Poland would be able to fill it out for both Degree Programmes and for Courses (in the latter case, this would be the "organizing faculty" of this course).

Multiple URLs for courses

Shouldn't the url parameter be of type ewp:HTTPWithOptionalLang just like with institutions? In our case, a course can indeed have more than one URL, depending on the chosen language.

Comments on response.xsd

  • Element "title" should be repeated by the "lang" attribute
  • Element "credits" should be repeated by the "scheme" attribute
  • Element "subject-area" should be named "subject-area-code" to conform to the model and to differentiate from the entity
  • Element "description" should be repeated by the "lang" attribute
  • Element "id" (presumably = LOS Code) must be mandatory
  • Organization Unit reference (Org Unit Id) is missing (LOS can be registered at a Department)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.