Scripts to validate JACoW docx proceedings against the official template.
git clone git@github.com:AustralianSynchrotron/jacow-validator.git
pipenv install --dev
cd jacow-validator
At time of writing the references.csv file can be accessed at the following: https://spms.kek.jp/pls/ipac19/references.csv
grab a copy of it and save it to your computer
Create two environment variables:
URL_TO_JACOW_REFERENCES_CSV=https://spms.kek.jp/pls/ipac19/references.csv
PATH_TO_JACOW_REFERENCES_CSV=/home/user/Documents/jacow/References.csv
Where URL_TO_JACOW_REFERENCES_CSV is set to the currently applicable url and PATH_TO_JACOW_REFERENCES_CSV 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 pipenv is installed:
-
For linux, ensure homebrew is installed - could require a restart
-
brew install pipenv
-
alternatively without homebrew:
pip install pipenv
-
-
Ensure your pipenv is running the latest version of python:
-
In a terminal
cd
into your project's directory -
pipenv install python 3.7
(this project makes use of syntax only available in python > 3.5)
-
-
Ensure dependencies are installed:
pipenv install
(for development mode create a .env file with FLASK_ENV=development)
pipenv run app
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