Skip to content

Commit 8cbfe6d

Browse files
committed
fix: update README
1 parent 83662dc commit 8cbfe6d

1 file changed

Lines changed: 62 additions & 38 deletions

File tree

README.md

Lines changed: 62 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -53,31 +53,40 @@ Once OJS has been installed, the plugin must be downloaded and installed.
5353
1. Activate the plugin in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins) and continue with [Configuration](#configuration).
5454

5555
### Via Release
56-
See releases at <https://github.com/TIBHannover/geoMetadata/releases>. The release bundles contain plugin source code as well as the required JavaScript.
57-
58-
1. Download the source code, you will find the source code in the assets of the corresponding release. The following two options are available. You must select one of them:
59-
1. Manual installation via folder placement
60-
- Download the source code as `zip-archive` or `tar.gz-archive` and uncompress it.
61-
- Save the contents into the directory `ojs/plugins/generic/geoMetadata` in your OJS installation. It is important to store the content in the directory `ojs/plugins/generic/geoMetadata` and not in a directory including the tag e.g. `ojs/plugins/generic/geoMetadata-1.0.0.0-beta`.
62-
1. Installation via upload
63-
- Download the source code as `zip-archive` or `tar.gz-archive`. Renaming is not required.
64-
- Prerequisites
65-
- The upload limit in OJS is 2 MB by default. To upload the GeoMetadata plugin, you need to increase this limit in the used `php.ini`-file.
66-
- If you do not know where the `php.ini` file is located, you can find it by creating an `info.php`-file in your server folder containing the following content: `echo "<?php phpinfo();" >`
67-
- Open the `info.php`-file in a browser to check the location (property: `Loaded Configuration File`) of the `php.ini`-file.
68-
- The following properties need to be adapted:
69-
- `post_max_size = 100M`
70-
- `upload_max_filesize = 100M`
71-
- To apply the changes in the `php.ini`-file, a restart of Apache and OJS is required.
72-
- If you want to upload the plugin as `tar.gz-archive` you need to define the `tar`-path in the OJS configuration file (`config.inc.php`).
73-
- code sequence in the `config.inc.php`:
74-
```
75-
; tar (used in backup plugin, translation packaging)
76-
tar = /bin/tar
77-
```
78-
- If you are not aware of the `tar`-path on your system you can find it out by using the following command in the terminal: `which tar`.
79-
- Use the button `Upload a New Plugin` in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins).
80-
- Select the `zip-archive` or `tar.gz-archive` for upload and click the `Save`-button.
56+
See releases at <https://github.com/TIBHannover/geoMetadata/releases>.
57+
In the GitHub Release View you will find 4 archives in the assets of the corresponding release:
58+
59+
- The `geoMetadata.tar.gz` and `geoMetadata.zip` archive contain the plugin's source code, along with the necessary JavaScript dependencies. No further installation via composer is required, the plugin is ready to use.
60+
- `Source code (zip)` and `Source code (tar.gz)` contain only the plugin source code. Further installation via composer is required (See [Step 3. From Source](#from-source)).
61+
62+
We recommend downloading either the `geoMetadata.tar.gz` or the `geoMetadata.zip` archive, which include the JavaScript dependencies. The following guidelines will guide you through the installation process using these archives. There are two options available:
63+
64+
#### Installation via Upload
65+
1. Download as `zip-archive` or `tar.gz-archive`. Renaming is not required.
66+
1. Use the button `Upload a New Plugin` in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins).
67+
1. Select the `zip-archive` or `tar.gz-archive` for upload and click the `Save`-button.
68+
1. Activate the plugin in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins) and continue with [Configuration](#configuration).
69+
70+
_Troubleshooting `File size error.` during Installation via upload_
71+
- The upload limit in OJS is 2 MB by default. To upload the geoMetadata plugin, you need to increase this limit in the used `php.ini`-file.
72+
- If you do not know where the `php.ini` file is located, you can find it by creating an `info.php`-file in your server folder containing the following content: `echo "<?php phpinfo();" >`
73+
- Open the `info.php`-file in a browser to check the location (property: `Loaded Configuration File`) of the `php.ini`-file.
74+
- The following properties need to be adapted:
75+
- `post_max_size = 100M`
76+
- `upload_max_filesize = 100M`
77+
- To apply the changes in the `php.ini`-file, a restart of Apache and OJS is required.
78+
- If you want to upload the plugin as `tar.gz-archive` you need to define the `tar`-path in the OJS configuration file (`config.inc.php`).
79+
- code sequence in the `config.inc.php`:
80+
```
81+
; tar (used in backup plugin, translation packaging)
82+
tar = /bin/tar
83+
```
84+
- If you are not aware of the `tar`-path on your system you can find it out by using the following command in the terminal: `which tar`.
85+
86+
#### Installation via Drag and Drop
87+
1. Download as `zip`-archive or `tar.gz`-archive (you can chose) and uncompress it.
88+
1. Save the contents into the directory `ojs/plugins/generic/geoMetadata` in your OJS installation.
89+
- It is important to store the content in the directory `ojs/plugins/generic/geoMetadata` and not in a directory including the tag e.g. `ojs/plugins/generic/geoMetadata-1.0.0.0-beta`.
8190
1. Activate the plugin in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins) and continue with [Configuration](#configuration).
8291
8392
## Configuration
@@ -144,15 +153,15 @@ All help is welcome: asking questions, providing documentation, testing, or even
144153
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md).
145154
By participating in this project you agree to abide by its terms.
146155
147-
## Notes about accuracy
156+
## Notes About Accuracy
148157
The spatial metadata is saved in GeoJSON format using the EPSG:4326 coordinate reference system (CRS) and the underlying dynamic WGS84 datum.
149158
This means that even the same coordinates can point to different locations on Earth over time, as the so called "epoch" is not saved.
150159
However, this only leads to an uncertainty of about +/- 2 m, which is generally _no problem at all_ for the use case of global dataset discovery.
151160
152161
## Testing
153162
Tests are run with [Cypress](https://www.cypress.io/), for which dependencies are installed with npm using the `package.json`.
154163
155-
### Running Cypress locally
164+
### Running Cypress Locally
156165
157166
```bash
158167
# see also Cypress' system dependencies at https://docs.cypress.io/guides/getting-started/installing-cypress#Advanced-Installation
@@ -171,30 +180,45 @@ npm run cy_run
171180

172181
To debug, add `debugger;` to the code and make sure to have the developer tools open in the browser windows started by Cypress.
173182

174-
### Writing tests
183+
### Writing Tests
175184

176185
1. Start docker-compose configuration (see above)
177186
1. Start Cypress (see above)
178187
1. Write tests, run them in Cypress
179188
1. If you need a clean start (= empty database) for a test, stop the docker-compose configuration, delete it (`down --volume`) and restart it
180189

181-
## Create a release
190+
## Create a Release
182191

183192
1. Run `composer update` and `composer install`
184193
1. Update the releaseVersion in the `version.xml` e.g. `<release>1.0.1.0-beta</release>`
185194
- Create a corresponding commit and push it to GitHub
186195
1. Add a git tag and push it to GitHub
187196
- `git tag -a vReleaseVersion -m "release vReleaseVersion"` e.g. `git tag -a v1.0.1.0-beta -m "release v1.0.1.0-beta"`
188197
- The tag is now connected to the beforehand pushed commit with the changed `version.xml`
189-
- `git push`
190-
1. Create a zip archive of the local files with the following command to include the required dependencies from `vendor/` and `js/lib/` but to exclude non-essential files:
191-
192-
```bash
193-
rm geoMetadata.zip && zip -r geoMetadata.zip ./ --exclude '*.git*' --exclude '*.github/*' --exclude 'node_modules/*' --exclude '*cypress/*' --exclude '*.gitignore*' --exclude '*.npmignore*' --exclude '*messages.mo*' --exclude '*cypress.config.js*' --exclude '*CONDUCT.md*' --exclude '*screenshots/*'
194-
```
195-
196-
1. Create a new release on GitHub using the tag just created, with a fitting title, description and, if need be, the `pre-release` box checked
197-
1. Upload the archive to the release on GitHub
198+
- `git push origin tag vReleaseVersion` e.g. `git push origin tag v1.0.1.0-beta`
199+
1. Create a `zip` and `tar.gz` archive of the local repository including the required dependencies from `vendor/` and `js/lib/` but excluding exclude non-essential files.
200+
- `zip`-archive
201+
```bash
202+
zip -r geoMetadata.zip geoMetadata --exclude '*.git*' --exclude '*.github/*' --exclude 'node_modules/*' --exclude '*cypress/*' --exclude '*.gitignore*' --exclude '*.npmignore*' --exclude '*messages.mo*' --exclude '*cypress.config.js*' --exclude '*CONDUCT.md*' --exclude '*screenshots/*'
203+
```
204+
- `tar.gz`-archive
205+
```bash
206+
tar -czf geoMetadata.tar.gz \
207+
--exclude='*.git*' \
208+
--exclude='*.github/*' \
209+
--exclude='node_modules/*' \
210+
--exclude='*cypress/*' \
211+
--exclude='*.gitignore*' \
212+
--exclude='*.npmignore*' \
213+
--exclude='*messages.mo*' \
214+
--exclude='*cypress.config.js*' \
215+
--exclude='*CONDUCT.md*' \
216+
--exclude='*screenshots/*' \
217+
geoMetadata
218+
```
219+
1. Create a new [release](https://github.com/TIBHannover/geoMetadata/releases) on GitHub using the tag just created, with a fitting title, description and, if necessary, check the `pre-release` box
220+
1. Upload the both archives as binaries to the release on GitHub
221+
1. Publish release
198222

199223
Later release workflows will include usage of the PKP CLI tool, see <https://docs.pkp.sfu.ca/dev/plugin-guide/en/release>.
200224

0 commit comments

Comments
 (0)