La Bonne Alternance has moved to this repo
_ _ _ _
| | | | | | |
| | __ _| |__ ___ _ __ _ __ ___ __ _| | |_ ___ _ __ _ __ __ _ _ __ ___ ___
| |/ _` | '_ \ / _ \| '_ \| '_ \ / _ \/ _` | | __/ _ \ '__| '_ \ / _` | '_ \ / __/ _ \
| | (_| | |_) | (_) | | | | | | | __/ (_| | | || __/ | | | | | (_| | | | | (_| __/
|_|\__,_|_.__/ \___/|_| |_|_| |_|\___|\__,_|_|\__\___|_| |_| |_|\__,_|_| |_|\___\___|
- Install a new local development environment
- Run the tests
- Backend main libraries
- Frontend main libraries
- Hidden market vs visible market (job offers)
- AB testing of making offers visible
- How to contribute
This local development environment is intended to work with the online instance of LaBonneBoite API, so it connects to https://labonneboite.pole-emploi.fr/api/
and not to localhost by default.
Requirements:
- NodeJS version: see
package.json
). - Python and the virtual env (venv) package.
Python dependencies should be installed in a virtual environment:
virtualenv --python=python3.6.8 ./venv
source venv/bin/activate
Installation
- Install the python requirements:
pip install -r requirements.txt
- Create a
settings.py
file in theconfig/overrides
folder - Modify the
config/overrides/settings.py
file to fill parameters with<set-it>
(ask a colleague) - Apply migrations :
./manage.py migrate
- To start the environnement
make dev
- See frontend/README.md for the frontend installation, troobleshooting and how-to about running frontend tests.
For end-to-end testing, we use BrowserStack.
Before you run your first build, you need to create two new files:
frontend/tests-e2e/browserstack.credentials.js
config/overrides/settings.py
The first one should have your browserstack credentials (open a browserstack account or ask a coworker).
The second one should have the following values:
# config/overrides/settings.py
LBB_URL = 'set_me'
LBB_USE_BETA_FLAG= True
LBB_API_KEY='set_me'
LBB_WIDGET_API_KEY='set_me'
ESD_CLIENT_ID='set_me'
ESD_CLIENT_SECRET='set_me'
Ask a coworker for those values!
Make sure all your Javascript libraries have been properly installed. If not, read the Frontend documentation before you continue.
Running a build is as simple as typing make test-all
! Read the output in your console to get the results and have a look at Browserstack's website if you'd like to watch a video!
- Python 3.6.8
- Django 2.1.7
- Mandrill
To know more, read requirements.txt
.
To know more, read frontend/package.json
.
We call companies potentially hiring and not having published any job offer the "hidden job market". LBa motivation is mainly to push candidates to apply directly to these companies without waiting for any job offer to be published first.
We call companies which are hiring and have already published official job offers on pole-emploi.fr the "visible job market". Although it is not the main focus of LBa, we also display these companies in the search results. Their volume represents roughly 15% of the results and by default they are indistiguishables from their hidden market counterparts. We do not display the offers themselves, only the company itself.
During August 2019 for a few weeks we AB tested the impact of distinguishing hidden market companies vs visible market companies using labels with different colors and showing direct links to the job offers on the detail page when presents.
To enable/disable this AB testing you will have to change emitter.defineVariants
in frontend/src/index.js
and constants.OFFERS_ABTEST_EXPERIMENT_NAME
in frontend/src/constants.js
. Be sure to read thoroughly the associated documentation.
The pages are prerendered with a basic markup thanks to the python class ReactProxyAppView.
Therefore we have 2 different systems to set a title to a page:
- at build time,
ReactProxyAppView
uses an array of titles to generate the prerendered pages with the right title - during navigation in the react components:
SEOService.setTitle("...title here...");
in the react components
For devs in the core team, this repo follows the Feature Branch Workflow.
We are also open to comments, questions and contributions from devs outside the core dev team! Feel free to open an issue, fork the code, make changes and open a pull request.