Skip to content

Commit

Permalink
update-docs-1 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
janette authored Oct 27, 2023
1 parent 65c9383 commit 7348117
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 130 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.vscode

tests/bats
tests/test_helper
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[![tests](https://github.com/getdkan/dkan-ddev-addon/actions/workflows/tests.yml/badge.svg)](https://github.com/drud/ddev-dkan-ddev-addon/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2023.svg)
[![tests](https://github.com/getdkan/ddev-dkan/actions/workflows/tests.yml/badge.svg)](https://github.com/drud/ddev-dkan-ddev-addon/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2023.svg)

## What is dkan-ddev-addon?
## What is ddev-dkan?

DKAN DDev Add-on provides commands and config for development of
DDEV-DKAN add-on provides commands and config for development of
DKAN itself and DKAN-enabled Drupal sites in a local docker environment.

## Documentation

Documentation lives in Github Pages: https://getdkan.github.io/dkan-ddev-addon/
Documentation lives in Github Pages: https://getdkan.github.io/ddev-dkan/

## Testing

Expand Down
2 changes: 1 addition & 1 deletion config.dkan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

type: drupal9
docroot: docroot
php_version: "8.0"
php_version: "8.1"
webserver_type: apache-fpm
router_http_port: "80"
router_https_port: "443"
Expand Down
32 changes: 0 additions & 32 deletions docker-compose.doxygen.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
theme: jekyll-theme-slate
theme: minima
9 changes: 0 additions & 9 deletions docs/docs.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Getting started with DKAN DDev Addon
# Getting started with DDEV-DKAN add-on

## Start a new DKAN site

First, make a directory for your project.

mkdir my-project && cd my-project

Give DDev just enough configuration to get started.
Give DDEV just enough configuration to get started.

ddev config --auto

Expand Down Expand Up @@ -37,7 +37,7 @@ standard tools to log in:
ddev drush status-report
ddev drush uli

Note that if you need help with any of the DDev commands, you can add `--help`
Note that if you need help with any of the DDEV commands, you can add `--help`
on the command line and get help:

ddev dkan-init --help
Expand Down Expand Up @@ -70,7 +70,7 @@ use that repo as the getdkan/dkan package.

## Decoupled Frontend app installation and build

DKAN can integrate with a JS/headless app. The DKAN DDev addon has special
DKAN can integrate with a JS/headless app. The DKAN DDEV addon has special
commands for dealing with this.

### Install
Expand All @@ -86,7 +86,7 @@ Now that you have all the dependencies, you can build the frontend:
ddev dkan-frontend-build

Currently this command essentially calls `npm run build` within the web container
of DDev.
of DDEV.

## Additional Commands

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DKAN DDev Addon
# DDEV-DKAN add-on

The DKAN DDEv Addon provides configuration and specialized commands for dealing
with a DKAN Drupal project in the DDEv environment.
The DDEV-DKAN add-on provides configuration and specialized commands for dealing
with a DKAN Drupal project in the DDEV environment.

Note that all the DKAN commands which come with this addon have documentation built-in. At the command line, you can
ask for help with any one of them with `ddev [command] --help` like this:
Expand Down
28 changes: 14 additions & 14 deletions docs/testing-debug-phpunit.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Debugging a PHPUnit test with DDev
# Debugging a PHPUnit test with DDEV

This documentation is specific to using the DKAN DDev addon, but can be
This documentation is specific to using the DKAN DDEV addon, but can be
generalized for many other use-cases.

Currently, we're only going to talk about using PHPStorm. Do you have
instructions for another IDE? Make a pull request. :-)

## Goals

We want to be able to use our DDev environment to do step-debugging for PHPUnit-based tests, using PHPStorm.
We want to be able to use our DDEV environment to do step-debugging for PHPUnit-based tests, using PHPStorm.

There are three main moving parts in this process:
- The remote PHP interpreter.
Expand All @@ -18,13 +18,13 @@ There are three main moving parts in this process:
## 1. Set up the remote PHP interpreter

We *could* spend a lot of time working really hard to set up the remote PHP
interpreter configuration in PHPStorm to use our DDev environment.
interpreter configuration in PHPStorm to use our DDEV environment.

Or, we could install the [DDev Integration plugin](https://plugins.jetbrains.com/plugin/18813-ddev-integration).
Or, we could install the [DDEV Integration plugin](https://plugins.jetbrains.com/plugin/18813-ddev-integration).

The plugin is the better choice. It will configure a remote interpreter for you,
and you're done. It also gives you some UI clicky things to start and stop
DDev environments, among other minor luxuries.
DDEV environments, among other minor luxuries.

## 2. Configure the PHPUnit framework

Expand All @@ -35,9 +35,9 @@ test coverage reporting.
- Select PHPStorm -> Preferences.
- Choose the PHP -> Test Frameworks tab.
- Click +.
- Add 'PHPUnit by remote interpreter'. The remote interpreter is our DDev environment.
- 'PHP interpreter' should be DDev.
- 'Path mappings' should be set up by the DDev integration plugin.
- Add 'PHPUnit by remote interpreter'. The remote interpreter is our DDEV environment.
- 'PHP interpreter' should be DDEV.
- 'Path mappings' should be set up by the DDEV integration plugin.
- Under 'PHPUnit Library', select 'Path to phpunit.phar' and use the path `vendor/phpunit/phpunit/phpunit`
- Click the reload icon next to the path and see if PHPStorm finds the binary. If it doesn't maybe you haven't run `ddev composer install` yet?
- Leave the default configuration and bootstrap file fields empty.
Expand All @@ -60,7 +60,7 @@ Now that you know where your DKAN module is located, you can create the Run/Debu
- From the menu, select Run -> Edit Configurations...
- Click +.
- Select 'PHPUnit' as the basis of our runner.
- Give it a good name. I decided on 'DDev PHPUnit', because I lack creativity.
- Give it a good name. I decided on 'DDEV PHPUnit', because I lack creativity.
- Under 'Test runner', choose 'Defined in the configuration file'.
- Check the 'Use alternative configuration file' box, and enter the path to the configuration file. This is the
PHPUnit configuration file in the DKAN module. As mentioned above, it could be in a few different places. On my Mac,
Expand All @@ -76,7 +76,7 @@ This is the end of the easy part. Now comes the two complicated things:

In order for the PHPStorm-based test to access our database and see our site, we have to
send in some environmental variables. These can be a pain to discover, and they
differ for every site. Therefore, we've added a DDev command for it:
differ for every site. Therefore, we've added a DDEV command for it:

ddev dkan-get-env-for-phpunit

Expand Down Expand Up @@ -110,8 +110,8 @@ Now we can fill out the 'Before launch' part of the Run/Debug configuration.
- Choose 'Run External Tool'. This will show you another list.
- Click +.
- You can give your new external tool a name and description. I decided on 'create users'.
- 'Program' is the path to DDev. In my case, it's `/usr/local/bin/ddev`. If you want to find yours, you can say `which ddev` at the command line.
- 'Arguments' is the DDev command we want to run. Enter `dkan-test-users`.
- 'Program' is the path to DDEV. In my case, it's `/usr/local/bin/ddev`. If you want to find yours, you can say `which ddev` at the command line.
- 'Arguments' is the DDEV command we want to run. Enter `dkan-test-users`.
- 'Working directory' should be `$ProjectFileDir$`.
- Click 'OK' and 'OK' again on the external tools window.
- Now you can 'Apply' and 'OK' on the Run/Debug configuration form.
Expand All @@ -128,7 +128,7 @@ Congratulations, you have configured the IDE to run the tests.

## 5. [Step Debugging with Xdebug](https://ddev.readthedocs.io/en/latest/users/debugging-profiling/step-debugging/)

- Tell DDev to use XDebug: `ddev xdebug on`.
- Tell DDEV to use XDebug: `ddev xdebug on`.
- Xdebug’s default port is 9003.
- Configure your IDE
* [VS Code](https://ddev.readthedocs.io/en/latest/users/debugging-profiling/step-debugging/#visual-studio-code-vs-code-debugging-setup)
Expand Down
4 changes: 2 additions & 2 deletions docs/testing-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Be sure and document the use of this command in your project's `README.md` :-)

Currently, the project Cypress test runner assumes that you have Cypress
installed locally on your machine. The runner will run this version of
Cypress against the DDev environment.
Cypress against the DDEV environment.

Begin by installing Cypress. For DKAN, we require Cypress 8.7.

Expand All @@ -59,7 +59,7 @@ Begin by installing Cypress. For DKAN, we require Cypress 8.7.
npx cypress info

Next you'll need to set up the site itself, so there is a live site in
DDev to test against.
DDEV to test against.

ddev dkan-init
ddev dkan-site-install
Expand Down
12 changes: 0 additions & 12 deletions doxygen-build/Dockerfile

This file was deleted.

4 changes: 1 addition & 3 deletions install.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: dkan-ddev-addon
name: ddev-dkan

# pre_install_actions - list of actions to run before installing the addon.
# Examples would be removing an extraneous docker volume,
Expand Down Expand Up @@ -68,8 +68,6 @@ project_files:
- commands/web/dkan-test-phpunit
- commands/web/dkan-test-users
- commands/web/project-test-phpunit
- docker-compose.doxygen.yaml
- doxygen-build/Dockerfile
- misc/docker-compose.cypress.yaml
- misc/phpunit.xml
- misc/settings.dkan.php
Expand Down
44 changes: 0 additions & 44 deletions tests/doxygen.bats

This file was deleted.

0 comments on commit 7348117

Please sign in to comment.