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

V0.8.0 dev #128

Merged
merged 6 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
`mediumroast_js` is a Node.js Javascript SDK and CLI for Mediumroast for GitHub. In roughly includes the following high level features.

1. A wrapper build atop the GitHub API to make it easier to work with the specifics for Mediumroast for GitHub this is included in `src/api` as `authorize.js`, `github.js`, and `gitHubServer.js`.
2. CLI scaffolding for companies, interactions, users, actions, and storage consumption found in `src/cli`.
3. Report scaffolding for companies and interactions found in `src/report`.
2. CLI scaffolding for studies, companies, interactions, users, actions, and storage consumption found in `src/cli`.
3. Report scaffolding for studies, companies and interactions found in `src/report`.
4. Implementations of CLIs for companies, interactions, users, actions, and storage consumption found in `cli/`.
5. GitHub Actions and Workflows to provide core reporting and repository cleanliness found in `cli/actions`.

Expand All @@ -12,9 +12,6 @@ Since we're using this SDK, and the Python version [mediumroast_py](https://gith
## Developing for Mediumroast for GitHub
If you're interested in developing for the SDK or please follow the steps below to get started.

### Job jar
We will be adding a job jar for contributors to the project in the near future. The job jar will contain a list of tasks that need to be completed to move the project forward. If you're interested in contributing to the project please check back soon for the job jar.

### Cloning the repository
Assuming `git` is installed and your credentials are set up to talk to the mediumroast.io set of repositories it should be possible to do the following as a user on the system:
1. `mkdir ~/dev;cd ~/dev`
Expand All @@ -32,6 +29,14 @@ For developers the following steps are suggested to verify the local changes are
3. Enter the `cli/` directory and run the CLI you've made changes to, for example let's assume there are changes made to `cli/mrcli-company.js` you'd run `./mrcli.js company` to test your changes.
4. If you're creating a new CLI please take a look at one of the existing CLIs in the `cli/` directory to see how they are structured and how they interact with the SDK. A good example is `cli/mrcli-company.js` which manages companies. Since the `.gitignore` file is set to ignore file names like `test.js`, `test.json`, `foo.txt`, etc. you can create these files to test your changes in the `cli/` directory.

### Job jar
The job jar is a list of tasks that need to be completed to improve the SDK and CLI.

1. Confirm all CLIs are working as expected on WinOS.
2. Enhance Studies reporting to cover all data contained within a study.
3. Review and refactor general output functions for all CLIs.
4. Consistently implement error handling and messages in all parts of the SDK and CLI.

## Developing with Mediumroast for GitHub
Follow the steps needed to install the SDK/CLI which is documented in the [main README](https://github.com/mediumroast/mediumroast_js/README.md). Once installed the SDK/CLI is available for use, and the documentation for developers is available [here](https://mediumroast.github.io/mediumroast_js/). Additionally, the CLIs in `cli/` are available as examples of constructing an application with the SDK.

Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
## Welcome Mediumroast for GitHub
Products organizations must build robust product plans from competitive and customer interactions everyone can see, use, and reference. Therefore, Mediumroast for GitHub intends to help Products oranizations construct an active interactions repository close to the action of development and issue management in GitHub.
Products organizations must build evidence based product plans from competitive and customer interactions. Using Artificial Intelligence and Machine Learning, Mediumroast for GitHub realizes an active product planning repository for Product Managers and Developers everyone can see, use, and reference. The repository is built on GitHub and is accessible via Command Line Interface (CLI) and a Software Development Kit (SDK). This CLI and SDK are built on Node.js and is available for Linux and MacOS operating systems.

### Notices
- A new version of the CLI is available and the major focus of this version is to add in Competitive Similarity Analysis, Interaction summarization and Interaction Proto-requirements discovery.
- You can review the [GitHub Page Version](https://mediumroast.github.io/mediumroast_js/) rather than the repository version of this documentation, but the screencasts of several of the CLI tutorials will not display.
A [GitHub Page Version](https://mediumroast.github.io/mediumroast_js/) of this content is also available, but the screencasts and videos won't display.

## Installation and configuration
Mediumroast for GitHub includes a [GitHub Application](https://github.com/marketplace/mediumroast-for-github), a Command Line Interface, and a Software Development Kit. The following steps show you how to install the App and the CLI with SDK.
Expand Down Expand Up @@ -72,7 +70,15 @@ If you're interested in contributing to the Mediumroast for GitHub project, plea
## Issues
If you detect a problem or want to suggest an improvement open an [issue](https://github.com/mediumroast/mediumroast_js/issues) and we will work with you to resolve or respond.

## Support
If you need support or would like to have Mediumroast run the Caffeine Machine Intelligence service on your repository please contact the Mediumroast team via [Discord](https://discord.gg/ebM4Cf8meK) or email us at [hello@mediumroast.io], (mailto:hello@mediumroast.io).

### Release notes
#### Version 0.8.06.01
- The latest version of the SDK and CLI package now includes an initial implementation of Studies with the Foundation study.
- The SDK and CLI may run on for Windows OS, but it has not been tested. If you choose to install and run into problems please open an issue and we will work with you to resolve the matter.
- `cli-table` has been replaced by `cli-table3` to ensure that CLI tabular outputs are on a stable and maintained package.
- The `xlsx` package has been removed and replaced with `exceljs` for improved output to Excel files, and due to the security vulnerability in the `xlsx` package.



11 changes: 6 additions & 5 deletions cli/Company.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## Companies
Company objects are central to Mediumroast for GitHub. Interactions and in the future Studies rely on Companies to function. After setup is run, via `mrcli setup`, two companies are present to work with. Additional Companies can be added, updated, or removed; essentially, `company` is an `mrcli` sub-command that affords users Create, Read, Update and Delete capabilities. Each of the major functions for `mrcli company` are described in this document.

### Notice
Some of the command line options and switches may not yet be implemented; therefore, if a switch or option is not yet implemented the CLI will inform the user and then exit.
### Notice(s)
- Some command line options and switches may not yet be implemented; therefore, if a switch or option is not yet implemented the CLI will inform the user and then exit.
- Similarity comparisons of Companies requires a run of the Mediumroast for GitHub Caffeine Machine Intelligence service. If you're interested in running the Caffeine Machine Intelligence service please contact the Mediumroast for GitHub team via [Discord](https://discord.gg/ebM4Cf8meK) or email us at [hello@mediumroast.io], (mailto:hello@mediumroast.io).

## Help
Prints the usage for the `company` sub-command and exits.
Expand Down Expand Up @@ -36,12 +37,12 @@ Output a list of company objects in properly formatted JSON to STDOUT which can
#### Screenshot with output
<img width="1178" alt="companies_json" src="https://github.com/mediumroast/mediumroast_js/assets/10818650/22d46cd2-952f-4c3b-8e74-37bdceefee2a">

### List all company objects and output to a CSV or XLSX
Company data can be output in either a CSV or XLSX files to enable consumption in common tools like Microsoft Excel. The resulting files will be stored in $HOME/Documents directory as `Mr_Companies.csv` or `Mr_Companies.xlsx` depending on your intended output.
### List all company objects and output to a CSV
Company data can be output in CSV files to enable consumption in common tools like Microsoft Excel or Apple Numbers. The resulting files will be stored in $HOME/Documents directory as `Mr_Companies.csv`.

#### Command(s) run
- `mrcli c --output=csv`
- `mrcli c --output=xls`
- `mrcli company --output=csv`

#### Screenshot of commands being run
<img width="1178" alt="companies_csv" src="https://github.com/mediumroast/mediumroast_js/assets/10818650/f135de7a-aba8-4ed0-9198-64ff50797d4c">
Expand Down
4 changes: 1 addition & 3 deletions cli/Demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@ The following limitations are in place for the demo repository:

1. The demo repository is a clone of the main repository and is updated weekly.
2. The demo repository does not have the actions that automatically generate reports and clean up branches, which means that `mrcli actions` will not work as expected.
3. The demo repository is a shared read-only repository, meaning you can't push changes to it. If you need to test changes, please use your own repository.

If you have any questions or need help, please open an [issue](https://github.com/mediumroast/mediumroast_js/issues)
3. The demo repository is a shared read-only repository, meaning you can't push changes to it. If you need to test changes, please use your own repository.
11 changes: 6 additions & 5 deletions cli/Interaction.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## Interactions
After running `mrcli setup` you can start adding Interactions. An Interaction can be as simple as an email thread between an account team and a customer, a detailed customer interview or even documentation about a competitor. Additional Interactions can be added, updated, or removed; essentially, `interaction` is an `mrcli` sub-command that affords users Create, Read, Update and Delete capabilities. Each of the major functions for `mrcli interaction` are described in this document.

### Notice
Some of the command line options and switches may not yet be implemented; therefore, if a switch or option is not yet implemented the CLI will inform the user and then exit.
### Notice(s)
- Some command line options and switches may not yet be implemented; therefore, if a switch or option is not yet implemented the CLI will inform the user and then exit.
- Summarization of Interaction contents and generating proto-requirements plus competitive insights requires a run of the Mediumroast for GitHub Caffeine Machine Intelligence service. If you're interested in running the Caffeine Machine Intelligence service please contact the Mediumroast for GitHub team via [Discord](https://discord.gg/ebM4Cf8meK) or email us at [hello@mediumroast.io], (mailto:hello@mediumroast.io).

## Help
Prints the usage for the `interaction` sub-command and exits.
Expand Down Expand Up @@ -40,12 +41,12 @@ Output a list of company objects in properly formatted JSON to STDOUT which can
<img width="1178" alt="interactions_json" src="https://github.com/mediumroast/mediumroast_js/assets/10818650/060656ff-8272-4574-a546-d28b9a351dab">


### List all interaction objects and output to a CSV or XLSX
Interaction data can be output in either a CSV or XLSX files to enable consumption in common tools like Microsoft Excel. The resulting files will be stored in $HOME/Documents directory as `Mr_Interactions.csv` or `Mr_Interactions.xlsx` depending on your intended output.
### List all interaction objects and output to a CSV
Interaction data can be output in CSV files to enable consumption in common tools like Microsoft Excel or Apple Numbers. The resulting files will be stored in $HOME/Documents directory as `Mr_Interactions.csv`.

#### Command(s) run
- `mrcli i --output=csv`
- `mrcli i --output=xls`
- `mrcli interaction --output=csv`

#### Screenshot of commands being run
<img width="1178" alt="interactions_csv" src="https://github.com/mediumroast/mediumroast_js/assets/10818650/621064e0-33a1-4136-988d-ec4f68c07330">
Expand Down
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Is replaced by `storage` and `actions` commands in **Mediumroast for GitHub**. I

---

[[Company Subcommand](https://github.com/mediumroast/mediumroast_js/blob/main/cli/Company.md)] | [[Interaction Subcommand](https://github.com/mediumroast/mediumroast_js/blob/main/cli/Interaction.md)]
[[Company Subcommand](https://github.com/mediumroast/mediumroast_js/blob/main/cli/Company.md)] | [[Interaction Subcommand](https://github.com/mediumroast/mediumroast_js/blob/main/cli/Interaction.md) | [[Studies Subcommand](https://github.com/mediumroast/mediumroast_js/blob/main/cli/Study.md)]



Expand Down
102 changes: 102 additions & 0 deletions cli/Study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
## Studies
Study objects are central to Mediumroast for GitHub. Studies rely on Interactions and Companies to function. At this time only the **Foundation study** is implemented; a future update will add support for user defined studies. To enable the Foundation study run `mrcli study --init_foundation`, which will create the basic structures of the study in the repository. Each of the major functions for `mrcli study` are described in this document.

### Notice(s)
- Some of the command line options and switches may not yet be implemented; therefore, if a switch or option is not yet implemented the CLI will inform the user and then exit.
- Study deletion is not yet implemented and not present.
- The only update possible to the Foundation study is to reset its status to cause Caffeine to reprocess the study.
- Populating the Foundation study requires a run of the Mediumroast for GitHub Caffeine Machine Intelligence service. If you're interested in running the Caffeine Machine Intelligence service please contact the Mediumroast for GitHub team via [Discord](https://discord.gg/ebM4Cf8meK) or email us at [hello@mediumroast.io], (mailto:hello@mediumroast.io).


## Help
Prints the usage for the `study` sub-command and exits.

### Command(s) run
- `mrcli study --help`

### Screenshot with output
<!-- Add screenshot here -->

## List study objects
Print out one or more Studies to the command line or an alternative output mechanism like a CSV file. Filtering can be applied to find Studies with specific attributes.

### List all study objects in a table format
This is the default output when running `mrcli s` or `mrcli study` which prints a text table to STDOUT.

#### Command(s) run
- `mrcli s`
- `mrcli study`

#### Screenshot with output
<!-- Add screenshot here -->

### List all study objects in JSON format
Output a list of study objects in properly formatted JSON to STDOUT which can be viewed, redirected to a file, or piped to another command.

#### Command(s) run
- `mrcli s --output=json`
- `mrcli study --output=json`

#### Screenshot with output
<!-- Add screenshot here -->

### List all study objects and output to a CSV
Study data can be output in a CSV file to enable consumption in common tools like Microsoft Excel. The resulting file will be stored in $HOME/Documents directory as `Mr_Studies.csv`.

#### Command(s) run
- `mrcli s --output=csv`
- `mrcli study --output=csv`

#### Screenshot of commands being run
<!-- Add screenshot here -->

### Screenshot of CSV imported into MacOS numbers
<!-- Add screenshot here -->

### Filter study outputs
The CLI offers the ability to filter outputs by almost any study attribute. This is manifest by two switches on the study sub-command one specific to finding studies by name, `--find_by_name` and the other by an arbitrary attribute, `--find_by_x`. Note all output format options, like JSON, CSV, etc., are available when the outputs are filtered. Finally, only exact matches are supported, meaning if you want to search for a study using any attribute you have to fully provide the attribute's value (i.e., "Med" would not match "Mediumroast Study", but "Mediumroast Study" would).

#### Filter a study by name
To zero in on a specific study using the find by name switch is provided.

#### Command(s) run
- `mrcli s --find_by_name="Foundation"`

#### Screenshot with output
<!-- Add screenshot here -->

#### Filter a study by attribute
Find a specific study by a particular attribute in the example below the switch filters on the attribute `status`.

#### Command(s) run
- `mrcli s --find_by_x='{"status": "0"}'`

#### Screenshot with output
<!-- Add screenshot here -->

## Initialize the Foundation study
Initializes the Foundation study with core attributes and data. This is the first step in setting up the Foundation study.

### Command(s) run
- `mrcli s --init_foundation`

### Screenshot with output
<!-- Add screenshot here -->

## Report on a study
Produce a report on a study. The report provides the most important insights per company in Microsoft Excel format as of the current release. The report is stored in the `$HOME/Documents` directory as `<study_name>.xlsx`.

### Command(s) run
- `mrcli s --report="Foundation"`

### Screenshot of the report
<!-- Add screenshot here -->

## Reset the status of a study
Reset the status of a study will cause Caffeine to reprocess the study on its next run. This is useful when the study has been updated and needs to be reprocessed.

### Command(s) run
- `mrcli s --reset_by_name="Foundation"`

### Screenshot with output
<!-- Add screenshot here -->
Loading