Skip to content
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
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Moderation

For any questions, concerns, or moderation requests, please contact us on
[Gitter channel](https://gitter.im/fingo-spata/community) or directly per email:
- [Robert Marek](mailto:robert.marek@fingo.info),
- [Piotr Chowaniec](mailto:piotr.chowaniec@fingo.info).
- [Robert Marek](mailto:robert@marek.net),
- [Kacper Korban](mailto:kacper.f.korban@gmail.com).

Domain
------
Expand Down
23 changes: 15 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
lazy val basicSettings = Seq(
organization := "info.fingo",
organizationName := "FINGO sp. z o.o.",
organizationHomepage := Some(url("http://fingo.info")),
homepage := Some(url("https://github.com/fingo/spata")),
organization := "dev.sovt",
organizationName := "sovt",
homepage := Some(url("https://github.com/sovt/spata")),
startYear := Some(2020),
name := "spata",
description := "Functional, stream based CSV processor for Scala",
Expand All @@ -27,8 +26,6 @@ lazy val root = (project in file("."))
.configs(PerformanceTest)
.settings(
versionScheme := Some("semver-spec"),
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax,
headerEmptyLine := false,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "3.6.0",
"co.fs2" %% "fs2-core" % "3.12.0",
Expand All @@ -50,13 +47,23 @@ lazy val root = (project in file("."))
scalacOptions ++= scalacSettings,
Compile / console / scalacOptions --= Seq("-Xfatal-warnings"),
Test / scalacOptions --= Seq("-Wnonunit-statement"),
mimaPreviousArtifacts := Set("info.fingo" %% "spata" % "3.2.0"),
mimaPreviousArtifacts := Set.empty,
semanticdbEnabled := true,
autoAPIMappings := true
)

lazy val licenseSettings = Seq(
licenses += ("Apache-2.0", new URI("https://www.apache.org/licenses/LICENSE-2.0.txt").toURL),
headerLicense := Some(
HeaderLicense.Custom(
"""|Copyright 2020-2025 FINGO sp. z o.o.
|Copyright 2025 sovt contributors
|
|SPDX-License-Identifier: Apache-2.0
|""".stripMargin
)
),
headerEmptyLine := false,
licenseCheckAllow := Seq(
LicenseCategory.Apache,
LicenseCategory.BouncyCastle,
Expand All @@ -67,7 +74,7 @@ lazy val licenseSettings = Seq(
LicenseCategory.JSON,
LicenseCategory.Unicode
),
developers := List(Developer("susuro", "Robert Marek", "robert.marek@fingo.info", url("https://github.com/susuro")))
developers := List(Developer("susuro", "Robert Marek", "robert@marek.net", url("https://github.com/susuro")))
)

lazy val scalacSettings = Seq(
Expand Down
8 changes: 4 additions & 4 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ How to help
-----------

Different kinds of contributions are welcome, including, but not limited to:
* improvements in the documentation - scope, accuracy, clarity and language,
* improvements in the documentation - scope, accuracy, clarity and language,
* providing additional examples on how to use the library,
* reporting and fixing bugs,
* refactoring existing code and enhancing tests,
Expand All @@ -20,7 +20,7 @@ Proposing and submitting a change

If you would like to make any changes to the project, please:

* let us know about this by commenting on an existing [issue](https://github.com/fingo/spata/issues)
* let us know about this by commenting on an existing [issue](https://github.com/sovt/spata/issues)
or creating a new one and describing your idea,

* fork and build the project,
Expand All @@ -31,7 +31,7 @@ If you would like to make any changes to the project, please:

* submit a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).

spata follows a standard [fork and pull](https://guides.github.com/activities/forking/) model for contributions.
spata follows a standard [fork and pull](https://guides.github.com/activities/forking/) model for contributions.

### Building the project

Expand Down Expand Up @@ -68,7 +68,7 @@ sbt -mem 2048 clean check doc test mimaReportBinaryIssues perf:test

Grant of license
----------------
spata is licensed under [Apache-2.0](https://github.com/fingo/spata/blob/master/LICENSE).
spata is licensed under [Apache-2.0](https://github.com/sovt/spata/blob/master/LICENSE).
Opening a pull request implies your consent to license your contribution under Apache License 2.0.

Attributions
Expand Down
108 changes: 73 additions & 35 deletions migration.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,45 @@
Migration notes
===============

This file described changes to be made while upgrading **spata** between incompatible versions.
This file described changes to be made while upgrading **spata** between incompatible versions.

Upgrading to 2.x from 1.x
Upgrading to 4.x from 3.x
-------------------------

**spata 2** introduces rendering functionality.
Some changes to API were required to keep parsing and rendering in pair with each other.
Others were made to improve the API taking the opportunity of already broken compatibility.
**spata** has been transferred from `FINGO` to `sovt` organization, causing changes in package namespace and sbt coordinates.
License and contribution information have been updated accordingly

### Configuration
### sbt build file adjustment

* Call `parser[F]` instead of `get[F]()` to create parser for given configuration.
* Omit parentheses in calls to `noHeader` and `stripSpaces` methods.

E.g. instead of
```scala
val parser = CSVConfig().noHeader().get[IO]()
Replace
```sbt
libraryDependencies += "info.fingo" %% "spata" % "<version>"
```
write
```scala
val parser = CSVConfig().noHeader.parser[IO]
with
```sbt
libraryDependencies += "dev.sovt" %% "spata" % "<version>"
```
The latest version may be found on the badge in the readme file.

### Parsing

* Omit parentheses while calling `CSVParser.apply` (e.g. `CSVParser[IO]`).

### Reading data
### Import changes

* Replace `io.reader` object with `io.Reader`.
* Omit parentheses in calls to `apply`, `plain`, and `shifting`.

E.g. instead of
```scala
val stream = reader[IO]().read(Paths.get("source.csv"))
All imports
```Scala
import info.fingo.spata.Foo
```
write
```scala
val stream = Reader[IO].read(Paths.get("source.csv"))
have to be changed to
```Scala
import dev.sovt.spata.Foo
```

### Miscellaneous
### License and Attribution Considerations

* Methods with arity-0 have been stripped of parentheses where feasible because they do not have side effects.
* Many classes and traits have been declared final or sealed.
* `Reader` trait has been moved from `reader` object into `io` package.
The license text remains unchanged, but attribution should reflect the new maintainers:

```text
Copyright 2020–2025 FINGO sp. z o.o.
Copyright 2025 sovt contributors
```

Upgrading to 3.x from 2.x
-------------------------
Expand All @@ -62,7 +55,7 @@ Second, Cats Effect 3 introduced breaking changes, which in turn made FS2 v3 inc
This required changes in the areas involving effect handling, concurrency and io.

spata 3 has been fully ported to Scala 3, adapting new constructs and braceless style.
spata 2 is being maintained on [seprate branch](https://github.com/fingo/spata/tree/spata2).
spata 2 is being maintained on [seprate branch](https://github.com/sovt/spata/tree/spata2).

### Record conversion

Expand Down Expand Up @@ -105,7 +98,7 @@ Thread pool assigment for blocking io is handled by runtime based on information
For more information about new threading model for io and the ways to control this behavior see
[Cats Effect 3 migration guide](https://typelevel.org/cats-effect/docs/migration-guide#blocker).

This removal simplifies the `Reader.Shifting` and `Writer.Shifting` APIs -
This removal simplifies the `Reader.Shifting` and `Writer.Shifting` APIs -
no blocker is provided as a parameter anymore. Instead of
```scala
Stream.resource(Blocker[IO]).flatMap { blocker =>
Expand Down Expand Up @@ -135,3 +128,48 @@ as in this case this modified default behaviour may negatively influnce performa
* As a consequence of replacing `implicit` with `given`/`using`,
if any implicit method argument is provided explicitly,
it has to be preceded by `using` keyword.

Upgrading to 2.x from 1.x
-------------------------

**spata 2** introduces rendering functionality.
Some changes to API were required to keep parsing and rendering in pair with each other.
Others were made to improve the API taking the opportunity of already broken compatibility.

### Configuration

* Call `parser[F]` instead of `get[F]()` to create parser for given configuration.
* Omit parentheses in calls to `noHeader` and `stripSpaces` methods.

E.g. instead of
```scala
val parser = CSVConfig().noHeader().get[IO]()
```
write
```scala
val parser = CSVConfig().noHeader.parser[IO]
```

### Parsing

* Omit parentheses while calling `CSVParser.apply` (e.g. `CSVParser[IO]`).

### Reading data

* Replace `io.reader` object with `io.Reader`.
* Omit parentheses in calls to `apply`, `plain`, and `shifting`.

E.g. instead of
```scala
val stream = reader[IO]().read(Paths.get("source.csv"))
```
write
```scala
val stream = Reader[IO].read(Paths.get("source.csv"))
```

### Miscellaneous

* Methods with arity-0 have been stripped of parentheses where feasible because they do not have side effects.
* Many classes and traits have been declared final or sealed.
* `Reader` trait has been moved from `reader` object into `io` package.
12 changes: 6 additions & 6 deletions publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Preparations

* Create personal Sonatype repository account through [Sonatype Central](https://central.sonatype.com/api/auth/login).

* Claim access to `fingo.info` domain through [Publish Settings](https://central.sonatype.com/publishing/namespaces).
* Claim access to `sovt.dev` domain through [Publish Settings](https://central.sonatype.com/publishing/namespaces).

* Create a user toke through [Account](https://central.sonatype.com/account).

Expand All @@ -24,7 +24,7 @@ Preparations

* Generate a key pair: `gpg --gen-key`:
* provide `spata bot` as name,
* provide your personal email (optimally in `fingo.info` domain).
* provide your personal email (optimally in `sovt.dev` domain).

* Note the key id for later use.

Expand All @@ -36,17 +36,17 @@ Preparations
### Configure Github Actions

* Add Sonatype token (`SONATYPE_USERNAME` and `SONATYPE_PASSWORD`) to
[Github repository secrets](https://github.com/fingo/spata/settings/secrets/actions)
[Github repository secrets](https://github.com/sovt/spata/settings/secrets/actions)

* Retrieve the PGP key: `gpg --armor --export-secret-keys <key-id> | base64 | pbcopy`
(this is MacOS specific command, for other platforms see
[Library Author Guide](https://docs.scala-lang.org/overviews/contributors/index.html#export-your-pgp-key-pair))

* Add PGP key (`PGP_SECRET`) to
[Github repository secrets](https://github.com/fingo/spata/settings/secrets/actions)
[Github repository secrets](https://github.com/sovt/spata/settings/secrets/actions)

* Add PGP key passphrase (`PGP_PASSPHRASE`) to
[Github repository secrets](https://github.com/fingo/spata/settings/secrets/actions)
[Github repository secrets](https://github.com/sovt/spata/settings/secrets/actions)

Cutting a release
-----------------
Expand All @@ -55,7 +55,7 @@ A release process uses [sbt-dynver](https://github.com/dwijnand/sbt-dynver) and
* Set a tag: `git tag -a v<version> -m <info>`.
* Push it: `git push --tags`.

After this, draft a new release in [GitHub](https://github.com/fingo/spata/releases).
After this, draft a new release in [GitHub](https://github.com/sovt/spata/releases).

Revoking keys
-------------
Expand Down
Loading
Loading