Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template: service with donut and integrant options #22

Merged
merged 1 commit into from Jul 14, 2023

Conversation

practicalli-johnny
Copy link
Contributor

@practicalli-johnny practicalli-johnny commented Jul 3, 2023

📓 Description

Add a template to create a Clojure web service using donut-party/system to manage system components

Update existing practicalli/service template to use a default set of declarative transform rules to create the project, using a simple atom-based restart appraoch

Add declarative transform rules for donut and integrant.

Check for :component value in the template-edn function of the practicalli/service template and use the appropriate declarative rule set, e.g. :donut or :integrant

(defn template-edn
  "Update data in the template.edn configuration.
  E.g. derive new declarative transformation rules from
  template substitutions, derived values and values passed
  to the template via the command line
  Return
  - new template.edn configuration"
  [edn data]
  (cond
    (= :donut (data :component))     (assoc edn :transform rules/donut)
    (= :integrant (data :component)) (assoc edn :transform rules/integrant)
    :else edn))

Resolve #21

Refer

:octocat Type of change

Please tick x relevant options, delete those not relevant

  • New feature
  • Deprecate feature
  • Development workflow
  • Documentation
  • Continuous integration workflow

:beetle How Has This Been Tested?

  • unit test
  • linter check
  • GitHub Action checkers

:eyes Checklist

  • Code follows the Practicalli cljstyle configuration
  • Add / update alias docs and README where relevant
  • Changelog entry describing notable changes
  • Request maintainers review the PR

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ CLOJURE cljstyle 7 0 0.51s
✅ CLOJURE clj-kondo 2 0 0.06s
✅ MARKDOWN markdown-link-check 1 0 0.5s
✅ MARKDOWN markdown-table-formatter 1 0 0.33s
✅ REPOSITORY gitleaks yes no 0.48s
✅ REPOSITORY trivy yes no 5.6s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@practicalli-johnny practicalli-johnny force-pushed the template-service-donut-and-integrant branch 2 times, most recently from 30ee4c6 to b57d684 Compare July 14, 2023 11:21
Add donut and integrant options based on value of `:component` passed as
a command line argument when generating a new template

When `:component` is not passed, an atom-based REPL reset of the HTTP
server is provided
@practicalli-johnny practicalli-johnny force-pushed the template-service-donut-and-integrant branch from b57d684 to 85ceda7 Compare July 14, 2023 11:32
@practicalli-johnny practicalli-johnny merged commit f56da2a into main Jul 14, 2023
4 checks passed
@practicalli-johnny practicalli-johnny deleted the template-service-donut-and-integrant branch July 14, 2023 11:34
practicalli-johnny added a commit that referenced this pull request Jul 14, 2023
- [#19](#19) `practicalli/minimal` template
- templates: link to Practicalli Clojure Project templates section for help after new project is created
- [#22](#22) Service template with `:component` option for `:donut` and `:integrant`
- service: run task to run service using clojure.main

- ci: update MegaLinter GitHub Action v7 in MegaLnter workflow
- ci: set monthly schedule and cron examples for alternative schedules
- dev: `MEGALINTER_RUNNER` Makefile variable for repeated commands with common options
- service: refactor integrant config and code
- minimal: correct dependencies config
- application: refactor portal and mulog REPL startup
- dev: clarify use of templates
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.

service template with component configuration
1 participant