Skip to content

Disclose more data about your contracting processes, using extensions to the Open Contracting Data Standard

License

Notifications You must be signed in to change notification settings

open-contracting/extension-explorer

Repository files navigation

Extension Explorer

Development

Get extensions data

Get a copy of extensions' translations:

git clone git@github.com:open-contracting/ocds-extensions-translations.git

Generate the data file, substituting the path to the above repository's locale directory for path/to/locale:

ocdsextensionregistry generate-data-file --locale-dir path/to/locale > extension_explorer/data/extensions.json

If you prefer to store the data file in another location, set the EXTENSION_EXPLORER_DATA_FILENAME environment variable.

Stylesheets

Don't edit extension_explorer/static/css. Instead, edit extension_explorer/static/lib and run:

pysassc extension_explorer/static/lib/scss/theme.scss > extension_explorer/static/css/theme.css

Translations

If translatable strings are changed, change into the app's directory:

cd extension_explorer

Extract messages:

pybabel extract -F babel.cfg -o messages.pot .

Push to Transifex:

tx push -s

Translate, then pull From Transifex:

tx pull -a

Finally, compile messages:

pybabel compile -f -d locale

If adding a new language, update LANGS in views.py.

Note: For translating the extensions themselves, see these instructions.

Run in development

env FLASK_DEBUG=1 FLASK_APP=extension_explorer/views.py flask run

Open http://127.0.0.1:5000

Create static site

Create a static site in extension_explorer/build:

python freeze.py

Preview the static site:

python -m http.server --directory extension_explorer/build

Open http://localhost:8000

Manual tests

The automated tests provide full code coverage, but you might still want to check pages visually. Here are a few features to check:

Note: No extension deprecates codes, so code deprecation isn't implemented yet.

Maintenance

To update the requirements, delete and re-create the virtual environment, then run:

pip install -r requirements.in
pip freeze > requirements.txt

About

Disclose more data about your contracting processes, using extensions to the Open Contracting Data Standard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published