Description
Codecov is missing some of the files in my repo - but they do appear in the coverage report.
Notice how server.py and client.py are missing - but they show up on the report: https://codecov.io/codecov/v4/raw/2019-12-20/34749C3E1E6F8E0FD2B392F6B33CB864/2f2aa7bcdf794a57e132711f5e790e5d9b2bb7b5/acd4300b-d878-4196-b296-aa50f97fc396.txt
Repository
MoshiBin/ssdpy on github
jerrod
January 3, 2020, 2:31am
2
Hey @MoshiBin – thanks for reaching out! I was not able to reproduce this bug / I do see these two files in your repo view:
https://codecov.io/gh/MoshiBin/ssdpy/tree/master/ssdpy/cli
Can you let me know if this is still an issue?
Jerrod
These aren’t the same files - there are “client.py” and “server.py” both in ssdpy/ and in ssdpy/cli/:
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import socket
from .constants import ipv4_multicast_ip, ipv6_multicast_ip
from .http_helper import parse_headers
from .protocol import create_msearch_payload
from .compat import if_nametoindex, SO_BINDTODEVICE, IPPROTO_IPV6, WINDOWS, MACOSX
class SSDPClient(object):
def __init__(self, proto="ipv4", port=1900, ttl=2, iface=None, timeout=5, address=None, *args, **kwargs):
allowed_protos = ("ipv4", "ipv6")
if proto not in allowed_protos:
raise ValueError("Invalid proto - expected one of {}".format(allowed_protos))
self.port = port
if proto == "ipv4":
af_type = socket.AF_INET
self.broadcast_ip = ipv4_multicast_ip
self._address = (self.broadcast_ip, port)
This file has been truncated. show original
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import socket
import struct
from .constants import ipv6_multicast_ip, ipv4_multicast_ip
from .protocol import create_notify_payload
from .http_helper import parse_headers
from .compat import if_nametoindex, SO_BINDTODEVICE, inet_pton, IPPROTO_IPV6, WINDOWS, MACOSX
logger = logging.getLogger("ssdpy.server")
class SSDPServer(object):
"""
A server that can listen to SSDP M-SEARCH requests and responds with appropriate NOTIFY packets when the ST matches its device_type.
Example usage::
This file has been truncated. show original
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import json
import logging
import pprint
from ..version import VERSION
from ..client import SSDPClient
logging.basicConfig()
def parse_args(argv):
parser = argparse.ArgumentParser(description="Run an SSDP M-SEARCH")
parser.add_argument("-V", "--version", action="version", version="%(prog)s {}".format(VERSION))
parser.add_argument("-v", "--verbose", help="Be more verbose", action="store_true")
parser.add_argument("-6", "--ipv6", help="Listen on IPv6 instead of IPv4", action="store_true")
parser.add_argument("-t", "--ttl", help="TTL for the M-SEARCH (default: 2)", default=2, type=int)
parser.add_argument("-o", "--timeout", help="Maximum timeout for connections (default: 5)", default=5, type=int)
This file has been truncated. show original
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import logging
from ..version import VERSION
from ..server import SSDPServer
logging.basicConfig()
def parse_args(argv):
parser = argparse.ArgumentParser(description="Start an SSDP server")
parser.add_argument("-V", "--version", action="version", version="%(prog)s {}".format(VERSION))
parser.add_argument("-v", "--verbose", help="Be more verbose", action="store_true")
proto_group = parser.add_mutually_exclusive_group()
proto_group.add_argument("-4", "--ipv4", help="Listen on IPv4 (default: True)", action="store_true")
proto_group.add_argument("-6", "--ipv6", help="Listen on IPv6 instead of IPv4", action="store_true")
parser.add_argument("usn", help="Unique server name", nargs=1)
parser.add_argument(
This file has been truncated. show original
The ones outside of the cli folder aren’t in the coverage report
tom
April 24, 2020, 6:06pm
5
Hi @MoshiBin , apologies that you were not updated on this. We made a change in late January to fix this issue, can you check to see if this is still a problem?
I seem to be experiencing something similar on my repo:
https://codecov.io/gh/crim-ca/weaver
The file weaver/utils.py
is missing for me although it clearly is in my coverage.xml
report, whereas other utils.py
files located at other level are present as expected.
(not found!) => Codecov
(available) => Codecov
(available) => Codecov
Is it possible that some paths are not correctly resolved (ie: they get mixed up with same name files at other levels)?
tom
May 22, 2020, 9:11pm
8
Hi @fmigneault , this looks like a path fixing issue. I’m going to take a stab and guess you’ll need to add this to a codecov.yml
file
fixes:
- "::weaver/"
Would you try that and see if it works?
Hi @tom
Using your suggestion, I went to the root of the cause and modified my setup.cfg
to define source = ./
instead of source = weaver
.
This solved it for me without adding codecov.yml
file.
Thanks
1 Like