Skip to content

eLife is an open-access journal that publishes promising research in the life and biomedical sciences

License

Notifications You must be signed in to change notification settings

elifesciences/journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eLife Journal

Build Status

Dependencies

Windows - tips and tricks When using Windows to bypass the main errors we recommend to follow the next :
  1. Before you cloned the repo, make sure that you configure git to use the correct line endings.

  2. Make sure you use Windows Linux Subsystem (WSL) or at least git bash.

  3. Use the recommended versions for PHP + extensions and Composer :

    • PHP 7.3.33-7+ubuntu22.04.1+deb.sury.org+2 (cli) (built: Sep 29 2022 22:23:16) ( NTS )

      How to install : Guide 1 / Guide 2

    • Composer version 2.2

      How to install : Step 1

Running the site locally

  1. Run either:
  • make dev to start a local server, displaying dummy data.
  • make prod to start a local server, displaying production data.
  1. Open http://localhost:8080 in your browser.

To stop the containers, press Ctrl+C or run make stop in another terminal.

To remove all cached state and artifacts from your local copy, run make clean.

Important : Creating composer.lock on local and permanent updates to composer files in general should only be done from the container, be aware that if this is done from local can generate additional errors. To avoid any errors running composer update in the container is safer than running it in the local dev env. ( ex: docker-compose run composer update elife/patterns )

When running the site locally via Docker, the parameters are supplied by /.docker/parameters.yaml.

Using a feature branch of the patterns-php library

In order to test visible changes that come from patterns-php when running journal locally, run:

make update-patterns BRANCH=[branch-name-from-patterns-php]

Running fast tests

To run all tests:

make test

To run a single test:

make test TEST=test/Controller/AuthenticationTest.php

Running slow feature tests

To run all feature tests:

make feature-test

To run only one feature test:

make feature-test FEATURE=features/podcast-episode.feature

Linting PHP code

To check for any linting issues, run:

make lint

Reproduce a ci failure

docker-compose -f docker-compose.yml -f docker-compose.ci.yml down -v
SELENIUM_IMAGE_SUFFIX=-debug docker-compose -f docker-compose.yml -f docker-compose.ci.yml up --build
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run ci .ci/behat

Working on Content Alerts

In all but the production environment the CiviCRM client is a mock. This allows the developer to demonstrate the various screens without needing to make changes to a working CiviCRM instance.

Visit http://localhost:8080/content-alerts:

  • Use [email protected] to trigger existing subscription scenario
  • Use any other email to trigger subscription confirmation

For user preference interface:

Expired link interface:

Unsubscribe/optout interface:

To work on the integration with CiviCRM you will have to set the environment variable APP_ENV=prod. And also adjust the values in .docker/parameters.yml for crm_api_key, crm_api_site_key, google_api_client.refresh_token and google_api_client.optout_unsubscribe_spreadsheet_id to be the same as in production.

About

eLife is an open-access journal that publishes promising research in the life and biomedical sciences

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages