Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Note: You can use "csv" or "tsv" table formats, but not a mixture of them. If you are using the "tsv" tables please see step 2 below.

  1. Navigate to your forked version of archivist_insert.
    1. Note: It is important to ensure that you have the most up-to-date version before you proceed. If you do not have the latest version, please re-fork the pipeline before you continue.
  2. Click on the "archivist_tables" folder.
  3. Click the plus button and “Upload file” to upload each table to the folder.
    1. Note: To avoid running the pipeline automatically, add "[skip ci]" to the "Commit message" each time you upload a table. If you want to run the pipeline immediately after the final table has been uploaded, do not add "[skip ci]" to the "Commit message" box. 
  4. To run the pipeline, either do not add "[skip ci]" to the "Commit message" box after you have uploaded the final table, or navigate to the left-hand menu and select build > pipelines > Run pipeline.



                  

b. tsv tables instead of csv tables

i. Need to change the delimiter in the db_temp.sql file

ii. May need to specify the encoding of the file (Please see below)

\COPY temp_sequence FROM 'archivist_tables/sequence.tsv' DELIMITER E'\t' CSV HEADER encoding 'windows-1251';


5. If the pipeline passes, no further action is needed and the XML file can be downloaded as an "artifact" (a zip files containing the generated XML) which this is available for 10 days. The XML can be viewed temporarily from temp Archivist and can be loaded into Archivist via import. 

a. Note: Before the questionnaire is imported into Archivist, please check the questionnaire to ensure that it is ready to be worked on.

6. If the pipeline does not pass, click on the "cross" to identify the issue. 


                                      

                                          

a. If the csv files have a formatting problem, it will not pass stage 1 (run_tests). Make sure all the table formats are compliant with the correct format - see Tables structure.

                                       

b. Having extra spaces on the uploaded table creates issues - delete the extra spaces and run the pipeline again to fix this error.

                              

c. Once the errors have been identified and resolved, the pipeline should run and you can download the XML and view the questionnaire in temp Archivist. 

Updating your gitlab pipeline

Once setup you may need to re-fork or pull the latest version of the Gitlab pipeline to ensure you have the latest version.

Before you start, you will need to ensure that you have git installed. 

To pull the latest version you will need to do this on the command line. 

1) Search/open cmd

2) Clone your fork. You can find the address on your Gitlab fork. Copy the Clone with HTTPS link. 


git clone https://gitlab.com/HayleyMills/archivist_react_export.git

This will create a folder on your current directory. 

2) Go to that new folder

cd archivist_react_export

3) Connect to the main/master version. This is the project you have created your fork from. As above find the https address under clone.  Follow the example below to pull this and then push this back to your version. You may need to enter your Gitlab email and password. Note the example below uses main for this, but if this does not work try master instead. 

git remote add upstream https://gitlab.com/jli755/archivist_react_export.git
git checkout main
git fetch upstream
git pull upstream main
git push origin main 

4) Your Gitlab fork will now have been updated to the latest version. Check that it is merging the main branch and that the history matches the main version.

Trouble shooting:

  • Main and master are interchangeable to use the one which works for your set-up/Git version
  • The first time you run this, Git may not know who you are and may request that you add your email and username, follow the instructions and example given in the command line. 
  • If there are differences in the files in your forked project and the main/master project this may cause issues. Git will detail which files are an issue. Got to your forked project and update the files to match that in the main/master project e.g. in the example above you may need to have the same Prefixes_to_export.txt file. 
  • If you updated your files, then I recommend you delete your new directory e.g. archivist_react_export and start the process again to ensure there are no issues. 
  • There may be cases when Git details that you have pulled the main/master already, that is not a problem. 
  • No labels