Scripts to validate JACoW docx proceedings against the official template.
git clone git@github.com:AustralianSynchrotron/jacow-validator.git
pip install -r requirments.txt
cd jacow-validator
Each conference has a url
grab a copy of it and save it to your computer
Add a conference if you are admin: e.g. Short Name: IPAC19 url: https://spms.kek.jp/pls/ipac19/references.csv path: References_ibic20.csv
Where for each conference, url is set to the currently applicable url and path is set to the location on your filesystem where you saved the file.
-
Fork this project to your own github account
-
Clone your fork to your computer
-
Add the AustralianSynchrotron repo as one of your remote's called "upstream":
git remote add upstream https://github.com/AustralianSynchrotron/jacow-validator.git
-
Ensure docker is installed:
(for development mode create a .env file with FLASK_ENV=development)
pipenv run app
-
Make sure docker is running on your computer
-
Open a command prompt
-
Browse to the jacow-validator folder
-
Type docker-compose up --build
-
For the first time use, you will need to
- exec into the docker container with the database
- login to postgres with the credentals in docker-compose
- browse to /register and create an account
- update the user in the app_user table with is_admin, is_editor and is_active set to true.
- browse to /login page
- login as new user
- then you can user the interface to add conferences
These steps work for pycharm's community edition which doesn't feature native flask support.
-
Open pycharm and open the project
-
File > Settings > this project > project interpreter
a. Set the interpreter to use pipenv
-
Run > Edit Configurations > Add new configuration (
+
button) > Choose Python-
Name it jacow-validator or similar
-
Set the script path to point to the flask that is used by your pipenv virtual environment
-
You can find the location of your virtual environment's files using the command
pipenv --venv
ran from within your project directory -
Your flask script will be located within a bin folder at that location so if
pipenv --venv
outputs:/home/user/.local/share/virtualenvs/jacow-validator-Awl2i6Az/
then you will need to enter into the script path field:
/home/user/.local/share/virtualenvs/jacow-validator-Awl2i6Az/bin/flask
-
-
In the parameters type
run
-
Add a new environment variable called FLASK_APP and set it to the path to the
wsgi.py
file in the project root:example: FLASK_APP=/home/user/apps/jacow-validator/wsgi.py
-
-
Hitting the (play) or (debug) buttons in pycharm should now work to launch the app which you should now be able to see at http://localhost:5000/
pipenv run tox
-
Locate the tox.ini file in your file explorer
-
Right click tox.ini and select
run 'Tox'
-
Note that you may have to reselect your flask run configuration afterwards in the top right of the IDE.
In the interests of keeping this readme clean and relevant to local development, the details of where and how this project was deployed can be found in the deployment readme