This repository was archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Clarify Release Process #61
Open
arnoweiss
wants to merge
21
commits into
development
Choose a base branch
from
bugfix/clarifyVersioningDocs
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
45719f3
Add workflow for building documentation
Daespen 48e3f3a
Update documentation with regard to CI
Daespen 13ac472
Fix docfx workflow to remove unnecessary condition
Daespen dfecd73
Merge pull request #48 from Daespen/feature/docfxworkflow
FrankSchnicke 3a1cb02
fixed bug with de-/serialization of Reference (now using camel case n…
mjacoby 1dfd9d8
- improved versioning schema
mjacoby b017431
Merge pull request #51 from admin-shell-io/feature/deploy-to-sonatype
sebbader dd9afc7
fix potential NPE
mjacoby d05d035
- now serializing AssetInformation.specificAssetId (using custom form…
mjacoby 02455ba
Updates deployment action
FrankSchnicke e31c54b
Fixes wrong repository reference in docs
FrankSchnicke 3d32a74
Updates POM version to 1.2.1-SNAPSHOT
FrankSchnicke a127c87
Merge pull request #52 from admin-shell-io/bugfix/aml-serializer
FrankSchnicke b38c1b0
Merge branch 'bugfix/serialization' into bugfix/reference-deserializa…
FrankSchnicke 4994af4
Fixed simple example to match new enum serialization pattern
mjacoby 70244ad
Merge pull request #50 from admin-shell-io/bugfix/reference-deseriali…
FrankSchnicke d14bc2e
Updates version to 1.2.1
FrankSchnicke 9879b22
Merge pull request #53 from admin-shell-io/bugfix/serialization
FrankSchnicke 4ef1837
Update README.md
sebbader da25f0f
clarify docs on development and release process
a0d6da4
reintroduce snapshots
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # This workflow will build and publish documentation with docfx | ||
| # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | ||
|
|
||
| name: Documentation Publish | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| build_docs: | ||
| runs-on: ubuntu-latest | ||
| name: Build and publish documentation | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v1 | ||
|
|
||
| - name: Build docfx | ||
| uses: nikeee/[email protected] | ||
| with: | ||
| args: docs/docfx.json | ||
|
|
||
| - name: Publish | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: docs/_site | ||
| force_orphan: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,8 @@ | |
| name: Generate and Deploy to Sonatype | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
...aas/v3/dataformat/aml/deserialization/mappers/IdentifierKeyValuePairCollectionMapper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| /* | ||
| * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package io.adminshell.aas.v3.dataformat.aml.deserialization.mappers; | ||
|
|
||
| import io.adminshell.aas.v3.dataformat.aml.deserialization.AmlParser; | ||
| import io.adminshell.aas.v3.dataformat.aml.deserialization.DefaultMapper; | ||
| import io.adminshell.aas.v3.dataformat.aml.deserialization.MappingContext; | ||
| import io.adminshell.aas.v3.dataformat.aml.model.caex.AttributeType; | ||
| import io.adminshell.aas.v3.dataformat.aml.model.caex.CAEXObject; | ||
| import io.adminshell.aas.v3.dataformat.core.util.AasUtils; | ||
| import io.adminshell.aas.v3.dataformat.mapping.MappingException; | ||
| import io.adminshell.aas.v3.model.IdentifierKeyValuePair; | ||
| import java.beans.PropertyDescriptor; | ||
|
|
||
| import java.lang.reflect.InvocationTargetException; | ||
| import java.util.ArrayList; | ||
| import java.util.Collection; | ||
| import java.util.List; | ||
| import java.util.logging.Level; | ||
| import java.util.logging.Logger; | ||
|
|
||
| public class IdentifierKeyValuePairCollectionMapper extends DefaultMapper<Collection<IdentifierKeyValuePair>> { | ||
|
|
||
| @Override | ||
| protected Collection mapCollectionValueProperty(AmlParser parser, MappingContext context) throws MappingException { | ||
| Collection result = new ArrayList<>(); | ||
| CAEXObject current = parser.getCurrent(); | ||
| AttributeType parent = findAttribute(current, context.getProperty(), context); | ||
| if (parent == null) { | ||
| return result; | ||
| } | ||
| List<AttributeType> attributes = findAttributes(parent, x -> x.getName().startsWith("specificAssetId")); | ||
| for (AttributeType attribute : attributes) { | ||
| parser.setCurrent(attribute); | ||
| try { | ||
| IdentifierKeyValuePair element = context.getTypeFactory().newInstance(IdentifierKeyValuePair.class); | ||
| for (PropertyDescriptor property : AasUtils.getAasProperties(IdentifierKeyValuePair.class)) { | ||
| Object propertyValue = context | ||
| .with(element) | ||
| .with(property) | ||
| .withoutType() | ||
| .map(property.getReadMethod().getGenericReturnType(), parser); | ||
| if (propertyValue != null) { | ||
| try { | ||
| property.getWriteMethod().invoke(element, propertyValue); | ||
| } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { | ||
| throw new MappingException(String.format("error setting property value for property %s", property.getName()), ex); | ||
| } | ||
| } | ||
| } | ||
| parser.setCurrent(attribute); | ||
| result.add(element); | ||
| } catch (NoSuchMethodException ex) { | ||
| Logger.getLogger(IdentifierKeyValuePairCollectionMapper.class.getName()).log(Level.SEVERE, null, ex); | ||
| } catch (InstantiationException ex) { | ||
| Logger.getLogger(IdentifierKeyValuePairCollectionMapper.class.getName()).log(Level.SEVERE, null, ex); | ||
| } catch (IllegalAccessException ex) { | ||
| Logger.getLogger(IdentifierKeyValuePairCollectionMapper.class.getName()).log(Level.SEVERE, null, ex); | ||
| } catch (IllegalArgumentException ex) { | ||
| Logger.getLogger(IdentifierKeyValuePairCollectionMapper.class.getName()).log(Level.SEVERE, null, ex); | ||
| } catch (InvocationTargetException ex) { | ||
| Logger.getLogger(IdentifierKeyValuePairCollectionMapper.class.getName()).log(Level.SEVERE, null, ex); | ||
| } | ||
| } | ||
| parser.setCurrent(parent); | ||
| return result; | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...l/aas/v3/dataformat/aml/serialization/mappers/IdentifierKeyValuePairCollectionMapper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /* | ||
| * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package io.adminshell.aas.v3.dataformat.aml.serialization.mappers; | ||
|
|
||
| import io.adminshell.aas.v3.dataformat.aml.serialization.DefaultMapper; | ||
| import io.adminshell.aas.v3.dataformat.aml.serialization.AmlGenerator; | ||
| import io.adminshell.aas.v3.dataformat.aml.serialization.MappingContext; | ||
| import io.adminshell.aas.v3.dataformat.aml.model.caex.AttributeType; | ||
| import io.adminshell.aas.v3.dataformat.core.util.AasUtils; | ||
| import io.adminshell.aas.v3.dataformat.mapping.MappingException; | ||
| import io.adminshell.aas.v3.model.AssetInformation; | ||
| import io.adminshell.aas.v3.model.IdentifierKeyValuePair; | ||
| import java.beans.PropertyDescriptor; | ||
| import java.lang.reflect.InvocationTargetException; | ||
| import java.util.ArrayList; | ||
| import java.util.Collection; | ||
| import java.util.List; | ||
|
|
||
| public class IdentifierKeyValuePairCollectionMapper extends DefaultMapper<Collection<IdentifierKeyValuePair>> { | ||
|
|
||
| private static final String ATTRIBUTE_NAME = "specificAssetId"; | ||
|
|
||
| @Override | ||
| public void map(Collection<IdentifierKeyValuePair> value, AmlGenerator generator, MappingContext context) throws MappingException { | ||
| if (value == null || context == null || value.isEmpty()) { | ||
| return; | ||
| } | ||
| AttributeType.Builder wrapperBuilder = AttributeType.builder() | ||
| .withName(ATTRIBUTE_NAME) | ||
| .withRefSemantic(generator.refSemantic(AssetInformation.class, ATTRIBUTE_NAME)); | ||
| List<AttributeType> attributes = new ArrayList<>(); | ||
| for (IdentifierKeyValuePair element : value) { | ||
| AttributeType.Builder builder = AttributeType.builder() | ||
| .withName(ATTRIBUTE_NAME + (value.size() > 1 ? "_" + (attributes.size() + 1) : "")); | ||
| for (PropertyDescriptor property : AasUtils.getAasProperties(element.getClass())) { | ||
| if (!skipProperty(property)) { | ||
| context.with(property) | ||
| .map(property.getReadMethod().getGenericReturnType(), | ||
| getElemenetPropertyValue(element, property, context), | ||
| generator.with(builder)); | ||
| } | ||
| } | ||
| attributes.add(builder.build()); | ||
| } | ||
| attributes.forEach(x -> wrapperBuilder.addAttribute(x)); | ||
| generator.add(wrapperBuilder.build()); | ||
| } | ||
|
|
||
| protected Object getElemenetPropertyValue(IdentifierKeyValuePair elemenet, PropertyDescriptor property, MappingContext context) throws MappingException { | ||
| try { | ||
| return property.getReadMethod().invoke(elemenet); | ||
| } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { | ||
| throw new MappingException("failed to get property value for property " + property.getName(), ex); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not match what is in the description, i.e. that a push on main triggers a release to maven central. However, I agreed that we should only trigger releases upon tags to ensure we have properly archived the code base for each release.