diff --git a/README.md b/README.md
index 5326490..6155e9e 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,20 @@
-[![Version](https://img.shields.io/github/v/release/milosmns/code-stats?label=Latest&color=green)](./releases)
-[![Build Status](https://img.shields.io/github/actions/workflow/status/milosmns/code-stats/build-ga.yaml?label=Build)](./actions/workflows/build-ga.yaml)
-[![License: NT-GPL v3](https://img.shields.io/badge/License-NTGPLv3-blue)](./LICENSE)
-[![Issues](https://img.shields.io/github/issues-raw/milosmns/code-stats?label=Issues&color=gold)](./issues)
-[![Discussions](https://img.shields.io/github/discussions/milosmns/code-stats?label=Discussions&color=pink)](./discussions)
+[![Version](https://img.shields.io/github/v/release/milosmns/code-stats?label=Latest&color=green)](https://github.com/milosmns/code-stats/releases)
+
+[![Build Status](https://img.shields.io/github/actions/workflow/status/milosmns/code-stats/build-ga.yaml?label=Build)](https://github.com/milosmns/code-stats/actions/workflows/build-ga.yaml)
+
+[![License: NT-GPL v3](https://img.shields.io/badge/License-NTGPLv3-blue)](./LICENSE)
+
+[![Issues](https://img.shields.io/github/issues-raw/milosmns/code-stats?label=Issues&color=gold)](https://github.com/milosmns/code-stats/issues)
+
+[![Discussions](https://img.shields.io/github/discussions/milosmns/code-stats?label=Discussions&color=pink)](https://github.com/milosmns/code-stats/discussions)
+
[//]: # (Inspired by https://github.com/othneildrew/Best-README-Template/blob/master/BLANK_README.md)
-
+
### Built using
-[![Kotlin](https://img.shields.io/badge/kotlin-37F52FF.svg?style=for-the-badge&logo=kotlin&logoColor=white)](https://kotlinlang.org)
-[![Ktor](https://img.shields.io/badge/ktor-07405E.svg?style=for-the-badge&logo=kotlin&logoColor=white)](https://ktor.io)
-[![SQLDelight](https://img.shields.io/badge/SQL%20Delight-07405E.svg?style=for-the-badge&logo=kotlin&logoColor=white)](https://github.com/cashapp/sqldelight)
-[![SQLite](https://img.shields.io/badge/sqlite-FF405E.svg?style=for-the-badge&logo=sqlite&logoColor=white)](https://www.sqlite.org)
-
-[![HTML5](https://img.shields.io/badge/html5-E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)](https://www.w3schools.com/html)
-[![Bootstrap](https://img.shields.io/badge/bootstrap-8511FA.svg?style=for-the-badge&logo=bootstrap&logoColor=white)](https://getbootstrap.com)
-[![JavaScript](https://img.shields.io/badge/javascript-323330.svg?style=for-the-badge&logo=javascript&logoColor=F7DF1E)](https://www.javascript.com)
-[![Chart.js](https://img.shields.io/badge/chart.js-F5788D.svg?style=for-the-badge&logo=chart.js&logoColor=white)](https://www.chartjs.org)
+[![Kotlin](https://img.shields.io/badge/kotlin-37F52FF.svg?style=for-the-badge&logo=kotlin&logoColor=white)](https://kotlinlang.org)
+
+[![Ktor](https://img.shields.io/badge/ktor-07405E.svg?style=for-the-badge&logo=kotlin&logoColor=white)](https://ktor.io)
+
+[![SQLDelight](https://img.shields.io/badge/SQL%20Delight-07405E.svg?style=for-the-badge&logo=kotlin&logoColor=white)](https://github.com/cashapp/sqldelight)
+
+[![SQLite](https://img.shields.io/badge/sqlite-FF405E.svg?style=for-the-badge&logo=sqlite&logoColor=white)](https://www.sqlite.org)
+
+
+[![HTML5](https://img.shields.io/badge/html5-E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)](https://www.w3schools.com/html)
+
+[![Bootstrap](https://img.shields.io/badge/bootstrap-8511FA.svg?style=for-the-badge&logo=bootstrap&logoColor=white)](https://getbootstrap.com)
+
+[![JavaScript](https://img.shields.io/badge/javascript-323330.svg?style=for-the-badge&logo=javascript&logoColor=F7DF1E)](https://www.javascript.com)
+
+[![Chart.js](https://img.shields.io/badge/chart.js-F5788D.svg?style=for-the-badge&logo=chart.js&logoColor=white)](https://www.chartjs.org)
+
#### Support
@@ -56,7 +70,8 @@ However, the GitHub page leaves a lot to be desired.
For example, have you ever wondered about your project's [Cycle Time](https://tulip.co/blog/cycle-vs-lead-vs-takt)?
Are you blocking each other, or things are moving smoothly through your development pipeline?
Have you wondered about the evolution of this metric over time?
-This metric (and many more) can be computed using the raw contribution data available in code repositories and at GitHub.
+This metric (and many more) can be computed using the raw contribution data available
+in code repositories and at GitHub.
To make time theft more visible, Code Stats aims to provide an alternative interface to GitHub's insights pages.
Take a look at some of the examples below.
@@ -66,9 +81,10 @@ Take a look at some of the examples below.
## Getting Started
-The project is build with [Kotlin/Native](https://kotlinlang.org/docs/native-overview.html) (supporting multi-platform native binaries).
+The project is build with [Kotlin/Native](https://kotlinlang.org/docs/native-overview.html)
+(supporting multi-platform native binaries).
However, due to complications with the automation pipelines and some issues with Kotlin's native compiler (Konan),
-native binaries are
**temporarily** disabled.
+native binary outputs are
**temporarily** disabled.
For the time being, you can still use the packages available for the Java Virtual Machine (JVM).
@@ -83,7 +99,7 @@ This is done by setting an environment variable called `GITHUB_TOKEN`.
To run the JVM flavor, you need:
- * Java installed and available on the Path; OpenJDK is fine.
+* Java installed and available on the Path; OpenJDK is fine.
### Prerequisites for building
@@ -91,13 +107,14 @@ To run the JVM flavor, you need:
To build the JVM flavor, you need:
- * Java installed and available on the Path; OpenJDK is fine.
+* Java installed and available on the Path; OpenJDK is fine.
## How to run
##### JVM
-Simply download the latest version from [Releases](./releases) and run it using Java:
+Simply download the latest version from [Releases](https://github.com/milosmns/code-stats/releases)
+and run it using Java:
```console
$ java -jar codestats.jar --help
@@ -107,13 +124,15 @@ $ java -jar codestats.jar --help
##### JVM
-Clone the project's repository to your local machine. Then, from the project's root directory run:
+Clone the project's repository to your local machine.
+Then, from the project's root directory run:
```console
$ ./gradlew shadowJar
```
-Your output should be exactly the same as the [latest Release](./releases), and stored in `build/libs/codestats.jar`.
+Your output should be exactly the same as the [latest Release](https://github.com/milosmns/code-stats/releases),
+and stored in `build/libs/codestats.jar`.
## Usage
@@ -131,11 +150,11 @@ $ codestats --help
There are several modes that Code Stats can run in.
- 1. **Fetch** – fetches fresh contribution data and stores it locally for analysis
- 1. **Print** – calculates and prints all of the code stats (metrics) to `stdout`
- 1. **Report** – prints a short report on what data is available locally
- 1. **Serve** – launches a backend server locally, and prints the access URL for the web UI
- 1. **Purge** – deletes all locally stored data
+1. **Fetch** – fetches fresh contribution data and stores it locally for analysis
+1. **Print** – calculates and prints all the code stats (metrics) to `stdout`
+1. **Report** – prints a short report on what data is available locally
+1. **Serve** – launches a backend server locally, and prints the access URL for the web UI
+1. **Purge** – deletes all locally stored data
To choose a mode, simply add a `--mode` modifier:
@@ -155,10 +174,10 @@ owner: nasa # GitHub repository owner
startDate: 2023-01-01 # no data before this date
endDate: 2023-03-15 # no data after this date
-teams: # all teams you'd like to inspect
+teams: # all teams you'd like to inspect
- title: Flight Team # GitHub user-friendly team name
name: nasa-flight # GitHub team ID
- codeRepositories: # where the code lives
+ codeRepositories: # where the code lives
- openmct
- HyperCP
- cmr-stac
@@ -179,15 +198,15 @@ You can also refer to the [sample configuration file](./src/commonMain/resources
There are even more configuration options you can use as environment variables:
- *
`GITHUB_TOKEN` – the (mandatory) authentication token for communicating with GitHub
- * `GITHUB_URL` – a REST GitHub Enterprise URL; default is `api.github.com`
- * `GITHUB_GRAPHQL_URL` – a GraphQL GitHub Enterprise URL; default is `api.github.com/graphql`
- * `GITHUB_PAGING_LIMIT` – how many items to fetch per page (when paging); default is `100`
- * `GITHUB_VERBOSE` – whether to print verbose update in the console; default is `false`
- * `GITHUB_PRINT_PROGRESS` – whether to print progress updates for GitHub API fetch; default is `true`
- * `GITHUB_RATE_LIMIT_DELAY_MILLIS` – a rate-limiting delay for requests to GitHub; default is `2.1s`
- * `DATABASE_PATH` – which local database to use (file path); default is `code-stats.db`
- * `STATS_PORT_API` – on which port to launch the server for the web UI; default is `8080`
+*
`GITHUB_TOKEN` – the (mandatory) authentication token for communicating with GitHub
+* `GITHUB_URL` – a REST GitHub Enterprise URL; default is `api.github.com`
+* `GITHUB_GRAPHQL_URL` – a GraphQL GitHub Enterprise URL; default is `api.github.com/graphql`
+* `GITHUB_PAGING_LIMIT` – how many items to fetch per page (when paging); default is `100`
+* `GITHUB_VERBOSE` – whether to print verbose update in the console; default is `false`
+* `GITHUB_PRINT_PROGRESS` – whether to print progress updates for GitHub API fetch; default is `true`
+* `GITHUB_RATE_LIMIT_DELAY_MILLIS` – a rate-limiting delay for requests to GitHub; default is `2.1s`
+* `DATABASE_PATH` – which local database to use (file path); default is `code-stats.db`
+* `STATS_PORT_API` – on which port to launch the server for the web UI; default is `8080`
The executable will automatically read these variables and apply them before running.
@@ -200,5 +219,5 @@ To read the contributions guideline, go to [CONTRIBUTING](./CONTRIBUTING).
## License
-Distributed under the Non-Toxic GNU GPL v3 License.
+Distributed under the Non-Toxic GNU GPL v3 License.
See [LICENSE](./LICENSE) for more information about this particular license.
diff --git a/build.gradle.kts b/build.gradle.kts
index 33c6fa0..fc3eabf 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,6 +8,7 @@ import org.gradle.internal.impldep.org.joda.time.LocalDateTime
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinTargetContainerWithPresetFunctions
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmCompilation
+import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTests
plugins {
application
@@ -97,20 +98,20 @@ kotlin {
}
// used by the 'getting' delegate
- @Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
- val macNativeMain by getting {
- dependsOn(commonMain)
- dependencies {
- implementation("io.ktor:ktor-client-curl:2.3.+")
- implementation("app.cash.sqldelight:native-driver:2.+")
- }
- }
+// @Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
+// val macNativeMain by getting {
+// dependsOn(commonMain)
+// dependencies {
+// implementation("io.ktor:ktor-client-curl:2.3.+")
+// implementation("app.cash.sqldelight:native-driver:2.+")
+// }
+// }
// used by the 'getting' delegate
- @Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
- val macNativeTest by getting {
- dependsOn(commonTest)
- }
+// @Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
+// val macNativeTest by getting {
+// dependsOn(commonTest)
+// }
}
@@ -409,9 +410,11 @@ class Configurator(private val env: Env, private val output: Output) {
println("Configured Kotlin target '$name'")
}
- fun configureNativeTarget(container: KotlinTargetContainerWithPresetFunctions) =
+ @Suppress("USELESS_CAST", "UNUSED_PARAMETER")
+ fun configureNativeTarget(container: KotlinTargetContainerWithPresetFunctions): KotlinNativeTargetWithHostTests? =
when (env.currentPlatform) {
- Env.Platform.MAC -> null // TODO – disabled temporarily until the build is fixed
+ // TODO – disabled temporarily until the build is fixed
+ Env.Platform.MAC -> null as? KotlinNativeTargetWithHostTests?
// when (env.currentArch) {
// Env.Arch.X86 -> container.macosX64(env.currentPlatform.targetName)
// Env.Arch.ARM -> container.macosArm64(env.currentPlatform.targetName)
diff --git a/gradle.properties b/gradle.properties
index 7c17d07..72543c5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -9,6 +9,6 @@ org.gradle.jvmargs=-Xmx4096m
# Project properties
config.group = xyz.marinkovic.milos
config.artifact = codestats
-config.version = 0.8.0
+config.version = 0.9.0
config.gitHubRepoOwner = milosmns
config.gitHubRepoName = code-stats