Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

Juan Pablo Carbajal-2
On Tue, Oct 16, 2012 at 9:04 PM, Erik Kjellson
<[hidden email]> wrote:

> Hello,
>
> I have written an implementation of the Matlab function 'importdata'. I'm
> getting a bit confused about the borderline between Octave Core and
> Octave-Forge, so I don't know where it belongs...
>
> My implementation covers most of the functionality in the Matlab version,
> but not all. For example, I haven't implemented the automatic detection of
> the column separator. Also, for some special cases (like if you in the data
> section of the file would have some letters among numeric data) you still
> get a slightly different output.
>
> The 'importdata' is, as far as I know, a part of Matlab Core rather than a
> toolbox.
> Does the implementation have to be complete to be able to have it in Octave
> Core?
>
> Or is it better to add it to the Octave-Forge project for now?
>
> regards,
> Erik

Hi Erik,

Cool!

I would say that if compatibility is not complete then better to keep
it in Forge. also, you should upload your function seomwhere so we can
see the coding style, Octave core is very strict in this. Could you
upload your function her
https://sourceforge.net/p/octave/feature-requests/ and lets us known
with another email? also include the forge mailing list that I've just
added.

Cheers

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

Jordi Gutiérrez Hermoso-2
On 19 October 2012 09:37, Juan Pablo Carbajal <[hidden email]> wrote:

> On Tue, Oct 16, 2012 at 9:04 PM, Erik Kjellson
> <[hidden email]> wrote:
>> Hello,
>>
>> I have written an implementation of the Matlab function 'importdata'. I'm
>> getting a bit confused about the borderline between Octave Core and
>> Octave-Forge, so I don't know where it belongs...
>>
>> My implementation covers most of the functionality in the Matlab version,
>> but not all. For example, I haven't implemented the automatic detection of
>> the column separator. Also, for some special cases (like if you in the data
>> section of the file would have some letters among numeric data) you still
>> get a slightly different output.
>>
>> The 'importdata' is, as far as I know, a part of Matlab Core rather than a
>> toolbox.
>> Does the implementation have to be complete to be able to have it in Octave
>> Core?
>>
>> Or is it better to add it to the Octave-Forge project for now?
>>
>> regards,
>> Erik
>
> Hi Erik,
>
> Cool!
>
> I would say that if compatibility is not complete then better to keep
> it in Forge.

Nah, we have tons of incomplete compatibility functions in core. One
more will do no harm. It should go in core.

> also, you should upload your function seomwhere so we can
> see the coding style, Octave core is very strict in this.

This is a minor thing. I can adapt its style as necessary.

- Jordi G. H.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

Erik Kjellson
Hello,

Now I have uploaded my implementation here: https://sourceforge.net/p/octave/feature-requests/41/

I've noticed that a lot of function files have some kind of tests in the end of the file. I guess that you use them to check that you haven't introduced any logic error in the code when modifying it?
I did find this page: http://wiki.octave.org/Tests
But I guess I need to fake input from a fake file in some way, is there anywhere I can read more on how to do that?

regards,
Erik



On 19 October 2012 15:54, Jordi Gutiérrez Hermoso <[hidden email]> wrote:
On 19 October 2012 09:37, Juan Pablo Carbajal <[hidden email]> wrote:
> On Tue, Oct 16, 2012 at 9:04 PM, Erik Kjellson
> <[hidden email]> wrote:
>> Hello,
>>
>> I have written an implementation of the Matlab function 'importdata'. I'm
>> getting a bit confused about the borderline between Octave Core and
>> Octave-Forge, so I don't know where it belongs...
>>
>> My implementation covers most of the functionality in the Matlab version,
>> but not all. For example, I haven't implemented the automatic detection of
>> the column separator. Also, for some special cases (like if you in the data
>> section of the file would have some letters among numeric data) you still
>> get a slightly different output.
>>
>> The 'importdata' is, as far as I know, a part of Matlab Core rather than a
>> toolbox.
>> Does the implementation have to be complete to be able to have it in Octave
>> Core?
>>
>> Or is it better to add it to the Octave-Forge project for now?
>>
>> regards,
>> Erik
>
> Hi Erik,
>
> Cool!
>
> I would say that if compatibility is not complete then better to keep
> it in Forge.

Nah, we have tons of incomplete compatibility functions in core. One
more will do no harm. It should go in core.

> also, you should upload your function seomwhere so we can
> see the coding style, Octave core is very strict in this.

This is a minor thing. I can adapt its style as necessary.

- Jordi G. H.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

Juan Pablo Carbajal-2
On Fri, Oct 19, 2012 at 7:35 PM, Erik Kjellson
<[hidden email]> wrote:

> Hello,
>
> Now I have uploaded my implementation here:
> https://sourceforge.net/p/octave/feature-requests/41/
>
> I've noticed that a lot of function files have some kind of tests in the end
> of the file. I guess that you use them to check that you haven't introduced
> any logic error in the code when modifying it?
> I did find this page: http://wiki.octave.org/Tests
> But I guess I need to fake input from a fake file in some way, is there
> anywhere I can read more on how to do that?
>
> regards,
> Erik
>
>
>
> On 19 October 2012 15:54, Jordi Gutiérrez Hermoso <[hidden email]>
> wrote:
>>
>> On 19 October 2012 09:37, Juan Pablo Carbajal <[hidden email]>
>> wrote:
>> > On Tue, Oct 16, 2012 at 9:04 PM, Erik Kjellson
>> > <[hidden email]> wrote:
>> >> Hello,
>> >>
>> >> I have written an implementation of the Matlab function 'importdata'.
>> >> I'm
>> >> getting a bit confused about the borderline between Octave Core and
>> >> Octave-Forge, so I don't know where it belongs...
>> >>
>> >> My implementation covers most of the functionality in the Matlab
>> >> version,
>> >> but not all. For example, I haven't implemented the automatic detection
>> >> of
>> >> the column separator. Also, for some special cases (like if you in the
>> >> data
>> >> section of the file would have some letters among numeric data) you
>> >> still
>> >> get a slightly different output.
>> >>
>> >> The 'importdata' is, as far as I know, a part of Matlab Core rather
>> >> than a
>> >> toolbox.
>> >> Does the implementation have to be complete to be able to have it in
>> >> Octave
>> >> Core?
>> >>
>> >> Or is it better to add it to the Octave-Forge project for now?
>> >>
>> >> regards,
>> >> Erik
>> >
>> > Hi Erik,
>> >
>> > Cool!
>> >
>> > I would say that if compatibility is not complete then better to keep
>> > it in Forge.
>>
>> Nah, we have tons of incomplete compatibility functions in core. One
>> more will do no harm. It should go in core.
>>
>> > also, you should upload your function seomwhere so we can
>> > see the coding style, Octave core is very strict in this.
>>
>> This is a minor thing. I can adapt its style as necessary.
>>
>> - Jordi G. H.
>
>

You can load a file that will be in the octave folder. Check for
example the demos of imshow
Just choose a small file of your choice and write some test and demos :D

Thank you so much!

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

PhilipNienhuis
In reply to this post by Erik Kjellson
Erik Kjellson wrote:

> Hello,
>
> Now I have uploaded my implementation here:
> https://sourceforge.net/p/octave/feature-requests/41/
>
> I've noticed that a lot of function files have some kind of tests in the
> end of the file. I guess that you use them to check that you haven't
> introduced any logic error in the code when modifying it?
> I did find this page: http://wiki.octave.org/Tests
> But I guess I need to fake input from a fake file in some way, is there
> anywhere I can read more on how to do that?


Most of core Octave's function m-files have tests, so there are tons of
examples.

Simply take a look at all the functions in
..../share/octave/<version>/m/<package>/....

Philip

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

bpabbott
Administrator
In reply to this post by Erik Kjellson

On Oct 19, 2012, at 1:35 PM, Erik Kjellson wrote:

> Hello,
>
> Now I have uploaded my implementation here: https://sourceforge.net/p/octave/feature-requests/41/
>
> I've noticed that a lot of function files have some kind of tests in the end of the file. I guess that you use them to check that you haven't introduced any logic error in the code when modifying it?
> I did find this page: http://wiki.octave.org/Tests
> But I guess I need to fake input from a fake file in some way, is there anywhere I can read more on how to do that?
>
> regards,
> Erik

I suggest you create a temporary file and use it for testing.   See "help tmpnam"

Ben


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of importdata belonging to Octave Core or Octave-Forge?

c.-2

On 21 Oct 2012, at 15:47, Ben Abbott wrote:

> On Oct 19, 2012, at 1:35 PM, Erik Kjellson wrote:
>
>> Hello,
>>
>> Now I have uploaded my implementation here: https://sourceforge.net/p/octave/feature-requests/41/
>>
>> I've noticed that a lot of function files have some kind of tests in the end of the file. I guess that you use them to check that you haven't introduced any logic error in the code when modifying it?
>> I did find this page: http://wiki.octave.org/Tests
>> But I guess I need to fake input from a fake file in some way, is there anywhere I can read more on how to do that?
>>
>> regards,
>> Erik
>
> I suggest you create a temporary file and use it for testing.   See "help tmpnam"
>
> Ben

This fuction:
https://sourceforge.net/p/octave/code/11324/tree/trunk/octave-forge/extra/bim/inst/bim3a_osc_advection_diffusion.m

has an example of creating a temporary file to work with in a demo.

HTH,
c.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev