aburrell / apexpy

A Python wrapper for Apex coordinates
MIT License
34 stars 25 forks source link

BUG: Include datetime microseconds in subsol calculations #82

Closed asreimer closed 1 year ago

asreimer commented 2 years ago

Fixes #81

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

This code can be tested with the following:

import apexpy
from datetime import datetime, timedelta

dtime = datetime(2021,11,20,12,12,12)
apex = apexpy.Apex(dtime)
print("Some mlon value:", apex.mlt2mlon(24,dtime))
print("Some another mlon value, <1 second away:", apex.mlt2mlon(24,dtime+timedelta(seconds=0.5)))

which should produce the expected output:

Some mlon value: 243.2951431274414
Some another mlon value, <1 second away: 243.29313278198242
asreimer commented 2 years ago

I'm not sure why 2 of 4 Travis CI tests failed. They are failing because all of the tests in tests/test_cmd.py have failed, which is unrelated to the changes I made...

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 824


Totals Coverage Status
Change from base Build 806: 0.003%
Covered Lines: 387
Relevant Lines: 391

💛 - Coveralls
coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 832


Totals Coverage Status
Change from base Build 806: 0.003%
Covered Lines: 387
Relevant Lines: 391

💛 - Coveralls
aburrell commented 2 years ago

The problem looks like one of the DOI links in the AUTHORS file is behaving in a finicky manor. I am attempting to rerun one of the jobs where it fails to see if it will succeed.

aburrell commented 2 years ago

Ok, not quite sure what to do about the "broken" link (it works when I try it) or the failing tests for test_cmd in 3.8 on Travis. They are passing locally with the same version. Will have to think about this.

aburrell commented 2 years ago

Ok, now just the confusing unit test failures remain.

aburrell commented 2 years ago

I sent a message to Travis for help. It's only the tests that create a file that are failing, but they should work since they work in other python versions on Travis.

aburrell commented 1 year ago

Ok, it turns out the test problem happened because pytest stopped supporting the old directory structure. That's been updated here along with a few other things. So hopefully the new CI will pass now!