Skip to content

TradeWars/service-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TW Service Template

Overview

All services should start by cloning this template as a starting point.

Pawn Code

If services have a Pawn interface, you should keep that code in this repository for easy testing. This means the repository should also be a valid Pawn Package with a pawn.json and a test.pwn for unit tests.

Pawn unit tests do not need to be exhaustive if the application itself provides unit tests in the testing framework specific to the language it is written in. Pawn tests can just be an ephemeral demonstration that the interface itself works as intended.

Versioning

Semantic versioning is not used on these projects because of the evolving nature of their codebases. APIs should be set in stone and if changes are necessary, a discussions should be opened in the Gamemode repository.

Version numbers are in the format 18w26.7.12 - or:

  • Two digit year
  • Week Number
  • Day of Week (starting from 1)
  • Hour of Day

This can be generated with the date command:

date -u +%yw%W.%u.%H

docs/Contributing.md

Please fill out the end of this file with contributing guidelines specific to the language that the service is written in.

docs/Style-Guide.md

This should either outline or link to a style guide specific to the language the service is written in.

Copying Issues

Copying issues manually is tedious. https://github.com/jvandemo/copy-github-labels-cli can be used in order to automatically copy issues from one repository to another.

  1. Create a personal access token here: https://github.com/settings/tokens.
  2. $ npm install -g copy-github-labels-cli

    (Might require sudo)

  3. $ copy-github-labels -t PERSONAL_ACCESS_TOKEN TradeWars/gamemode TradeWars/NEW_REPOSITORY

If the above instructions aren't correct anymore, check the repository.

README.md

You should also keep a well written readme file following the Markdown Lint Rules. For example, start the document with a H1 heading: # Service Name

Below is the rest of the H2 sections that a readme should contain.


Usage

How to interface with the service, either via Pawn or, if the service does not directly communicate with the gamemode, whatever interface is provided.

Deployment

Deployment should be done via Docker however there should also be instructions on how to deploy a development instance for testing and integration with other services.

Tests

Outline how the program is tested, how to run the tests and what they cover.

If there are Pawn tests, also note that sampctl package run can be used.

About

Template for developing external services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published