Skip to content
Permalink
Browse files

improve build

  • Loading branch information...
fluffy-critter committed Aug 12, 2019
1 parent de841c9 commit c099c294181258fb1719d626646507e5905fe20c
Showing with 25 additions and 459 deletions.
  1. +6 −1 Makefile
  2. +0 −441 Pipfile.lock
  3. +3 −2 pushl/__init__.py
  4. +1 −2 pushl/__main__.py
  5. +2 −2 pushl/caching.py
  6. +2 −1 pushl/entries.py
  7. +1 −1 pushl/feeds.py
  8. +3 −3 pushl/utils.py
  9. +4 −4 pushl/webmentions.py
  10. +3 −2 setup.py
@@ -1,4 +1,9 @@
all: pylint flake8
all: format pylint flake8

.PHONY: format
format:
pipenv run isort -y
pipenv run autopep8 -r --in-place .

.PHONY: format
format:

This file was deleted.

@@ -1,9 +1,9 @@
""" Functionality to add push-ish notifications to feed-based sites """

import logging
import asyncio
import logging

from . import feeds, caching, entries, webmentions, utils
from . import caching, entries, feeds, utils, webmentions

LOGGER = logging.getLogger("pushl")

@@ -119,6 +119,7 @@ def __init__(self, session, args):
links = entry.get_targets(self)
if previous:
# Only bother with links that changed from the last time
LOGGER.debug("%s: excluding previously-checked targets", url)
links = links ^ previous.get_targets(self)

for link in links:
@@ -1,14 +1,13 @@
""" Pushl - a tool for pushing updates from a content feed to another destination """

import argparse
import logging
import asyncio
import logging

import aiohttp

from . import Pushl, __version__


LOG_LEVELS = [logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG]

LOGGER = logging.getLogger("pushl.main")
@@ -1,9 +1,9 @@
""" Simple caching functions """

import pickle
import logging
import hashlib
import logging
import os
import pickle
import sys

from slugify import slugify
@@ -1,8 +1,8 @@
""" Functions for handling entries """

import hashlib
import logging
import urllib.parse
import hashlib

from bs4 import BeautifulSoup

@@ -129,6 +129,7 @@ def get_targets(self, config):

# cache hit
if request.cached:
LOGGER.debug("%s: entry unchanged", url)
return previous, previous, False

current = Entry(request)
@@ -1,8 +1,8 @@
""" Functionality for handling feeds """

import logging
import collections
import hashlib
import logging

import feedparser

@@ -1,11 +1,11 @@
""" Utility functions """

import re
import asyncio
import logging
import re
import ssl
import sys
import asyncio
import urllib.parse
import ssl

import aiohttp

@@ -1,13 +1,13 @@
""" Functions for sending webmentions """

from abc import ABC, abstractmethod
import asyncio
import logging
import urllib.parse
from abc import ABC, abstractmethod

import async_lru
from bs4 import BeautifulSoup
from lxml import etree
import async_lru

from . import caching, utils

@@ -156,8 +156,8 @@ def join(url):
try:
await self.endpoint.send(config, entry.url, self.url)
except Exception as err: # pylint:disable=broad-except
LOGGER.warning("Ping %s: got %s: %s",
self.url, err.__class__.__name__, err)
LOGGER.exception("Ping %s: got %s: %s",
self.url, err.__class__.__name__, err)


@async_lru.alru_cache(maxsize=1000)
@@ -1,10 +1,11 @@
"""Setup for Pushl packaging"""

# Always prefer setuptools over distutils
from setuptools import setup
from distutils.util import convert_path
from os import path

# Always prefer setuptools over distutils
from setuptools import setup

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file

0 comments on commit c099c29

Please sign in to comment.
You can’t perform that action at this time.