Giter Site home page Giter Site logo

Comments (11)

jpjones76 avatar jpjones76 commented on August 26, 2024 1

Just a fast update: this test issue has been fixed on branch "main" and I'll be doing a bugfix release including this in a couple of weeks.

from seisio.jl.

jpjones76 avatar jpjones76 commented on August 26, 2024

It looks like your tests didn't try to download the test data set... there should be a check for the test data, with verbose logging of the data download if the data set isn't found. I've looked at this a couple of times over the last two weeks, but I can't understand why that happened to you.

from seisio.jl.

adigitoleo avatar adigitoleo commented on August 26, 2024

No worries, I'll poke around as time permits and see if I can help. Maybe I can learn something about testing in julia :) Looks like the test is using files from SampleFiles/AH, which contains the following:

shell> ls .julia/packages/SeisIO/JgSIN/test/SampleFiles/AH/
ah1.f  ah2.f  BRV.TSG.DS.lE21.resp  lhz.ah

from seisio.jl.

adigitoleo avatar adigitoleo commented on August 26, 2024

Curiously, everything is passing just fine on an Ubuntu box:

julia> versioninfo()
Julia Version 1.4.1
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-1660 v4 @ 3.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, broadwell)

from seisio.jl.

adigitoleo avatar adigitoleo commented on August 26, 2024

Do you happen to know of a way to send the output of pkg>test <foo> to a file?

from seisio.jl.

jpjones76 avatar jpjones76 commented on August 26, 2024

One moment. If your tests pass in Ubuntu, then what is the operating system where they're failing?

from seisio.jl.

adigitoleo avatar adigitoleo commented on August 26, 2024

The test fails on Arch Linux x86_64 with kernel 5.12.9-arch1-1 (julia versioninfo in the OP).

I think it downloads using subversion, which I also have:

❯ svn --version
svn, version 1.14.1 (r1886195)
   compiled May 24 2021, 14:42:10 on x86_64-pc-linux-gnu

Copyright (C) 2021 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.9 (compiled with 1.3.9)
  - handles 'http' scheme
  - handles 'https' scheme

The following authentication credential caches are available:

* Gnome Keyring
* GPG-Agent
* KWallet (KDE)

from seisio.jl.

adigitoleo avatar adigitoleo commented on August 26, 2024

Maybe it comes from this line:
https://github.com/jpjones76/SeisIO.jl/blob/main/test/DataFormats/test_ah.jl#L54

I was going through the steps in that block individually and for that line I get:

julia>   @test string(u2d(C.misc["ot"]*μs)) == "1990-05-12T04:50:08.7"
Test Failed at REPL[53]:1
  Expression: string(u2d(C.misc["ot"] * μs)) == "1990-05-12T04:50:08.7"
   Evaluated: "1990-05-12T04:50:08.700" == "1990-05-12T04:50:08.7"
ERROR: There was an error during testing

Is there any reason why these are being compared as strings? A similar check is being done 6 lines above by comparing the DateTime values, which works.

from seisio.jl.

jpjones76 avatar jpjones76 commented on August 26, 2024

Wait. Does Arch have a nonstandard implementation of DateTime formatting, like Unix strptime()?

from seisio.jl.

adigitoleo avatar adigitoleo commented on August 26, 2024

So it looks like the DateTime print format changed in a recent Julia version. I can't quite track down the commit, but it's not an Arch vs Ubuntu thing. I installed Julia 1.6.1 on the Ubuntu machine and I get the same zero-padding behaviour:

julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-1660 v4 @ 3.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, broadwell)

julia> using Dates

julia> DateTime(Date(2018, 1, 1), Time(8, 15, 42, 10))
2018-01-01T08:15:42.010

Compared to Julia 1.4.1 (default from Ubuntu repos):

julia> versioninfo()
Julia Version 1.4.1
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-1660 v4 @ 3.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, broadwell)

julia> using Dates

julia> DateTime(Date(2018, 1, 1), Time(8, 15, 42, 10))
2018-01-01T08:15:42.01

I'll try to find when this was changed, for reference. I suppose it can't hurt to teach myself some git bisect. Your test runners are using 1.5 I think so that narrows it down a bit.

The good news is that without that one line, everything else is passing on 1.6.1 :)

from seisio.jl.

adigitoleo avatar adigitoleo commented on August 26, 2024

Git bisect was a bit ambitious because I would have to pull older versions of all kinds of dependencies, so I gave up :) But this change was definitely introduced in the 1.6 release, and I think I found the PR:

https://github.com/JuliaLang/julia/pull/35582/files

from seisio.jl.

Related Issues (20)

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.