Giter VIP home page Giter VIP logo

pydriverr's People

Contributors

czerus avatar pajhiwo avatar

Watchers

 avatar  avatar

pydriverr's Issues

Introduce API for running commands in python scripts

This comes from #42 (comment)
Click always run SystemExit exception at the end of command execution. This doesn't allow using pydriver in python scripts as it will terminate script. Scipts API would be like:

from pydriver import pydriver

def show_available(driver_type):
  try:
    pydriver.show_available(["-d", driver_type])
  except SystemExit:
    call remianing stuff

Wrong file installed (sha512_sum) for operadirver

Steps to reproduce

  1. install opera driver
➜ pydriver install -d opera
Log file stored in: /tmp/pydriver.log
Requested driver not found in cache
Installed operadriver:
VERSION: 88.0.4324.104
OS: linux
ARCHITECTURE: 64
  1. Show installed drivers
➜ pydriver show-installed         
Log file stored in: /tmp/pydriver.log
    DRIVER TYPE    VERSION        OS       ARCHITECTURE  FILENAME      CHECKSUM
--  -------------  -------------  -----  --------------  ------------  --------------------------------
 0  gecko          0.29.0         linux              64  geckodriver   dccba99f3e2cbc39db9dd27741c74099
 1  chrome         89.0.4389.23   linux              64  chromedriver  68e3e7b54e8adf3f0d505547f74a7b25
 2  opera          88.0.4324.104  linux              64  sha512_sum    a809b6a4e00a5910a60fc183782d5eef

Zip file for opera contains 2 files: the driver and the checksum.

Make sure it works on Windows

  • follow readme in order to make sure project can be setup on windows
  • Run all unit tests to make sure it works on windows
  • Fix all errors

Design and implement release management process

If we want to release this package to pypi we need to be able to:

  • produce changelog on release
  • create named tags for release
  • have some release branch (is it needed?)
  • Put changelog and produced artifact to github page
  • put artifact and changelog to pypi

We need to have described release process with steps what should be done.

Some links:

Do not check underlying system info when WebDriver class is init

More info added in TODO in webdriver.py

 def system_arch(self, system_arch: str):
        # TODO: what about arm arch?
        # TODO: this check doesn't make sense at this point. There are 2 scenarios for installation:
        # * specify os and arch during install - then we do not care about current system architecture so way
        #   fail the whole operation? This shouldn`t be run at the init of WebDriver class then
        # * do not specify system or arch - then we want to install webdriver for current os and arch. Then we would
        #   also need to be able to discover ARM arch and system name.
        if system_arch in ["x86_64", "AMD64"]:
            self._system_arch = "64"
        elif system_arch in ["i386", "i586", "32", "x86"]:
            self._system_arch = "32"
        else:
            self.support.exit(f"Unknown architecture: {system_arch}")
        logger.debug(f"Current's OS architecture string: {system_arch} -> {self._system_arch} bit")

Add update commands

pydriver update gecko - update only gecko driver
pydriver update - updates all installed drivers

Fix tests so they run on clean env

By default test "test__get_drivers_home_nok" fails if there is DRIVERS_HOME env created
Fix this test, so clean pull passes all tests

Fix double prints when more than 1 drivers is updated

Fix double prints when more than 1 drivers is updated:

➜ pydriver update -d chrome -d gecko
Log file stored in: /tmp/pydriver.log
chromedriver is already in newest version. Local: 89.0.4389.23, remote: 89.0.4389.23
Log file stored in: /tmp/pydriver.log
Log file stored in: /tmp/pydriver.log
geckodriver is already in newest version. Local: 0.29.0, remote: 0.29.0
geckodriver is already in newest version. Local: 0.29.0, remote: 0.29.0

Refactor tests

Document tests by docstrings
Fix code issues like those mentioned in PR !35
Fix TODO

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.