Commit Graph

68 Commits

Author SHA1 Message Date
jimmoffet
6042289411 corrected cmd palette shortcut in readme 2022-08-03 15:52:27 -07:00
Jim Moffet
314eb27f5a Update README 2022-08-01 11:14:37 -07:00
Richard Baker
799949a3f4 Add .nvmrc & use NVM to manage installed Node version
We have decided to use NVM to manage installed Node versions locally
and in CI to ensure they match and produce consistent builds.

Running `nvm install` will install the Node version specified in the
`.nvmrc` file.

This is now consistent with Document Download Frontend.
See: alphagov/document-download-frontend#114

Signed-off-by: Richard Baker <richard.baker@digital.cabinet-office.gov.uk>
2022-04-05 12:09:53 +01:00
Ben Thorner
f87fca9aa0 Centralise documentation for updating dependencies
This follows the convention established in [1].

[1]: https://github.com/alphagov/notifications-antivirus/pull/83
2021-12-29 15:01:21 +00:00
Katie Smith
fdfdb9e498 Update runtime.txt and README.md to Python 3.9 2021-11-02 16:09:56 +00:00
Ben Thorner
9f9751adbf Tweak layout for dependencies section
This matches what we have in other repos [1][2].

[1]: https://github.com/alphagov/notifications-antivirus#to-update-application-dependencies
[2]: https://github.com/alphagov/notifications-api#to-update-application-dependencies
2021-05-11 18:22:11 +01:00
Ben Thorner
d15143606e Rewrite and expand docs on auto-JS scripts
This adds a note about automatically re-running JavaScript tests.
I've moved and rewritten the old content about re-building JS code
to match the new style.
2021-05-11 18:20:40 +01:00
Ben Thorner
423b4c7812 Revise final sections of the README
This makes a few additional changes to curb the length of this file,
by moving length documentation (the picture is large) into a separate
file, where other documentation could go. It also corrects the section
on requirements, and attempts to make it more concise.
2021-02-22 17:19:46 +00:00
Ben Thorner
864f4bef66 Revise README to be similar to API app
This restructures the sections based on what we agreed for the API
repo.
2021-02-22 17:19:30 +00:00
Ben Thorner
c1cbd9c34a Remove redundant parts of the README
These aren't specific to this repo, and are covered more generally
in the Wiki [1]. Note that:

- The claim about needing multiple Python versions is not true.
- The NPM instructions should be covered by the "make bootstrap".
- The version of Node/NPM is covered by installing the latest one.

[1]: https://github.com/alphagov/notifications-manuals/wiki/Getting-Started
2021-02-22 17:04:41 +00:00
Ben Thorner
ff035bfe8e Revise section on setup
This is now closer to the recently revised README for the API repo.
2021-02-22 16:56:09 +00:00
Ben Thorner
c7423bc8ca Swap FLASK_DEBUG for FLASK_ENV
This achieves the same thing and gets rid of the warning about being
in a production environment when the app starts up.
2021-02-22 16:54:56 +00:00
Ben Thorner
dfb767d57e Move bootstrap tasks into the Makefile
This is more consistent with how we run all other tasks. Note that
the virtual env setup is not generally applicable, and developers
of this repo should follow the guidance in the README.
2021-02-22 16:53:54 +00:00
Ben Thorner
8704f4dfdd Revise section about AWS setup
This is covered in Wiki in more detail. Note that only parts of the
app itself (vs the API app) require these credentials.
2021-02-22 16:44:13 +00:00
Ben Thorner
b2ae52fa11 Remove section about virtualenv
This is covered generically in the Wiki [1].

[1]: https://github.com/alphagov/notifications-manuals/wiki/Getting-Started#development-environment
2021-02-22 16:42:23 +00:00
Ben Thorner
36a806e8bf Switch to 'make' for running app processes
These are simple enough that they don't need their own scripts.
2021-02-22 16:41:30 +00:00
David McDonald
c5d08c15fd Update README.md
Co-authored-by: Chris Hill-Scott <me@quis.cc>
2020-05-22 09:48:04 +01:00
David McDonald
d14510c98c Further improvements to readme 2020-05-20 10:58:35 +01:00
Aaron McCloud
e57641f992 Updated Readme.md project setup steps 2020-05-16 16:00:38 -07:00
David McDonald
21c63926b5 Remove things from readme that are no longer relevant
The requirements link has been broken for ages
We no longer use coveralls
2020-02-24 17:31:29 +00:00
Tom Byers
c7f3b688cd Bump version of NodeJS to 10.15.3
Updates the README to reference this.

If running this locally, it's recommended to use
the 'n' NPM package to manage your version of
NodeJS, as described in the README:

https://github.com/alphagov/notifications-admin#first-time-setup
2019-04-12 15:36:57 +01:00
Chris Hill-Scott
0d13c8b091 Update with latest setup 2018-12-21 12:54:19 +00:00
Chris Hill-Scott
a271381f5a Add information about how static assets are served
This should help developers new to Notify understand how it works.
2018-12-14 16:25:31 +00:00
Alexey Bezhan
2f876243ae Pin all requirements in requirements.txt
The list of top-level dependencies is moved to requirements-app.txt,
which is used by `make freeze-requirements` to generate the full
list of requirements in requirements.txt.

(See alphagov/notifications-api#1938 for details.)
2018-07-30 16:43:03 +01:00
Leo Hemsted
11a4a08ccb hardcode some development values
this'll ensure that you won't get your dev secret keys out of sync
between api and admin
2018-02-27 15:55:20 +00:00
Leo Hemsted
4aeb57567a remove flask-script
flask-script has been deprecated by the internal flask.cli module, but
making this carries a few changes with it

* you should add FLASK_APP=application.py and FLASK_DEBUG=1 to your
  environment.sh.
* instead of using `python app.py runserver`, now you must run
  `flask run -p 6012`. The -p command is important - the port must be
  set before the config is loaded, so that it can live reload nicely.
  (https://github.com/pallets/flask/issues/2113#issuecomment-268014481)
* find available commands by just running `flask`.
* run them using flask. eg `flask list_routes`
* define new tasks by giving them the decorator
  `@app.cli.command('task-name')`. Task name isn't needed if it's just
  the same as the function name. Alternatively, if app isn't available
  in the current scope, you can invoke the decorator directly, as seen
  in app/commands.py
2017-11-06 17:33:04 +00:00
Venus Bailey
cbe2df3946 Revert "Job stats table" 2017-08-16 15:25:26 +01:00
venusbb
da90fd2a8b modified readme 2017-06-08 16:50:15 +01:00
Leo Hemsted
ba6c6b4923 node requires brew to install 2017-04-18 14:04:10 +01:00
Leo Hemsted
9391181b2c Add cloudfoundry config values
also added tests
2017-04-10 19:25:08 +01:00
Chris Hill-Scott
43296469d6 Add endpoint for generating an image of a letter
The PDF preview is all good, but it’s hard, finickeity and feels dirty
to embed a PDF in a web page. It’s a more natural thing to embed an
image in a web page.

So this commit adds another endpoint to return an image of a letter
template. It generates this image from the PDF preview, so the stack
looks like:

1. `template.png` (generated in admin)
2. `template.pdf` (generated in admin)
3. HTML preview (generated by a `Renderer` in utils)
4. `Template` instance
5. serialised template from API
6. Template stored in database

The library used to convert the PDF to an image is Wand[1], which binds
to ImageMagick underneath. So in order to get this working locally on a
Mac you will probably need to do:
`brew install imagemagick ghostscript cairo pango`.

To get it working on Ubuntu/EC2 is an exercise left to the reader…

1. http://docs.wand-py.org/en/0.4.4/
2016-12-13 10:34:18 +00:00
Jenny Duckett
5eca69882a Generate the version file in the bootstrap script
This file needs to exist before the app can run, so create it automatically
rather than including it as an extra setup step in the README. The API app
already does this.
2016-11-29 16:25:50 +00:00
Paul Craig
bb43bfb024 Add npm (v3 or greater) as a README dependency
Experienced an error to do with the way npm handles its dependency
paths.
[Basic idea is here](https://docs.npmjs.com/how-npm-works/npm3#npm-v3-dependency-resolution).

My npm v2.x.x was failing because it couldn't find my Hogan library.
Upgrading npm, nuking `node_modules` and reinstalling/rebuilding
finally fixed everything.
2016-11-21 17:24:26 +00:00
Martyn Inglis
411b20ad1c Removed outdated build monitors 2016-09-27 12:41:28 +01:00
minglis
2ea401213e Merge pull request #928 from alphagov/rationalise-configs
Simplified the config files for admin.
2016-09-08 10:27:45 +01:00
Martyn Inglis
b249477953 Simplified the config files for admin. 2016-09-07 10:31:33 +01:00
Imdad Ahad
afdf9b7e59 Update README to include additional installation instructions 2016-09-06 10:22:20 +01:00
Leo Hemsted
6279b327d6 Update README.md 2016-08-17 15:59:16 +01:00
Leo Hemsted
d5238bce5b handle if user doesn't provide name/email
also clean up usage of DESKPRO_PERSON_EMAIL and put it in the conf rather than env
2016-08-04 18:01:08 +01:00
Adam Shimali
4c2ee8e8ed Updated for correct desk pro env vars 2016-05-19 11:04:45 +01:00
Rebecca Law
2afbbd6423 Removed unused requirements and modules. 2016-04-21 09:11:00 +01:00
Chris Hill-Scott
5c4de3d13d Add code coverage
- generates a code coverage report
- triggers Coveralls on every Travis build
- adds a badge to the README
2016-04-07 11:03:27 +01:00
Adam Shimali
3e167c69f2 Clean up config a bit. Get values for config from environment.
Removed some old redundant config.
2016-03-23 15:07:04 +00:00
Chris Hill-Scott
c7f9b24cee Add deployment badges 2016-03-22 09:39:08 +00:00
Chris Hill-Scott
5b073341a0 Add frontend install and build to bootstrap script
Now you don’t need to remember what the two commands are and when you need to
run them, you can just run the bootstrap script instead.

Makes sense to have them here since the `pip install` is also in here.
2016-03-03 07:54:14 +00:00
Henry Hadlow
b1eadaedcd Tidy up README 2016-02-03 15:18:57 +00:00
Chris Hill-Scott
2c79787b4d Update README
No longer need to do init the submodules when first using the app.
2016-01-14 16:47:50 +00:00
Chris Hill-Scott
1b7658e09a Fix flakiness with Gulp + Travis
Gulp was failing silently on Travis. I tracked this down to the task that
builds a custom, slimmed-down version of jQuery from source.

To fix this I’ve removed the task and replaced it with just `src`ing the
minified version of jQuery from `node_modules`.

Cons:
- A few more kb of JS

Pros:
- Less random, afternoon-chewing complexity
2016-01-12 15:16:16 +00:00
Chris Hill-Scott
003c7e097a Remove badge for code coverage
It needs more integration, which I’m not sure we want at the moment.
2016-01-12 09:47:35 +00:00
Chris Hill-Scott
840185017c Add badges for requirements and code coverage 2016-01-12 09:38:55 +00:00