pydriverr's People
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
Implement handling edge
Wrong file installed (sha512_sum) for operadirver
Steps to reproduce
- 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
- 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.
refactor common code in drivers
some of the code between drivers can be refactored and common part moved to different file/class
Implement handling phantomJS
Add ability to install driver in version matching installed web browser
Separate api from implementation
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
Add more logging (also in debug mode)
implement handling opera
As a User I want to be able to enter the product URL into a GUI
Move config to separate module
Rename Project to pydriverr
Add loading bars during files download
Update README.md
Implement handling phantomjs driver
Update package changelog-cli to automatically update the version in python files
changelog-cli from https://github.com/mc706/changelog-cli creates own cchangelog.md and updates version only there.
Consider cloning repo and issuing pull request with following functionality:
changelog release
updates version also inpyproject.toml
and/orsetup.py
- ... creates a commit with new version - how this commit should look like
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:
- Manual release from web page on github: https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository
- Creating release via the github API: https://docs.github.com/en/rest/reference/repos#create-a-release
- Python tool to generate changelog from commit messages: https://github.com/vaab/gitchangelog
replace Fire with proper option handling
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 windows build environment
Add windows as build environment for PSV build
delete-drivers fails if there is no driver file
When branch is pushed submit verification is run
Add format and lint
Create release 1.0.0-rc1
In order to test release process
Add update commands
pydriver update gecko
- update only gecko driver
pydriver update
- updates all installed drivers
Implement handling gecko driver
Add missing docstring in tests
Add option to install version of driver matching installed web browser
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
Add Github workflow to test code
include:
- running unit tests (on different OS? and different python versions)
- code coverage
- linters
Publishing those data for every pull request as a comment
Running on every push
Possibly also create release and snapshot versions
https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions
Update readme with supported commands and configs
Check cache before downloading driver
Make pydriver.ini file hidden
Make print-out of installed-drivers nice
Implement handling Internet Explorer
InternetExplorer
wdm.internetExplorerDriverUrl=https://selenium-release.storage.googleapis.com/
wdm.internetExplorerDriverExport=webdriver.ie.driver
Fix unit tests for opera
Fix creation of arc file to contain sha file for opera driver
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
Explore other possibilities to determine architecture
Nowplatform.uname().machine
is used in order to check is it 32 or 64 bits. But this gives following results:
64:
- Linux: x86_64, Mac: x86_64, Windows: AMD64
Linux: , i386, mac: i386, Windows: ?
Refactor tests
Document tests by docstrings
Fix code issues like those mentioned in PR !35
Fix TODO
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.