Giter Club home page Giter Club logo

find-teacher-training's Introduction

This repository is no longer in use

Find Teacher Training

Prerequisites

  • Ruby 3.1.0
  • NodeJS 16.13.x
  • Yarn 1.22.x

Using asdf-vm to manage tool versions

The .tool-version file in the root of the repository is used to specify the runtime versions of ruby and node.

  1. Download and install asdf-vm ๐Ÿ”—

  2. Install ruby and node plugins

    asdf plugin add ruby
    asdf plugin add nodejs
    
  3. Then run asdf install to install the ruby and node versions specified in the .tool-versions file.

Setting up the app in development

  1. Run bundle install to install the gem dependencies
  2. Run yarn to install node dependencies
  3. Run bundle exec rails server to launch the app on http://localhost:3002

Running against a local version of Publish teacher training courses

By default, in development mode Find will pull course data from the live Publish service.

To pull course data from a local copy of Publish, create a file at config/settings/development.local.yml with the following contents:

teacher_training_api:
  base_url: http://localhost:3001 # this is the default Publish port

(Git will ignore this file.)

Running specs, linter(without auto correct) and annotate models and serializers

bundle exec rake

Running specs

bundle exec rspec

Deploying

Application is hosted on GOV.UK PaaS and every merged PR is continuously deployed to Production.

Linting

Rubocop

We inherit the Rubocop config from Apply for teacher training. To pull the latest version, run bundle exec rake rubocop:copy_config_from_apply. Then to run Rubocop:

bundle exec rubocop -a

(-a will auto-correct violations where possible)

SCSS

bundle exec scss-lint app/webpacker/styles

Setting environment variables

Environment variables and app secrets for each environment are stored in Azure KeyVault and gets applied each time the application is deployed. There are make commands which assist in viewing/editing these environment variables from a local console. Please note that you need to have the az cli installed for this to work.

You also need an activated PIM request to view/edit secrets all environments except qa.

Environment KeyVault Azure Subscription
qa s121d01-shared-kv-01 s121-findpostgraduateteachertraining-development
staging s106t01-shared-kv-01 s106-applyforpostgraduateteachertraining-test
sandbox s106p01-shared-kv-01 s106-applyforpostgraduateteachertraining-production
production s106p01-shared-kv-01 s106-applyforpostgraduateteachertraining-production

View environment variables

From the root of the repository run the below command, for environments other than qa, make sure you have an activated PIM request

make <qa|staging|sandbox|production> print-app-secrets

Edit environment variables

From the root of the repository run the below command, for environments other than qa, make sure you have an activated PIM request

make <qa|staging|sandbox|production> edit-app-secrets

This will present the app secrets in YAML format in your editor (vim), you can make changes to the file and once saved, the secrets will be uploaded to KeyVault and applied to the app after the subsequent deployment.

find-teacher-training's People

Contributors

agadufrat avatar aliuk2012 avatar asmega avatar avinhurry avatar danielburnley avatar dankmitchell avatar darokel avatar davidgisbey avatar defong avatar dependabot-preview[bot] avatar dependabot[bot] avatar duncanjbrown avatar emmafrith avatar faissalmt avatar fofr avatar frankieroberto avatar goodviber avatar gpeng avatar jr-g avatar malcolmbaig avatar misaka avatar mylesjarvis avatar nickgraham101 avatar paulrobertlloyd avatar rizzkhan1 avatar rmcvelia avatar smneal avatar stevehook avatar tobyret avatar vigneshmsft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

find-teacher-training's Issues

Dependabot can't evaluate your Ruby dependency files

Dependabot can't evaluate your Ruby dependency files.

As a result, Dependabot couldn't check whether any of your dependencies are out-of-date.

The error Dependabot encountered was:

Bundler::Dsl::DSLError with message: 
[!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - .tool-versions. Bundler cannot continue.

 #  from /home/dependabot/dependabot-updater/dependabot_tmp_dir/Gemfile:7
 #  -------------------------------------------
 #  def ruby_version
 >    ruby_version = IO.foreach('.tool-versions', "\n") do |tool_version|
 #      tool = Hash[*tool_version.split(' ')]
 #  -------------------------------------------

View the update logs.

Dependabot can't evaluate your Ruby dependency files

Dependabot can't evaluate your Ruby dependency files.

As a result, Dependabot couldn't check whether any of your dependencies are out-of-date.

The error Dependabot encountered was:

Bundler::Dsl::DSLError with message: 
[!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - /home/dependabot/dependabot-updater/dependabot_tmp_dir/.tool-versions. Bundler cannot continue.

 #  from /home/dependabot/dependabot-updater/dependabot_tmp_dir/Gemfile:8
 #  -------------------------------------------
 #    tool_versions_file = File.join(__dir__, '.tool-versions')
 >    ruby_version = IO.foreach(tool_versions_file, "\n") do |tool_version|
 #      tool = Hash[*tool_version.split(' ')]
 #  -------------------------------------------

View the update logs.

Dependabot can't evaluate your Ruby dependency files

Dependabot can't evaluate your Ruby dependency files.

As a result, Dependabot couldn't check whether any of your dependencies are out-of-date.

The error Dependabot encountered was:

Bundler::Dsl::DSLError with message: 
[!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - /home/dependabot/dependabot-updater/dependabot_tmp_dir/.tool-versions. Bundler cannot continue.

 #  from /home/dependabot/dependabot-updater/dependabot_tmp_dir/Gemfile:8
 #  -------------------------------------------
 #      tool_versions_file = File.join(__dir__, '.tool-versions')
 >      ruby_version = IO.foreach(tool_versions_file, "\n") do |tool_version| 
 #              tool = Hash[*tool_version.split(' ')]
 #  -------------------------------------------

View the update logs.

test

What did you do? (steps to reproduce)

What happened? (actual results)

What should have happened? (expected results)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.