Skip to content

Conversation

@madoar
Copy link
Collaborator

@madoar madoar commented Jan 3, 2019

2. Create a new branch for your script
When writing your own script you'll need to test it. To test a script Phoenicis doesn't only require the script, but also some context information. For example a miniature image used in the library after the script has been installed. Some other context information is extracted by Phoenicis via the directory structure, the script is located in.

Therefore to test a script it needs to be embedded inside a repository. For this a local repository, which is based on the official script repository, is recommended. To setup your own local repository proceed the following steps:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add an option to "run a directory script"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure a "run a directory script" option would work.

Currently we require for the script to be correctly displayed in the applications tab of Phoenicis, that the script is contained inside a category directory. (@plata I can't find this in the script repository documentation?)
I know this is only for the representation in the applications tab, which is not really required to when directly executing a script, but I'm not sure which other information is extracted from the directory structure during script execution.
I think @plata has more knowledge about this than I.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts require information about their location in the repository. This is injected from Java (otherwise you would have to set it for every single script). We have an open issue to change this behavior but until then, it's not possible. To be honest, I also don't see the point of doing this: If you want to provide a script, you must put it in git anyways.


Therefore to test a script it needs to be embedded inside a repository. For this a local repository, which is based on the official script repository, is recommended. To setup your own local repository proceed the following steps:

1. Fork the official scripts repository
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change the README to use a fork as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right

@madoar madoar merged commit 89ced58 into PhoenicisOrg:master Jan 4, 2019
@madoar madoar deleted the improve-best-practices branch January 4, 2019 09:14
@Kreyren Kreyren mentioned this pull request Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants