Skip to content

Commit

Permalink
Merge pull request #588 from refinedmods/refactor/GH-584/rs-ref
Browse files Browse the repository at this point in the history
Rename "refinedstorage2" to "refinedstorage"
  • Loading branch information
raoulvdberge authored Jul 4, 2024
2 parents 504b6ef + a98df11 commit 095b354
Show file tree
Hide file tree
Showing 5,820 changed files with 78,349 additions and 78,413 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Use via: git config --local --add blame.ignoreRevsFile .git-blame-ignore-revs

# Rename "refinedstorage2" to "refinedstorage"
03d02f1e07e1e6e9726404c236c3af227126ade0
47 changes: 24 additions & 23 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ These are the most important things to know before contributing (also explained
Category must match a
category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum).
- We use [Checkstyle](https://checkstyle.sourceforge.io/) in our build workflow to validate coding style. It is
recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml) or [config/intellij-code-style.xml](../config/intellij-code-style.xml) file into your
recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml)
or [config/intellij-code-style.xml](../config/intellij-code-style.xml) file into your
IDE, so that formatting rules are respected.
- Branches are kept up to date by rebasing, not by merging.
- For non-technical changes, adding a changelog entry is required.
Expand Down Expand Up @@ -98,7 +99,8 @@ from [API Guardian](https://github.com/apiguardian-team/apiguardian).

We use [Checkstyle](https://checkstyle.sourceforge.io/) in our build workflow to validate coding style.

It is recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml) or [config/intellij-code-style.xml](../config/intellij-code-style.xml) file into your
It is recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml)
or [config/intellij-code-style.xml](../config/intellij-code-style.xml) file into your
IDE, so that formatting rules are respected.

Moreover, the [CheckStyle-IDEA plugin](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) can be used to check
Expand Down Expand Up @@ -132,13 +134,13 @@ Tests in the API modules are regular unit tests. Don't see a "unit" here as a co
These tests don't rely on, nor know about, Minecraft.

Additionally, tests in the `refinedstorage2-network` module use the `refinedstorage2-network-test` JUnit plugin to
Additionally, tests in the `refinedstorage-network` module use the `refinedstorage-network-test` JUnit plugin to
easily set up networks for testing.

### Integration testing

To test the entire chain from Minecraft to the API modules, we use integration tests. These tests are located in the
test source set of the `refinedstorage2-platform-forge` module.
test source set of the `refinedstorage-platform-neoforge` module.

We write these integration tests as Minecraft gametests.

Expand All @@ -148,7 +150,7 @@ Our [SonarQube quality gate](https://sonarcloud.io/organizations/refinedmods/qua
test coverage percentage of 80%. This an aggregated percentage over all
the API modules, with an exclusion for the platform modules.

> The `refinedstorage2-platform-*` modules are excluded because they contain a lot of Minecraft-specific code and are
> The `refinedstorage-platform-*` modules are excluded because they contain a lot of Minecraft-specific code and are
> harder to test.
### Mutation testing
Expand Down Expand Up @@ -258,23 +260,22 @@ The workflow takes care of the following:

## Modules

Refined Storage 2 is split up into various modules.
Refined Storage is split up into various modules.

Most modules aren't dependent on Minecraft or a mod loader. Only modules that start
with `refinedstorage2-platform-*` have dependencies on Minecraft.

| Name | Use in addons | Description |
|-----------------------------------|---------------|----------------------------------------------------------------------------------------------------|
| `refinedstorage2-core-api` | ✔️ | Contains some utility classes and enums. |
| `refinedstorage2-grid-api` | ✔️ | Contains Grid related functionality. |
| `refinedstorage2-network-api` | ✔️ | Contains storage network related functionality. |
| `refinedstorage2-network` || Contains implementations of `refinedstorage2-network-api`. |
| `refinedstorage2-network-test` | ✔️ | JUnit extension which helps with setting up a network and a network node for testing. |
| `refinedstorage2-query-parser` | ✔️ | A query parser, contains a lexer and parser. Only used for Grid query parsing. |
| `refinedstorage2-resource-api` | ✔️ | Contains API for handling resources. |
| `refinedstorage2-storage-api` | ✔️ | Contains storage related functionality. |
| `refinedstorage2-platform-api` | ✔️ | Implements the various Refined Storage API modules for use in Minecraft. |
| `refinedstorage2-platform-test` | ✔️ | This module is used in platform tests for various Minecraft related helpers. |
| `refinedstorage2-platform-fabric` || The platform module for Fabric. This module contains Fabric specific code. |
| `refinedstorage2-platform-forge` || The platform module for Forge. This module contains Forge specific code and the integration tests. |
| `refinedstorage2-platform-common` || Common mod code. Most gameplay code is in here. |
with `refinedstorage-platform-*` have dependencies on Minecraft.

| Name | Use in addons | Description |
|----------------------------------|---------------|----------------------------------------------------------------------------------------------------|
| `refinedstorage-core-api` | ✔️ | Contains some utility classes and enums. |
| `refinedstorage-grid-api` | ✔️ | Contains Grid related functionality. |
| `refinedstorage-network-api` | ✔️ | Contains storage network related functionality. |
| `refinedstorage-network` || Contains implementations of `refinedstorage-network-api`. |
| `refinedstorage-network-test` | ✔️ | JUnit extension which helps with setting up a network and a network node for testing. |
| `refinedstorage-query-parser` | ✔️ | A query parser, contains a lexer and parser. Only used for Grid query parsing. |
| `refinedstorage-resource-api` | ✔️ | Contains API for handling resources. |
| `refinedstorage-storage-api` | ✔️ | Contains storage related functionality. |
| `refinedstorage-platform-api` | ✔️ | Implements the various Refined Storage API modules for use in Minecraft. |
| `refinedstorage-platform-fabric` || The platform module for Fabric. This module contains Fabric specific code. |
| `refinedstorage-platform-forge` || The platform module for Forge. This module contains Forge specific code and the integration tests. |
| `refinedstorage-platform-common` || Common mod code. Most gameplay code is in here. |
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body:
label: How can we reproduce this bug or crash?
description: |
Provide us with steps on how to reproduce this issue.
Try to reproduce the issue with only Refined Storage 2 installed, if possible.
Try to reproduce the issue with only Refined Storage installed, if possible.
placeholder: |
1.
2.
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ eclipse/
*.ipr
*.iws
.idea/
!.idea/dictionaries/refinedstorage2.xml
!.idea/dictionaries/refinedstorage.xml
!.idea/icon.png
out/
/bin/
Expand Down
9 changes: 0 additions & 9 deletions .idea/dictionaries/refinedstorage2.xml

This file was deleted.

12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Quartz Enriched Copper, used to craft cables.
- Block of Quartz Enriched Copper

### Changed

- The mod ID has been changed from "refinedstorage2" to "refinedstorage". Worlds that used milestone 3 on Minecraft 1.20.4 are no longer compatible.
- Recipes now use common tag conventions from NeoForge and Fabric.

### Fixed

- Regulator Upgrade having wrong GUI title.
- Crafting Grid not dropping crafting matrix contents when broken.
- "+1" amount screen button not doing anything.

### Changed

- Internal data format for storages. Storages from milestone 3 are incompatible and will not be transferred.
- Recipes now use common tag conventions from NeoForge and Fabric.
- "+1" button on amount screen not doing anything.

## [2.0.0-milestone.3.14] - 2024-06-28

Expand Down
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
apply from: "https://raw.githubusercontent.com/refinedmods/refinedarchitect/v${gradle.ext.refinedArchitectVersion}/helper.gradle"

subprojects {
group = 'com.refinedmods.refinedstorage2'
group = 'com.refinedmods.refinedstorage'

ext {
apis = [
':refinedstorage2-core-api',
':refinedstorage2-resource-api',
':refinedstorage2-storage-api',
':refinedstorage2-network-api',
':refinedstorage2-network',
':refinedstorage2-grid-api',
':refinedstorage2-query-parser'
':refinedstorage-core-api',
':refinedstorage-resource-api',
':refinedstorage-storage-api',
':refinedstorage-network-api',
':refinedstorage-network',
':refinedstorage-grid-api',
':refinedstorage-query-parser'
]
compileApis = [':refinedstorage2-platform-api']
compileApis = [':refinedstorage-platform-api']
}
}

enableSonarQube("refinedmods_refinedstorage2")

sonarqube {
properties {
property "sonar.coverage.exclusions", "refinedstorage2-platform-forge/**/*,refinedstorage2-platform-fabric/**/*,refinedstorage2-platform-common/**/*,refinedstorage2-platform-api/**/*"
property "sonar.coverage.exclusions", "refinedstorage-platform-neoforge/**/*,refinedstorage-platform-fabric/**/*,refinedstorage-platform-common/**/*,refinedstorage-platform-api/**/*"
}
}
2 changes: 1 addition & 1 deletion config/checkstyle/checkstyle-imports.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE import-control PUBLIC
"-//Checkstyle//DTD ImportControl Configuration 1.4//EN"
"https://checkstyle.org/dtds/import_control_1_4.dtd">
<import-control pkg="com.refinedmods.refinedstorage2" strategyOnMismatch="allowed">
<import-control pkg="com.refinedmods.refinedstorage" strategyOnMismatch="allowed">
<disallow pkg="org.jetbrains.annotations"/>
<disallow pkg="org.apache.logging.log4j"/>
</import-control>
4 changes: 2 additions & 2 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ base_path: .
pull_request_labels:
- skip-changelog
files:
- source: /refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json
translation: /refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/%locale_with_underscore%.json
- source: /refinedstorage-platform-common/src/main/resources/assets/refinedstorage/lang/en_us.json
translation: /refinedstorage-platform-common/src/main/resources/assets/refinedstorage/lang/%locale_with_underscore%.json
languages_mapping:
locale_with_underscore:
af: af_za
Expand Down
4 changes: 2 additions & 2 deletions doc/architecture/decision/001-multi-loader-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ should support this design goal in a maintainable way.

## Decision

Refined Storage 2 will have a modular structure with a module per modloader.
Refined Storage will have a modular structure with a module per modloader.

There will be a common module, and most code should reside in there. The modloader specific (platform) modules should be
reserved
for platform specific functionality, like registration, networking, etc.

The module naming follows the standard of `refinedstorage2-platform-{name}`.
The module naming follows the standard of `refinedstorage-platform-{name}`.

## Consequences

Expand Down
4 changes: 2 additions & 2 deletions doc/architecture/decision/002-api-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ business logic shouldn't change due to a Minecraft update.

## Decision

Refined Storage 2 will have multiple API modules that have no dependency on Minecraft whatsoever.
Refined Storage will have multiple API modules that have no dependency on Minecraft whatsoever.
These modules can depend on each other, but the dependency chain should be logical.

These API modules can be consumed by platform modules (to bundle them) [[1]](#1) and addon developers.

The platform modules [[1]](#1) are responsible for integrating the modules with Minecraft, by implementing interfaces on
their end that the API modules can use.

The API modules have the name `refinedstorage2-{name}-api`.
The API modules have the name `refinedstorage-{name}-api`.

## Consequences

Expand Down
6 changes: 3 additions & 3 deletions doc/architecture/decision/003-the-platform-api-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Refined Storage 1).

## Decision

Refined Storage 2 will have a modloader-neutral (just like the common module) platform API module which addon mods can
Refined Storage will have a modloader-neutral (just like the common module) platform API module which addon mods can
use to integrate with Refined Storage.

Moreover, Refined Storage 2 itself will use this platform API module.
Moreover, Refined Storage itself will use this platform API module.

The module is named `refinedstorage2-platform-api`.
The module is named `refinedstorage-platform-api`.

## Consequences

Expand Down
2 changes: 1 addition & 1 deletion doc/architecture/decision/004-coverage-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Luckily, since our most important (business-logic) code resides in the API modul
our testing focus there and establish coverage requirements.

However, sometimes it is still advised to write a test for platform code, even if there are no coverage requirements for
it. For that reason, the `refinedstorage2-platform-test` module exists, to provide helpers to deal with Minecraft code.
it. For that reason, the `refinedstorage-platform-test` module exists, to provide helpers to deal with Minecraft code.

## Consequences

Expand Down
4 changes: 2 additions & 2 deletions doc/architecture/decision/005-unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Accepted
The coverage requirements [[1]](#1) for the API modules [[2]](#2) state that we need unit test coverage. Hence, we need
to clarify what "unit" in unit test means.

The API modules in Refined Storage 2 are already disconnected from reality (Minecraft), so we need unit tests that
The API modules in Refined Storage are already disconnected from reality (Minecraft), so we need unit tests that
closely mimick real situations and assert real behavior if we want to get any value out of them.

This eliminates the definition that most
people have of unit tests, which is to test "a single method" and to mock dependencies of the class of that method.

## Decision

Refined Storage 2 unit testing will follow a behavior driven approach, where "unit" in unit test means "unit of
Refined Storage unit testing will follow a behavior driven approach, where "unit" in unit test means "unit of
behavior" and not "unit of method".

## Consequences
Expand Down
4 changes: 2 additions & 2 deletions doc/architecture/decision/006-no-persistent-networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ with block entities in non-conventional ways.

## Decision

Networks cannot be persisted in Refined Storage 2. They need to be loaded in memory.
Networks cannot be persisted in Refined Storage. They need to be loaded in memory.

Network nodes cannot be persisted in Refined Storage 2. All persistent data should be stored on corresponding the block
Network nodes cannot be persisted in Refined Storage. All persistent data should be stored on corresponding the block
entity.

## Consequences
Expand Down
4 changes: 2 additions & 2 deletions doc/architecture/decision/010-shared-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Accepted

## Context

Refined Storage 2 has the concept of a storage channel. A storage channel is the highest-level storage of a network. It
Refined Storage has the concept of a storage channel. A storage channel is the highest-level storage of a network. It
is used by other network devices to interact with the storage network.

As Refined Storage 2 supports multiple resource types, we must decide how we partition those resource types.
As Refined Storage supports multiple resource types, we must decide how we partition those resource types.

## Decision

Expand Down
21 changes: 21 additions & 0 deletions refinedstorage-core-api/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id 'java-library'
}

archivesBaseName = 'refinedstorage-core-api'

dependencies {
api libs.apiguardian
testImplementation libs.junit.api
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
testImplementation libs.assertj
}

test {
useJUnitPlatform()
}

enableMutationTesting()
enableJavadoc()
enablePublishing()
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.refinedmods.refinedstorage.api.core;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.1.0")
public enum Action {
SIMULATE,
EXECUTE
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.api.core;
package com.refinedmods.refinedstorage.api.core;

import java.util.Collection;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.api.core;
package com.refinedmods.refinedstorage.api.core;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.api.core.component;
package com.refinedmods.refinedstorage.api.core.component;

import org.apiguardian.api.API;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.api.core.component;
package com.refinedmods.refinedstorage.api.core.component;

import java.util.Collection;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.api.core.component;
package com.refinedmods.refinedstorage.api.core.component;

import java.util.LinkedHashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.api.core.component;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

import javax.annotation.ParametersAreNonnullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.api.core;

import javax.annotation.ParametersAreNonnullByDefault;
19 changes: 19 additions & 0 deletions refinedstorage-core-api/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"schemaVersion": 1,
"id": "refinedstorage-core-api",
"version": "${version}",
"name": "Refined Storage Core API",
"authors": [
"Refined Mods"
],
"license": "MIT",
"environment": "*",
"custom": {
"modmenu": {
"parent": "refinedstorage",
"badges": [
"library"
]
}
}
}
Loading

0 comments on commit 095b354

Please sign in to comment.