-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Planning Issue: Expand, Coordinate, and Test API #1449
Comments
@jywarren, I'm already working on the Phase 1 part, and should be submitting that soon. Fortunately, the work that @ujithaperera and I did last year already laid the foundation. Once that part is finished, I'll be able to move fairly quickly through the next 2 phases. My overall goal is to work with @StlMaris123 in particular on the email subsystem, while keeping an eye on the rest of the work from this year and last year to apply for Phase 4. Comments and criticism are always welcome. |
hi @david-days , thank you very much for re organizing to make this RESTful services to bring valuable end. I really appreciate it. give me some time to catch up the things you are planing ahead. I am still finding a place to begin my contribution. Thank you. |
Hey guys I am in for help too! Since the Bot Project would need the API I would really want to be a part of this. I will look in how the API is set up and Swagger documentation. |
This is so great. The only request I'd make is that we attempt to work as
much as possible in small PRs which we merge to master in discrete, tested
chunks. Each PR should be small enough that reviewers can read through it,
understand the single function or improvement it adds, and see how the
tests confirm this. That'll enable us to closely track the master branch.
David, do you think that's feasible?
…On Tue, Jun 6, 2017 at 2:04 PM, Ananyo Maiti ***@***.***> wrote:
Hey guys I am in for help too! Since the Bot Project would need the API I
would really want to be a part of this. I will look in how the API is set
up and Swagger documentation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1449 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ6UUkP-yozH015BRu5b1iLwRXzF3ks5sBZSqgaJpZM4NvKA1>
.
|
I think it's feasible and desirable. I've got a plan (subject to better ideas, changes, or just "huh...never thought of that") that I can talk through. I already have a PR (Pull Request #1450 ) for adding the Swagger front end. It already shows the documentation from the work that Ujitha and I did last year. This would go a long way towards getting everyone on the same page. For some reason, it's failing Travis CI on the DB setup--i didn't change anything there, but I did a rebase/upstream-merge and might have screwed that up somehow. |
Great, i left some comments over there and look forward to this! |
Also be aware that Jasmine cannot test the Rails responses, the way it's set up (and the convention) is that we decide what the API boundary between the front and backends are, and we use static or mocked responses to test each of the two, rather than testing both in an integrated way. This makes sense because it holds both front and backend to the strict promised API by testing each against a static version. It also ensures 2 things aren't changing at the same time and we're missing something between. |
Hi, David! After #1450, I'd like to propose starting with unit tests for
Not every sub-method, but the public ones, like:
Since these make use of the other methods (like Later, we can set up functional tests for:
How does that sound? Once unit tests are in place for |
Awesome -- as much as possible, let's do this in separate PRs! Good luck --
i'm hammering away at Solr config, but making progress!
…On Thu, Jun 15, 2017 at 4:42 PM, David C Days ***@***.***> wrote:
@jywarren <https://github.com/jywarren> ,
Sounds like exactly what we need. I'm going to try to make the changes to
#1450 <#1450> tonight, and then
work on the test coverage (also updating comments that will appear in the
Swagger UI, add references to the implemented JS clients, etc).
Sounds like we have a plan moving forward.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1449 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ362n9ofgFe_bXCBWH5lugPl7Apgks5sEZcxgaJpZM4NvKA1>
.
|
OK, - this is still a great plan for the API work, though we'll need to update and adapt some sections due to recent work. I also put more links to existing API methods here: https://github.com/publiclab/plots2/pull/2017/files |
Also need updates regarding the token system #1513 for the write-API |
the API has changed a lot, more updated details at #3520 |
Goals
GSoC 2016 introduced RESTful services to the plots2 system. Since then, there have been several fundamental changes to the site, as well as new projects and goals for GSoC 2017. This issue is intended to cover cleanup of work from 2016, as well as add new capabilities for further development.
Additionally, the existence and usage of the RESTful services (current and future) is rather opaque, at the moment. Developers do not have a centralized point of reference in which to become familiar with existing code. Because the RESTful subsystem is based on a particular technology, consumers and developers of the services also have to surmount a rather steep learning curve before any practical usage.
Phase 1: Documentation and Testing UI
Addition of a test and documentation interface for developers and consumers of existing RESTful services.
Phase 2: Full Coverage of Current Services
Full coverage of the Jasmine Tests for existing services and JS scripts, such as Issue #812.
Phase 3: User Authentication
This phase covers integration of RESTful services with plots2 user authentication.
The current implementations are read-only services that are deemed "safe", in that they do not require various levels of user authentication to separate anonymous calls from standard users from administrators. Before the development of more powerful RESTful services can occur, an authentication system must be designed and implemented. While there are standard patterns available, actual implementation of any service requires tight integration and testing with the specific authentication/authorization implementation.
Once this phase is complete, future developers should have a standardized approach (via helper classes, system configurations, or design patterns) to apply restrictions to unsafe web service calls that will developed in the future.
Phase 4: Additional RESTful Services
This phase is more generalized. As various projects move forward, the opportunity to add new services will occur, and decisions need to be made for both the location and capabilities of those services. As each of the various projects are evaluated, the following checklist of items should be considered:
As I said, this is a generalized issue to try to bolster the current RESTful API system, as well as roll out new capabilities in a standardized manner. Phase 4 (Additional RESTful Services) may occur with no new services from GSoC 2017. However, the patterns and work from the previous phases should establish a baseline for any future work.
The text was updated successfully, but these errors were encountered: