CPANday 2017

CPANday 2017 is over.

This year I remembered CPANday, after a tweet from @neilbowers pointing to a blog post on CPANday 2017, I even jotted it into my calendar all in due time and promised myself I would contribute something.

As CPANday came closer I still had no plans on what to contribute or what to work on. At the same time my workload at work was immense, having CPANday clashing with a sprint ending and a project deadline.

After a whole day of refactoring a test suite for a service/application, I came home late and was about to give up on the idea of contributing anything at all. I had some candidates, but I was too tired to take on something big or overly complex (or so I thought). I considered what could be low hanging fruit and decided to take a look at my Github issues, to see if anything stood out.

An issue with one of the dependencies I use looked interesting, but still perhaps, not something I could do anything about – I guess my weariness, got the better of me and I just dug in.

The issue was related to my CPAN distribution Date::Holidays and problems building Date::Holidays::CN. Date::Holidays::CN depends on DateTime::Astro, which seemed to be the culprit, I took a look at the issue list for DateTime::Astro and located two RTs:

RT:112240
RT:101846

The first one seemed quite easy and as pretty low hanging fruit, so after consulting the documentation of Module::Install, I got the build script improved and sent my first PR.

Completely fired up by this quick fix I decided to take a look at the remaining issue.

This required some more debugging, but luckily the issue reporter had given a good hint on how to demonstrate the error using Time::Fake.

$ env PERL5OPT=-MTime::Fake=$(date --date="2016-08-31 12:00:00" +%s) \
prove -b t/006_solar_longitude.t

I had some problems with the date command running on MacOS and I was too tired to get my head around the man page. In order to mimic the example from the issue report.

So I made my own example, calculating the number of days until the end of the month (15 on CPANday).

$ env PERL5OPT=-MTime::Fake=+15d prove --lib -b \ 
t/006_solar_longitude.t

When I was able to reproduce the error, I did some debugging and found out that the construction of a DateTime object failed, due to the fact that the date parameters were illegal (well the error output actually stated this).

After some thinking and useless experimentation it struck me that the construction was sequential, so I reordered the parameters so the day would be before the month, so we would not be altering the default object (based on the current day) so it could be a invalid date. This resulted in my second PR.

All in all a good CPAN day, short, but effective. My PRs got accepted and a new release of DateTime::Astro is now available on CPAN.

I never thought I would be able to contribute anything, so I was quite impressed with myself and my accomplishments. I even picked up a few new tricks, like Time::Fake.

I still have no idea why DateTime::Astro is needed, but it does not really matter, since the issues were a SMOP.

Now I am just looking forward to CPANday 2018.

jonasbn, Copenhagen

Advertisements
CPANday 2017

Test::Timer Release 2.00

Received some feedback on release 1.00 of Test::Timer, this has resulted in further improvements and release 2.00.

The diagnostics of failing tests using Test::Timer, now also presents the actual execution time observed.

Next goal of the next feature release, is to handle higher resolution than seconds. In the mean time a release with improved documentation is planned to go out.

Until next Timer – release, take care

jonasbn

Test::Timer Release 2.00

Date::Holidays 1.06 Release

I have uploaded a maintenance release of Date::Holidays to CPAN.

I am planning a lot of activities in relation to Date::Holidays (more on this is an upcoming blog post).

For now I have added a lot of tests of some of all the modules that Date::Holidays has adapters for and some which have not been evaluated completely yet. I am trying to get an overview of the actual status of Date::Holidays and related modules in order to plan further progress.

A part of the larger plan, is the introduction of a proper homepage. So just as for Test::Timer, Date:.Holidays now has a more appropriate representation on the web build using Github pages (also described in a blog post).

So more activity will follow in relation to Date::Holidays – I just need to flesh out the details and the plan.

Take care,

jonasbn

Date::Holidays 1.06 Release

Test::Timer Release 1.00

Yesterday while sitting at the computer working on a release Workflow I received a Github issue.

Test::Timer is a Perl test module that can assist in specifying timing thresholds for code execution. You can then specify that your test suite should break if the code takes too little or too much time.

The concept requested was simple, in the diagnostic messages emitted from the module, the thresholds specified should be mentioned. The implementation did not take long to implement.

However since the diagnostic messages was changed and somebody might be relying on these I decided to make it a major release to indicate this somewhat breaking change.

Thanks to Nigel Horne for the issue report I hope the implementation meets your needs and expectations.

Test::Timer 1.00 has been uploaded to CPAN, feedback most welcome.

Have a nice weekend,

jonasbn

Test::Timer Release 1.00

Workflow Release 1.43

First release of Workflow in a long time, but luckily I received a pull request from Oliver Welter

Oliver Welter has earlier offered patches implementing custom workflows (1.35 and 1.37) and factory subclassing (1.35) and now improvements in logging for condition validation with the latest release 1.43 – thanks Oliver, you make me look lazy 🙂

During the testing of the release I ran into an issue with the Dist::Zilla plugin: Dist::Zilla::Plugins::CJM. Related to failing tests due to deprecation. David Golden has offered a pull request, but the author Christopher J. Madsen seems unresponsive and his activity level on Github has flatlined :-/

Changed configuration to an alternative by Dave Rolsky and everything seems to be running as expected.

Release should be available on CPAN shortly – have a nice weekend,

jonasbn

Workflow Release 1.43

Date::Holidays 1.04 and 1.05 Released – introducing Belarus

I am happy to announce a new release of Date::Holidays. The release is 1.04 and is based on work by Vladimir Varlamov, namely an adapter for Date::Holidays::BY, a module for handling holidays in Belarus.

Thanks to Vladimir for his contributions.

Unfortunately I got carton’s local/ directory included in the distribution tar-ball, which Alexandr Ciornii (CHORNY) was quick to tell me so 1.05, got shipped shortly after.

Thanks to Alexandr for bug report.

Holiday season is coming up, so check out Date::Holidays

jonasbn

Date::Holidays 1.04 and 1.05 Released – introducing Belarus

Stranded in migration

My personal projects and code have lived a long life. I have been using RCS locally, CVS and SVN. My first public repositories was in my local Perl user group Copenhagen Perl Mongers, where we shared a central repository. It started out as CVS, but was migrated to SVN about the same time as I started uploading distributions to CPAN.

In parallel I also set up a few projects at SourceForge and later at Google Code, both using SVN (SourceForge started out as CVS for me, but migration had taken place at some point). Actually the most important project of mine there was Workflow, which was migrated from a closed SVN repository from the original author Chris Winters to SourceForge.

Anyway – for a long time I worked as a freelancer, dreaming of doing my own software instead of others. So I decided to go for a hosted solution with Versionshelf, I later changed to Atlassian, which at that time had nice product consisting of Jira, Confluence, Fisheye and Subversion (it was actually Fisheye, which let me to this, metadata on code has always intrigued me). All my new projects public and non-public got hosted here, but I still had a legacy stuck at the Copenhagen Perl Mongers Subversion server.

I got Google Code migrated to the Atlassian platform, but stayed with SourceForge because of the project organisation. The Cph.pm repos was a dead end, due to the structure, several attempts at getting the projects extracted properly was unsuccessful.

Then came Github a long and a completely new trend in VCS systems. Not always being a first mover I decided to stay put. I still wanted to migrate my old codebase, but could not find the time to sit down and do it.

Michael Schwern created Gitpan, which seemed like a nice solution, but it was based solely on the releases and a lot of history would be lost (to me a serious loss of meta data). There was even some nice blog posts on how to get the most out of Gitpan.

Workflow got migrated from SourceForge to Github, even though SourceForge hosted Git. I had experienced some issues with the administrative interfaces, which rendered the platform useless in a confusing redirect hell (this has been addressed now).

Atlassian then announced the end of life for their Subversion hosting and migration to Git (Bitbucket/Github) was possible. This was the push I needed and all of my code hosted with Atlassian got migrated, well almost all of it I still have some old customer projects still in a Subversion dump. But all of my open source projects got migrated to Github.

All my new projects now start up on Github. But still I looked at my legacy of distributions on CPAN, which I did not have active repositories for and it haunted me.

The in the summer of 2014 (this summer), I fell over Tony Bowden’s Business::Tax::VAT. I have used Business::Tax::VAT::Validation for some projects and never discovered this module, so I checked it out and it seemed that it had not had any releases in a long time and 3 our of 4 RTs was low-hanging fruit, but no Git repo.

So I mailed Tony Bowden and got COMAINT on PAUSE, we wrote back and forth about Github and we investigated the Gitpan version. Luckily the latest version on CPAN was aligned with Gitpan, so I could pick up from there. Fork, Fix and Free. Got the 3 tickets closed and shipped a release, I had to do additional release when it got picked up by the CPAN testers, but that was nothing when it was hosted on Github.

This struck me as a marvellous situation, so I went back to Gitpan and compared it’s versions of my legacy distributions which was not on Github and I was able to create forks of all of them. Yes, this would mean loss of history, but again I would much rather be able to code and maintain, than not being able to do anything.

So now all of my open source Perl projects are on Gitpan and I am a very happy camper. Maintenance releases will start to go out for most of the legacy and some will be deleted (completely) from CPAN, since they are of no value, but they will still be on BackPAN, Gitpan and for me on Github.

My legacy is under control and I am no longer stranded in migration.

jonasbn, Copenhagen

Stranded in migration