qld-gov-au / ckanext-publications-qld-theme

publications.qld.gov.au theme
GNU Affero General Public License v3.0
0 stars 1 forks source link

ckanext-publications-qld-theme

A custom CKAN extension for Publications.Qld

Requirements

Compatibility with core CKAN versions:

CKAN version Compatible?
2.6 and earlier no
2.7 no
2.8 no
2.9.5+ py2 no
2.9.5+ py3 yes

Local environment setup

Use admin/password to login to CKAN.

If behind a proxy

Add proxy details to docker daemon via https://docs.docker.com/config/daemon/systemd/

That should be it. If you still have problems you can also update ruby proxy and internal docker environment settings

acl local-net src ${your external ip address}/32 # replace ${your external ip address} with your external ip acl local-net src 10.0.0.0/8 # RFC1918 possible internal network acl local-net src 172.16.0.0/1 # RFC1918 possible internal network acl local-net src 192.168.0.0/16 # RFC1918 possible internal network acl local-net src fc00::/7 # RFC 4193 local private network range acl local-net src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443 acl Safe_ports port 80 # http acl CONNECT method CONNECT

acl local-servers dstdomain .amazee.io always_direct allow local-servers always_direct allow localnet


* update /etc/hosts
```text
127.0.0.1 docker.amazee.io adminer.docker.amazee.io mailhog.docker.amazee.io ckanext-publications-qld-theme.docker.amazee.io

Available ahoy commands

Run each command as ahoy <command>.

   build        Build or rebuild project.
   clean        Remove containers and all build files.
   cli          Start a shell inside CLI container or run a command.
   doctor       Find problems with current project setup.
   down         Stop Docker containers and remove container, images, volumes and networks.
   flush-redis  Flush Redis cache.
   info         Print information about this project.
   install-site Install a site.
   lint         Lint code.
   logs         Show Docker logs.
   pull         Pull latest docker images.
   reset        Reset environment: remove containers, all build, manually created and Drupal-Dev files.
   restart      Restart all stopped and running Docker containers.
   start        Start existing Docker containers.
   stop         Stop running Docker containers.
   test-bdd     Run BDD tests.
   test-unit    Run unit tests.
   up           Build and start Docker containers.

Coding standards

Python code linting uses flake8 with configuration captured in .flake8 file.

Set ALLOW_LINT_FAIL=1 in .env to allow lint failures.

Nose tests

ahoy test-unit

Set ALLOW_UNIT_FAIL=1 in .env to allow unit test failures.

Behavioral tests

ahoy test-bdd

Set ALLOW_BDD_FAIL=1 in .env to allow BDD test failures.

How it works

We are using Behave BDD framework with additional step definitions provided by Behaving library.

Custom steps described in test/features/steps/steps.py.

Test scenarios located in test/features/*.feature files.

Test environment configuration is located in test/features/environment.py and is setup to connect to a remote Chrome instance running in a separate Docker container.

During the test, Behaving passes connection information to Splinter which instantiates WebDriver object and establishes connection with Chrome instance. All further communications with Chrome are handled through this driver, but in a developer-friendly way.

For a list of supported step-definitions, see https://github.com/ggozad/behaving#behavingweb-supported-matcherssteps.

Automated builds (Continuous Integration)

In software engineering, continuous integration (CI) is the practice of merging all developer working copies to a shared mainline several times a day. Before feature changes can be merged into a shared mainline, a complete build must run and pass all tests on CI server.

This project uses GitHub Actions as a CI server.