Giter VIP home page Giter VIP logo

packageless's Introduction

packageless's People

Contributors

everettraven avatar felixlevert avatar kastolars avatar rafiramadhana avatar rev-g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

packageless's Issues

Documentation needs to be created

Documentation on packageless needs to be created. Documentation will be hosted on Github pages and will likely utilize Docusaurus as the documentation site tooling.

Github Actions tests

Github Actions CI/CD pipeline needs more tests such as build tests, testing results of running the application, etc.

Create a NOTICE file

Create a notice file that contains all necessary information to meet the compliance requirements of third-party dependencies licenses

A few tests are failing on Windows

I am getting the following when running all the tests:

0
--- FAIL: TestMain_OsArgs (0.24s)
    --- FAIL: TestMain_OsArgs/0-Install_Test (0.24s)
panic: runtime error: index out of range [0] with length 0 [recovered]
        panic: runtime error: index out of range [0] with length 0

goroutine 20 [running]:
testing.tRunner.func1.2({0xaf5060, 0xc0004ce180})
        C:/Program Files/Go/src/testing/testing.go:1209 +0x24e
testing.tRunner.func1()
        C:/Program Files/Go/src/testing/testing.go:1212 +0x218
panic({0xaf5060, 0xc0004ce180})
        C:/Program Files/Go/src/runtime/panic.go:1038 +0x215
github.com/everettraven/packageless/utils.(*Utility).ImageExists(0x0, {0xc00001e1e0, 0x19}, {0xc050b0, 0xc000538000})
        C:/Users/kasto/Projects/packageless/utils/docker.go:52 +0x165
github.com/everettraven/packageless/subcommands.(*InstallCommand).Run(0xc000378480)
        C:/Users/kasto/Projects/packageless/subcommands/install_sc.go:150 +0x67e
github.com/everettraven/packageless/subcommands.SubCommand({0xc000392cd0, 0x2, 0x2}, {0xc0003f5e58, 0x6, 0x39})      
        C:/Users/kasto/Projects/packageless/subcommands/subcommand.go:31 +0x1b3
github.com/everettraven/packageless.wrappedMain()
        C:/Users/kasto/Projects/packageless/main.go:72 +0xafb
github.com/everettraven/packageless.TestMain_OsArgs.func1(0xc0003da000)
        C:/Users/kasto/Projects/packageless/main_test.go:185 +0xbf
testing.tRunner(0xc0003da000, 0xc00011ce88)
        C:/Program Files/Go/src/testing/testing.go:1259 +0x102
created by testing.(*T).Run
        C:/Program Files/Go/src/testing/testing.go:1306 +0x35a
FAIL    github.com/everettraven/packageless     0.531s
ok      github.com/everettraven/packageless/subcommands 0.291s  coverage: 91.7% of statements
ImagePullthe input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'
the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'
{"status":"Pulling from bpalmer/alpine-base-ssh","id":"latest"}
{"status":"Digest: sha256:55cc4cb96fb5ab814eaa33fdbf388a5bdfd4d6d1fea61e46f47561f34bd71087"}
{"status":"Status: Image is up to date for bpalmer/alpine-base-ssh:latest"}
--- FAIL: TestDocker_Integration (0.87s)
panic: runtime error: index out of range [0] with length 0 [recovered]
        panic: runtime error: index out of range [0] with length 0

goroutine 37 [running]:
testing.tRunner.func1.2({0x82e100, 0xc0000220d8})
        C:/Program Files/Go/src/testing/testing.go:1209 +0x24e
testing.tRunner.func1()
        C:/Program Files/Go/src/testing/testing.go:1212 +0x218
panic({0x82e100, 0xc0000220d8})
        C:/Program Files/Go/src/runtime/panic.go:1038 +0x215
github.com/everettraven/packageless/utils.(*Utility).ImageExists(0xc000109d60, {0xc00008dd08, 0x1e}, {0x93d2b0, 0xc00042c200})
        C:/Users/kasto/Projects/packageless/utils/docker.go:52 +0x19f
github.com/everettraven/packageless/utils.TestDocker_Integration(0xc0004164e0)
        C:/Users/kasto/Projects/packageless/utils/docker_test.go:621 +0x1d4
testing.tRunner(0xc0004164e0, 0x889698)
        C:/Program Files/Go/src/testing/testing.go:1259 +0x102
created by testing.(*T).Run
        C:/Program Files/Go/src/testing/testing.go:1306 +0x35a
FAIL    github.com/everettraven/packageless/utils       3.261s
FAIL

To Reproduce
Steps to reproduce the behavior:

  1. Run go test --coverprofile=coverage.out ./... at the project root

Expected behavior
All tests should pass.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome

Select an open source license

An open source license should be selected for this project so that it can become a proper open source project and others can contribute to it

Add a `help` subcommand

Add a help subcommand that can be used to learn more about how to use packageless

The help subcommand shouldn't implement any logic other than printing out detailed information about packageless and it's other subcommands

Create issue templates

Improve structure of the project for open source contributions by adding issue templates

Add version command to packageless

Is your feature request related to a problem? Please describe.
Not a problem, but something that packageless should have.

Describe the solution you'd like
packageless should have a version subcommand (or flag) that prints out the version of packageless that is installed.

Describe alternatives you've considered

Additional context

Increase test coverage

Unit tests should be added or modified based on the following analysis of the attached coverage report.

If you would like to contribute, you do not have to increase coverage for all files. Feel free to add a comment to this issue stating which one you would like to pick up and add changes for. When the changes are done, make a pull request with those changes and reference this issue in the pull request comments.

This issue will be closed once coverage on all files are completed.

Coverage Report

To get the coverage report run the following commands from the root directory of the packageless project on git branch main:

go test --coverprofile=coverage.out ./...
go tool cover --html=coverage.out

Analysis of Coverage Report

github.com/everettraven/packageless/main.go does not need modification

github.com/everettraven/packageless/subcommands/install_sc.go

  • If possible, tests to test the logic based on different GOOS values should be created.

github.com/everettraven/packageless/subcommands/run_sc.go

  • Tests should be added to test that the current working directory is being added to the volumes array if a volume path is equivalent to ""

github.com/everettraven/packageless/subcommands/subcommand.go

  • Test should be added to test that the error is being throw properly if the length of the args variable is < 1

github.com/everettraven/packageless/subcommands/uninstall_sc.go

  • If possible, tests to test the logic based on different GOOS values should be created.

github.com/everettraven/packageless/subcommands/update_sc.go does not need modification

github.com/everettraven/packageless/subcommands/upgrade_sc.go

  • Test should be added to test that the error is being thrown properly if the pim config file does not exist

github.com/everettraven/packageless/subcommands/version_sc.go does not need modification

github.com/everettraven/packageless/utils/alias_unix.go does not need modification

github.com/everettraven/packageless/utils/alias_win.go does not need modification

github.com/everettraven/packageless/utils/docker.go

  • Test should be added to cover the case when the length of variable splitVol is != 3

github.com/everettraven/packageless/utils/hcl_parse.go

  • Test should be added to cover the case when an unexpected type is passed to the ParseBody function

github.com/everettraven/packageless/utils/mocks.go does not need modification

github.com/everettraven/packageless/utils/utils.go does not need modification

Make setting aliases optional

The automated process of setting aliases after installing a package should be a setting that can be turned on or off in the configuration file.

As a user I would like to be able to install apps that run as services

Add functionality that would allow a user to install applications that run as a service.

This would involve a lot of various changes and is a large task.

Running an app as a service would include the ability to:

  • start the service with a start command
  • stop the service with a stop command
  • view the status of a service with a status command

Implement updating of package list

packageless needs a way to update the list of packages without needing to install a new version of the application. There should be a place that packageless will pull down the package list file from by running something like packageless update

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.