From 4e404b9c14f268e8c68370d2e6336fe0c2a370cb Mon Sep 17 00:00:00 2001 From: Marco Zocca Date: Fri, 23 Jun 2023 15:43:25 +0200 Subject: [PATCH] add stack.yaml in root dir --- .github/workflows/haskell.yml | 15 +------- README.md | 16 ++++---- ms-auth/README.md | 4 +- ms-auth/ms-auth.cabal | 2 +- ms-azure-api/README.md | 7 ++-- ms-graph-api-test/ms-graph-api-test.cabal | 8 ---- ms-graph-api-test/src/Lib.hs | 1 + ms-graph-api/README.md | 2 +- ms-graph-api/ms-graph-api.cabal | 2 +- stack.yaml | 46 +++++++++++++++++++++++ 10 files changed, 65 insertions(+), 38 deletions(-) create mode 100644 ms-graph-api-test/src/Lib.hs create mode 100644 stack.yaml diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index f7e238e..5d202e6 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -20,20 +20,7 @@ jobs: steps: - name: git checkout uses: actions/checkout@v3 - - name: Setup compiler, build and test - # working-directory: ./ms-graph-api + - name: Setup compiler, build and test all packages run: | - cd ms-azure-api/ - stack build --resolver ${{ matrix.stack-resolver }} stack test - - cd ../ms-graph-api/ - - stack build --no-install-ghc - stack test - - cd ../ms-auth/ - - stack build --no-install-ghc - stack test diff --git a/README.md b/README.md index 0e88411..0eef835 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ -# ms-api +# Haskell SDK for the Microsoft APIs -[![ms-graph-api-CI](https://github.com/unfoldml/ms-graph-api/actions/workflows/haskell.yml/badge.svg)](https://github.com/unfoldml/ms-graph-api/actions/workflows/haskell.yml) +[![CI](https://github.com/unfoldml/ms-graph-api/actions/workflows/haskell.yml/badge.svg)](https://github.com/unfoldml/ms-graph-api/actions/workflows/haskell.yml) -Haskell SDK for the Microsoft APIs - -| Service | Release | -|---|---| -| [Identity / Active Directory](https://learn.microsoft.com/en-us/graph/azuread-identity-access-management-concept-overview) | [![Hackage](https://img.shields.io/hackage/v/ms-auth?style=for-the-badge)](https://hackage.haskell.org/package/ms-auth) | -| [Graph](https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0) | [![Hackage](https://img.shields.io/hackage/v/ms-graph-api?style=for-the-badge)](https://hackage.haskell.org/package/ms-graph-api) | +| Service | Package name | Release | +|---|---|---| +| [Identity / Active Directory](https://learn.microsoft.com/en-us/graph/azuread-identity-access-management-concept-overview) | `ms-auth` | [![Hackage](https://img.shields.io/hackage/v/ms-auth?style=for-the-badge)](https://hackage.haskell.org/package/ms-auth) | +| [Graph](https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0) | `ms-graph-api` | [![Hackage](https://img.shields.io/hackage/v/ms-graph-api?style=for-the-badge)](https://hackage.haskell.org/package/ms-graph-api) | `ms-azure-api` | | [Azure](https://learn.microsoft.com/en-us/rest/api/azure/) | [![Hackage](https://img.shields.io/hackage/v/ms-azure-api?style=for-the-badge)](https://hackage.haskell.org/package/ms-azure-api) | @@ -32,7 +30,7 @@ In general, since the API surface is quite large, features will be added to this Some breaking changes might also be introduced as the library matures. -We adhere to a simplified version of the [Package Versioning Policy](https://pvp.haskell.org/): breaking changes are signaled by increasing the major version number (e.g. 0.x -> 1.x ). +We adhere to the [Package Versioning Policy](https://pvp.haskell.org/): major breaking changes or API refactors are signaled by increasing the first major version number (i.e. 0.0.0.0 -> 1.0.0.0 ) whereas less significant ones are indicated by increasing the second one (0.0.0.0 -> 0.1.0.0). Significant changes in the SDK will be documented in the respective CHANGELOG. diff --git a/ms-auth/README.md b/ms-auth/README.md index 96ea21b..8ea75fc 100644 --- a/ms-auth/README.md +++ b/ms-auth/README.md @@ -25,7 +25,9 @@ This library is functional but still in development. Some breaking changes might also be introduced as the library matures. -We adhere to a simplified version of the [Package Versioning Policy](https://pvp.haskell.org/): breaking changes are signaled by increasing the major version number (e.g. 0.x -> 1.x ). +We adhere to the [Package Versioning Policy](https://pvp.haskell.org/): major breaking changes or API refactors are signaled by increasing the first major version number (i.e. 0.0.0.0 -> 1.0.0.0 ) whereas less significant ones are indicated by increasing the second one (0.0.0.0 -> 0.1.0.0). + +Significant changes in the SDK will be documented in the respective CHANGELOG. ## Copyright diff --git a/ms-auth/ms-auth.cabal b/ms-auth/ms-auth.cabal index 039dd9b..c833646 100644 --- a/ms-auth/ms-auth.cabal +++ b/ms-auth/ms-auth.cabal @@ -1,7 +1,7 @@ name: ms-auth version: 0.2.0.0 synopsis: Microsoft Authentication API -description: Bindings to the Microsoft Identity API / Active Directory (AD) for building applications that use either Delegated or App-only permissions. Helper functions are provided for building OAuth2 authentication flows and keep tokens transactionally secure and up to date. +description: Bindings to the Microsoft Identity API / Active Directory (AD) for building applications that use either Authorization Code (User-facing) or (App-only) authorization flows. Helper functions are provided for building OAuth2 authentication flows and keep tokens transactionally secure and up to date. homepage: https://github.com/unfoldml/ms-api license: BSD3 license-file: LICENSE diff --git a/ms-azure-api/README.md b/ms-azure-api/README.md index 6690003..aef8dbe 100644 --- a/ms-azure-api/README.md +++ b/ms-azure-api/README.md @@ -1,6 +1,6 @@ # ms-azure-api -Haskell client bindings to the [Microsoft Azure API](). +Haskell client bindings to the [Microsoft Azure API](https://learn.microsoft.com/en-us/rest/api/azure/). [![Hackage](https://img.shields.io/hackage/v/ms-azure-api?style=for-the-badge)](https://hackage.haskell.org/package/ms-azure-api) @@ -9,7 +9,7 @@ Haskell client bindings to the [Microsoft Azure API](). ## Introduction -This library provides the client interface (under the `MSAzureAPI` namespace). +This library provides the client interface to the MS Azure API (under the `MSAzureAPI` namespace). Authentication can be implemented with the `ms-auth` library. @@ -24,8 +24,9 @@ In general, since the MS Azure API is quite large, features will be added to thi Some breaking changes might also be introduced as the library matures. -We adhere to a simplified version of the [Package Versioning Policy](https://pvp.haskell.org/): breaking changes are signaled by increasing the major version number (e.g. 0.x -> 1.x ). +We adhere to the [Package Versioning Policy](https://pvp.haskell.org/): major breaking changes or API refactors are signaled by increasing the first major version number (i.e. 0.0.0.0 -> 1.0.0.0 ) whereas less significant ones are indicated by increasing the second one (0.0.0.0 -> 0.1.0.0). +Significant changes in the SDK will be documented in the respective CHANGELOG. ## Copyright diff --git a/ms-graph-api-test/ms-graph-api-test.cabal b/ms-graph-api-test/ms-graph-api-test.cabal index 53edaac..6b3a21a 100644 --- a/ms-graph-api-test/ms-graph-api-test.cabal +++ b/ms-graph-api-test/ms-graph-api-test.cabal @@ -21,14 +21,6 @@ library exposed-modules: Lib build-depends: base >= 4.7 && < 5 ghc-options: -Wall - -Wcompat - -Widentities - -Wincomplete-record-updates - -Wincomplete-uni-patterns - -Wmissing-export-lists - -Wmissing-home-modules - -Wpartial-fields - -Wredundant-constraints executable ms-graph-api-test default-language: Haskell2010 diff --git a/ms-graph-api-test/src/Lib.hs b/ms-graph-api-test/src/Lib.hs new file mode 100644 index 0000000..6d85a26 --- /dev/null +++ b/ms-graph-api-test/src/Lib.hs @@ -0,0 +1 @@ +module Lib where diff --git a/ms-graph-api/README.md b/ms-graph-api/README.md index f7439cf..e03d80a 100644 --- a/ms-graph-api/README.md +++ b/ms-graph-api/README.md @@ -24,7 +24,7 @@ In general, since the MS Graph API is quite large, features will be added to thi Some breaking changes might also be introduced as the library matures. -We adhere to a simplified version of the [Package Versioning Policy](https://pvp.haskell.org/): breaking changes are signaled by increasing the major version number (e.g. 0.x -> 1.x ). +We adhere to the [Package Versioning Policy](https://pvp.haskell.org/): major breaking changes or API refactors are signaled by increasing the first major version number (i.e. 0.0.0.0 -> 1.0.0.0 ) whereas less significant ones are indicated by increasing the second one (0.0.0.0 -> 0.1.0.0) ## Copyright diff --git a/ms-graph-api/ms-graph-api.cabal b/ms-graph-api/ms-graph-api.cabal index fd18160..05e151c 100644 --- a/ms-graph-api/ms-graph-api.cabal +++ b/ms-graph-api/ms-graph-api.cabal @@ -1,5 +1,5 @@ name: ms-graph-api -version: 1.0.0.0 +version: 0.7.0.0 synopsis: Microsoft Graph API description: Bindings to the Microsoft Graph API homepage: https://github.com/unfoldml/ms-api diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..aa5847d --- /dev/null +++ b/stack.yaml @@ -0,0 +1,46 @@ +resolver: + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/26.yaml + +packages: +- ms-graph-api +- ms-graph-api-test +- ms-azure-api +- ms-auth + +# Dependency packages to be pulled from upstream that are not in the resolver. +# These entries can reference officially published versions as well as +# forks / in-progress versions pinned to a git hash. For example: +# +extra-deps: +- validation-micro-1.0.0.0 + +# extra-deps: +# - acme-missiles-0.3 +# - git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# +# extra-deps: [] + +# Override default flag values for local packages and extra-deps +# flags: {} + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of Stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=2.9" +# +# Override the architecture used by Stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by Stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor