The PDQ® Editorial Board Management System (EBMS) supports the work of the U.S. National Cancer Institute to create and maintain comprehensive, evidence-based, up-to-date cancer content made available in the form of health professional cancer information summaries as a public service of the NCI. These published summaries are intended to
- improve the overall quality of cancer care by informing and educating health professionals about the current published evidence related to individual cancer-related topics and
- support informed decision making between clinicians and patients.
The summaries are produced, maintained, and updated regularly by six editorial boards comprised of oncology specialists in fields including medical, surgical, and radiation oncology; epidemiology; psychology; genetics; and complementary and alternative medicine. Each board reviews published research findings on a monthly basis and meets several times a year to review and discuss updates to their summaries. The boards are not formal advisory or policy-making boards for the NCI. The EBMS is used to manage the identification of the newly-published relevant literature and to track to various stages of the review process.
This version of the EBMS has been rewritten to use Drupal 9.x or later.
The project directory was initialized with the command
composer create-project drupal/recommended-project ebms4
.
After the new version was deployed to production the old repository
was retired and replaced with the new one (renamed from "ebms4" to "ebms").
This page focuses on setting up Docker
containers for doing
development work on the EBMS, with non-sensitive dummy data which can
be put under version control. Jenkins will be used for refreshing lower
CBIIT tiers from the production server. The scripts
directory contains
scripts given to CBIIT for deployment of individual releases.
If at all possible, it is best to be disconnected from the NIH's VPN while
working on your local instance of the EBMS. This is particularly true when
running composer
, as that VPN is known to block access to required
resources.
MacOS is the only supported environment for EBMS development, as using
Docker on Windows is too painful.
You will need git
, homebrew
, php
, composer
, and docker
.
For those tools which are not already installed, follow the instructions
here.
Enable the Mac developer tools which will include things like git
.
sudo xcodebuild -license
Run the following command to install Homebrew, which is a package manager for tools not supplied by Apple.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
A recent version of PHP is needed (version 8.1 or higher).
- Run
brew install [email protected]
. It's OK if you end up with a higher version. - Follow any additional instructions on the screen. One of this set is adding PHP to your path. Make sure you do that.
- Edit
/opt/homebrew/etc/php/8.1/php.ini
or/usr/local/etc/php/8.1/php.ini
and setmemory_limit = -1
(this removes any memory limits, whichcomposer install
usually hits./opt/homebrew
is the location for newer M1 Macs. Ifphp --version
shows that you're running a later version, you'll need to adjust the path of the file you're editing accordingly.
If you already have PHP installed, be sure the php
executable is in your path, and that the memory_limit
variable is set
as described above.
If you have an older Intel-based Mac, run
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --2
For the newer Apple silicon (M1) Macs, the command is:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/opt/homebrew/bin --filename=composer --2
- Go to https://docs.docker.com/desktop/install/mac-install/
- Select the right binary for your Mac's architecture
- Follow the instructions to install.
- Click on the Docker icon at the top right of your Mac's display
- Select Settings
- From the menu on the left select Resources
- Make sure Memory is at least 6GB
- Set Virtual disk limit to at least 100GB
- Click Apply & Restart
To create a local development environment for this project, perform the following steps.
- Clone the repository
- Change current directory to the cloned repository
- Run
./scripts/create-unversioned-files
- Optionally edit the files in the
unversioned
directory - Run
chmod +w web/sites/default
- Run
composer install
- Run
chmod -w web/sites/default
- Run
docker compose up -d
- Run
docker exec -it ebms-web-1 bash
- Inside the container, run
./install.sh
- Point your favorite browser (other than Safari, which doesn't recognize subdomains without a certificate) to http://ebms.localhost:8081
- Log in as admin using the password created in steps 3-4.
To update Drupal core (for example, when a new version of Drupal is released to address serious bugs or security vulnerabilities), run
chmod 777 web/sites/default
composer update drupal/core "drupal/core-*" --with-all-dependencies
chmod 555 web/sites/default
Commit the updated composer.*
files. When other developers pull down
those files, they should run
composer install
If there's any chance that files which should be managed by composer have
been copied into their current locations by other means (for example, using
rsync
), then you should first remove the entire vendor
directory, which
will be repopulated by composer
. This will ensure that composer
's picture
of what is installed is accurate, even for files outside the vendor
directory.
If settings are changed in docker-compose.yml
or Dockerfile
you
will need to rebuild the images and containers with
docker compose up --build -d
To run the complete set of regression tests, navigate to the base directory of the project in the web container and execute
mkdir -p web/sites/simpletest
chown www-data web/sites/simpletest
su www-data -s /bin/bash -c 'vendor/bin/phpunit web/modules/custom'
You can then run tests for just one module, for example:
su www-data -s /bin/bash -c 'vendor/bin/phpunit web/modules/custom/ebms_review'
Or even a specific test:
EBMS_ARTICLE=web/modules/custom/ebms_article
ARTICLE_TEST=$EBMS_ARTICLE/tests/src/FunctionalJavascript/ArticleTest.php
su www-data -s /bin/bash -c "vendor/bin/phpunit $ARTICLE_TEST"
The php-xdebug
package is no longer included in the build of the web container,
because recent versions of Drupal have broken asset aggregation when that package
is installed and enabled. If you need to debug the site, use apt install php-xdebug
to install the package and service apache2 reload
to restart the web server. Be
sure to disable xdebug
when you have finished debugging.