Tagged: status update Toggle Comment Threads | Keyboard Shortcuts

  • Jon Stacey 10:58 pm on July 28, 2010 Permalink | Reply
    Tags: , , status update, ,   

    API Stream Wrappers – Week 10 

    Ah, there’s nothing like the smell of fresh tests in the morning. I submitted a couple of small hacks for WP Automated tests to add basic code coverage options. After looking through that code though I think it’s safe to say that it needs to be rewritten :-( Hint hint for those looking into GSoC next year!

    You’ve probably already heard the announcement that PHP4 and MySQL4 support will be dropped in the near future. This is fantastic news on multiple levels–one of them being that stream wrappers require PHP5+, so this is good news indeed.

    This next week I’m going to finish off as much of the tests as I can and try to workaround the remaining shortcomings in the testing suite. Then I hope to toy around with some demonstration wrappers :-)

     
  • Jon Stacey 11:38 pm on July 21, 2010 Permalink | Reply
    Tags: , , status update, ,   

    API Stream Wrappers – Week 9 

    This week I hacked WP Automated Tests to add coverage reports using xdebug and PHPUnit. As of today roughly 75% of the lines of code, or half of the functions and methods, are covered with the unit tests. Of course, code coverage doesn’t mean that everything works just right, but it is very beneficial in increasing confidence in the code and pointing out possible weak areas that need attention.

    Coverage Report as of July 21, 2010

    Next week I’m going to divert my attention slightly to cleaning up the WP Automated Test modifications and submitting patches for that project. I’ll also be shoring up some of the weaker areas of coverage pointed out by the coverage report.

     
  • Jon Stacey 12:06 am on July 15, 2010 Permalink | Reply
    Tags: , , status update, ,   

    API Stream Wrappers – Week 8 

    This week I started doing some serious work with unit testing. I initially wanted to be able to run the tests directly with PHPUnit but discovered that it would be considerably more convenient to have WordPress setup and installed and torn down for each test. So at the moment I’m piggybacking on WordPress Automated Tests. It gets the job done as far as simple testing goes, but several notable features that PHPUnit provides are currently inaccessible such as coverage reports. I’m going to finish up writing the most critical tests for stream wrappers and then briefly look into improving the testing suite to see if coverage reports can be coaxed out without a major overhaul.

    Tip: Automated Testing improvements would make a great project for GSoC next year ;-)

    At the moment the tests demonstrate that the system works top-to-bottom :-D The registry is fully operational and a preliminary test was written for the new test stream wrapper (test://) that leverages the generic local stream wrapper class that’s included with the plugin. For example, the test proves that mkdir(‘test://dir1′) actually gets rerouted properly to create ‘wp-content/streams_test/dir1′. There’s still a lot remaining to test, especially edge cases [*cough*Windows*cough*], but things are coming together very nicely indeed.

    Unit testing stream wrappers plugin mini-guide

    Here’s a quick guide if you’re interested in running some of the tests, or even helping out by writing more!

    First check out the following

    1. http://codex.wordpress.org/User:Hakre/WP_Unit-Tests
    2. http://codex.wordpress.org/Automated_Testing

    Once you have the mundane prerequisites out of the way you can get to the more exciting tests.

    1. Put the stream wrappers plugin in the usual directory. This will probably be something like wp_automated_tests/wordpress/wp-content/plugins/
    2. Configure the wp-config.php file in the top-level directory as indicated in the Automated Testing Guide. Define DIR_TESTPLUGINS as follows:
      define('DIR_TESTPLUGINS', './wordpress/wp-content/plugins/wp-stream-wrappers/tests');

    To run tests, use a variation of the following command: php wp-test.php -t [Test]

    The following Stream wrapper specific tests are currently available:

    • WP_Stream_Wrapper_Registry_Test [completed]
    • WP_Stream_Test [completed]
    • WP_Local_Stream_Wrapper_Base_Test [in progress]
    • WP_File_Helpers_Test [in progress]
       
    • Wojtek Szkutnik 8:38 pm on July 9, 2010 Permalink | Reply
      Tags: status update, ,   

      Trac Attack Week #7 

      Another 9 patches this week so far, I will probably be submitting some more during the weekend to meet the required for mid-term trac issues count by monday.

      Have a nice weekend (yup yup, the SC2 beta is back online!)

       
    • Jon Stacey 10:41 pm on July 7, 2010 Permalink | Reply
      Tags: , , status update, ,   

      API Stream Wrappers – Week 7 

      Development slowed to a glacial pace this week as a result of the 4th and my upcoming GMAT exam. Fortunately, significant headway was made last week, so I’m not significantly behind the timeline. I will be working extra hours over this next weekend to get caught up. My interim goal for this next week is to get a small demonstration functional.

       
    • Jon Stacey 9:32 pm on June 30, 2010 Permalink | Reply
      Tags: , status update,   

      API Stream Wrappers – Week 6 

      Development of stream wrappers is progressing nicely and on track with the timeline. Today I have a very small treat: visuals.

      The following organizational chart shows the current state of the plugin.

      The WP Local Stream Wrapper Base class provides an implementation of the wrapper interface class and is capable of manipulating local files. In essence, this base implementation provides functionality equivalent to the file:// wrapper that comes with PHP.

      Any wrapper that manipulates local files can simply extend this base class. This means that it only takes a few lines of code to implement a custom wrapper fully capable of manipulating local files [e.g. mysuperdupercoollongwrappername:// (please don't ever make your wrapper scheme this long)].

      Did you know: paths such as /path/to/file.txt use the PHP Filesystem (file://) wrapper?

      The chart below is a demonstration of the organization when other community developed stream wrappers are added.

      At the present time, only the local:// stream wrapper will be included with the plugin. Other [optional] stream wrappers will be implemented as individual plugins. This method will make it easier to add and remove wrappers at will and find them in the repository.

      However, one small stumbling block has been encountered. WordPress does not currently do anything with plugin dependencies. Until this functionality is made available with the core plugin system, each wrapper will have to perform a rudimentary check to assert that the WP Stream Wrappers Plugin is activated before trying to load a wrapper implementation which extends the WP Stream Wrapper Interface. Otherwise, universe ending paradoxes will ensue.

      Until next week :-)

       
    • kunalb 9:14 pm on June 21, 2010 Permalink | Reply
      Tags: , status update   

      I’ve slowly started catching up on my backlog thanks to finally being fully free from my Civil internship. Currently I’m working on getting registration working properly in both the back end and front end —

      Initially I had planned storing registration data as post meta data for the events that users were registering for — with custom fields for registration stored as serialized information in the database with the key being something along the lines of userid. However, I recently realized that it would be much better — in terms of getting access to the admin UI easily and also for really being able to extend registrations — if I made registrations another custom post type.

      I’ve been working on that since then — at the moment I’ve got the post type registered, etc. but for moderation I decided to go with my own custom statuses for the post (thanks to a conversation with jjj) — using register_post_status — as publish, draft, etc. don’t make too much sense for registrations; rather I needed some statuses that I could use to moderate the data. This bit has taken me a fair amount of time — in parts due to a slight lack of documentation, as well as some difficulty I had in getting my custom status to display properly in the admin UI — a lot of digging through the code has allowed me to solve that probem atleast. I should be over with registration quickly now — for both WP and BP without any major hurdles.

      After that — most probably I should be able to reach back on schedule within this week — I might get in an extra status update on this blog this week.

       
    • Jon Stacey 4:34 am on June 10, 2010 Permalink | Reply
      Tags: status update, ,   

      API Stream Wrappers – Week 3 

      This week has been significantly more productive that the last two. I’ve broken my status update into the different efforts that are currently ongoing.

      WP_Stream_Wrapper_Registry

      The core of the WP stream wrapper registry has been implemented. This registry keeps track of the scheme and implementation class of each registered wrapper. The WP registry provides supplemental functionality that PHP’s native registry does not provide. An example of the new functionality added is the ability to ask “what wrapper class is responsible for handling this URI or scheme?” The File API will depend on this kind of information to work around current limitations (i.e. bugs) in PHP’s stream wrapper support. Further work on the registry is blocked until WP_Stream_Wrapper_Interface is completed.

      WP_Stream_Wrapper_Interface

      This interface will lay the ground work for what all WordPress wrappers must implement in order to be registered.

      WP File API

      Most stream wrapper functionality will work out of the box. For example, PHP will know what to do if you call fread() with a stream URI. Unfortunately, a handful of standard PHP functions have bugs with stream wrappers and do not work as intended. These limitations are easily overcome by providing replacement functions. These functions will become a part of a File API that is WordPress specific. Next week I will detail how this API and WP_Filesystem_* relate.

      Code repositories

      I setup GitHub mirrors of the Subversion code repositories incase I need to leverage Git’s superior merge capabilities.
      GitHub: wp-stream-wrappers
      GitHub: wp-stream-wrapper-test

       
    • Daryl Koopersmith 3:37 am on May 24, 2010 Permalink | Reply
      Tags: status update,   

      Hey all,

      This week will be a slow start for me. I’ll be making wireframes, researching and vetting potential javascript UI tools (such as color pickers), and if time allows, writing a little code. I’ll post my revised scope soon—I just need to run a few things by Beau first. In short, I plan to release early and often.

      Later this week I’ll be returning to the US from my semester abroad in Scotland. Unavoidably, my life currently consists of packing and goodbyes (and the occasional last hurrah). Once I’m back and the dust has settled I’ll have considerably more time to devote to GSoC.

      In addition, my work on GSoC will continue to share the stage with menus as we hammer out the bugs before the 3.0 release. As 3.0 nears and the bug population dwindles I’ll be shifting more and more of my focus to GSoC.

      Cheers!

       
    c
    Compose new post
    j
    Next post/Next comment
    k
    Previous post/Previous comment
    r
    Reply
    e
    Edit
    o
    Show/Hide comments
    t
    Go to top
    l
    Go to login
    h
    Show/Hide help
    shift + esc
    Cancel
    Follow

    Get every new post delivered to your Inbox.

    Join 28 other followers