Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to pipenv #411

Merged
merged 6 commits into from
Nov 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
language: python
sudo: required
before_install:
- sudo apt-get update -y
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- sudo apt-get update -y
services:
- docker
env:
- USE_PYTHON3=false
- USE_PYTHON3=true
- docker
install:
- touch .env
- pip install -U pip wheel
- pip install -U setuptools
- pip install -r requirements.txt

- "./docsearch docker:build $USE_PYTHON3"
# We create a .env file to bypass the initial check done by ./docsearch. If
# the file is not here, it will ask questions to create the file. We don't
# need that in CI.
- touch .env
- pip install pipenv
- pipenv install
script:
- pipenv run ./docsearch test
notifications:
email: false
slack:
secure: e5Xx73XfAMaMwXGrrIjsY6tZ+tcl/IZq/6aKPW/Aw7+Eb4ZO0CnB0XPbUSAvxDMo13/BPbribu5t3JmLH6271ITl8tizveBxOlZjRhs/BIZwHrzVsZoUnirVlxkRvpOxyqQCtqeENA3jglno4boWj3DjI1nwd2ced3NLcOgJsIEFXYj4mhCFtN4cTd7C6Mo6e0NYMrZj6SvXjhUXmWX7ySyfSfu/udAxa0D7YOttsx6g9J/SbxkjW4QETVGOGMueqtZHnsipT0t/NnoKGxiUcS/+vZ/CRTdnysL9udcabdc/4qUp9NidFAqjt1BUb4bak89Uspj/Z+gjHBonb6a7mCWc7Mdt/hdJLXtHy0e0gZq5H6+gF7nnOrUIgo/NysZN8A7tj+68OKultdK63tkN9II1kh/iAgRcE9SExcBE3pGm2BNW2L4ieN6qC12oxeVH+DxFjvxQtObur3uX/MBs4PZrzH8yoRyNDhpP2cEJUHXuEdZBfK5/Trsehe6/772Ezh7Zz2baXUj76HW8M0s+tSK7ewP5OW59zEEaqRGddlBFqxyGKn4FRiSNBaAqdWuzZwYppJ8ivd+hbOHXBb+S08TIdL4RkxXwG1JNcZzMDiJBRySeIiNky4bbShgtsbXT8vpWUgTOyIbIaSm9oFKnUK4qkwjb6expAER4iagdrLA=
script:
- "./docsearch test $USE_PYTHON3"
46 changes: 39 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,58 @@
Hello you,

## Install the scrapper without Docker

We do recommend [pipenv][1] to install the whole python environment

- [Install pipenv][2]
- `pipenv install`
- `pipenv shell`

You should be ready to go.

## Run the tests

To run the full test suite, run `./docsearch test`. Note that it requires that
you have a Docker image built already.
To run the full test suite, run `./docsearch test`.

## Special instructions for Algolia employees

If you are Algolia employee and want to manage a DocSearch account,
you'll need to add the following variables in your `.env` file:
If you are Algolia employee and want to manage a DocSearch account, you'll need
to add the following variables in your `.env` file:

```bash
APPLICATION_ID=
API_KEY=
APPLICATION_ID_PROD=
API_KEY_PROD=
HELP_SCOUT_API_KEY=
NB_HITS_MAX=

```
WEBSITE_USERNAME=
WEBSITE_PASSWORD=
SLACK_HOOK=
SCHEDULER_USERNAME=
SCHEDULER_PASSWORD=
MONITORING_API_KEY=
PUBLIC_CONFIG_FOLDER=<path to your docsearch-scraper directory> + /configs/public
PRIVATE_CONFIG_FOLDER=
BASE_INTERNAL_ENDPOINT=
INTERNAL_API_AUTH=

DEPLOY_KEY=
```

Ping the @docsearch team to get access to those credentials.
Ping the @DocSearch team to get access to those credentials.

## Ready to deploy

The CLI will then have more commands for you to run.
Clone the configurations repository in your docsearch-scraper directory. Command
to run from the scraper root:

```bash
git clone git@github.com:algolia/docsearch-configs.git configs/public
```

The CLI will then have more commands for you to run.

[1]: https://github.com/pypa/pipenv
[2]: https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv
22 changes: 22 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
Scrapy = "==1.5.0"
algoliasearch = "==1.13.0"
future = "==0.16.0"
pyperclip = "==1.5.27"
python-dotenv = "==0.7.1"
ratelimit = "==1.4.1"
selenium = "==2.53.6"
six = "==1.11.0"
slacker = "==0.9.60"
tldextract = "==2.1.0"
pytest = "==3.10.0"

[dev-packages]

[requires]
python_version = "2.7"
Loading