Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Java docs to pull useful information from mission model #1055

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
437df67
Prototype javadoc parsing
mattdailis Jul 18, 2023
53babbe
Added @unit parsing
cohansen Jul 25, 2023
55038c1
Finished adding units to parameters
cohansen Jul 26, 2023
24ccfa2
Added resource types units
cohansen Aug 1, 2023
6e69ede
Fixed a few tests that were failing on units
cohansen Aug 1, 2023
a01f7cf
Added the db migration for resource type units
cohansen Aug 1, 2023
7dc3c11
Added computed attribute unit parsing
cohansen Aug 1, 2023
501e136
Removed some redundant code
cohansen Aug 2, 2023
8284cf0
Accidentaly removed this, putting it back
cohansen Aug 2, 2023
8bba51f
Fixed tests that were broken by adding new MissionModel and ActivityT…
cohansen Aug 2, 2023
4958b71
Fixed a typo in the migration for javadoc parsing
cohansen Aug 3, 2023
44f8878
Fixed missing columns in GetActivityTypesAction
cohansen Aug 4, 2023
360ff5a
Moved migration to 25 so it doesn't conflict with user_plan_snapshots
cohansen Aug 4, 2023
f460954
Changed @registeredState to @resourceName
cohansen Aug 7, 2023
e85d2dc
Removed @Aerie from tag
cohansen Aug 8, 2023
e19ca58
Added @aerie prefix to our custom tags
cohansen Aug 9, 2023
58c112e
Added regex matching for resource units
cohansen Aug 9, 2023
e364c70
Removed logs, fixed unit parsing for strings after the unit tag, move…
cohansen Aug 21, 2023
f73583c
Converted all unit storage into existing columns
cohansen Aug 31, 2023
65c597e
Fixed migration scripts, added blank units to resource types, removed…
cohansen Aug 31, 2023
5207957
Updated gql queries and models to match the new unit changes for
cohansen Aug 31, 2023
662a640
Reworked how we save units by moving into existing fields
cohansen Sep 1, 2023
48eb205
Fixed some issues with the migration and also tests
cohansen Sep 1, 2023
6d3a681
Moved units migration to 26
cohansen Sep 1, 2023
153f38a
Reformatted migration files
cohansen Sep 5, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void insertActivityType(final int modelId, final String name) throws SQLExceptio
try(final var statement = connection.createStatement()) {
statement.execute(
"""
INSERT INTO activity_type (model_id, name, parameters, required_parameters, computed_attributes_value_schema)
INSERT INTO activity_type (model_id, name, parameter_definitions, required_parameters, computed_attribute_definitions)
VALUES (%d, '%s', '{}', '[]', '{}');
""".formatted(modelId, name)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@ remote_relationships:
select_permissions:
- role: aerie_admin
permission:
columns: [model_id, name, parameters, required_parameters, computed_attributes_value_schema, subsystem]
columns: [model_id, name, parameter_definitions, required_parameters, computed_attribute_definitions, subsystem]
filter: {}
allow_aggregations: true
- role: user
permission:
columns: [model_id, name, parameters, required_parameters, computed_attributes_value_schema, subsystem]
columns: [model_id, name, parameter_definitions, required_parameters, computed_attribute_definitions, subsystem]
filter: {}
allow_aggregations: true
- role: viewer
permission:
columns: [model_id, name, parameters, required_parameters, computed_attributes_value_schema, subsystem]
columns: [model_id, name, parameter_definitions, required_parameters, computed_attribute_definitions, subsystem]
filter: {}
allow_aggregations: true
insert_permissions:
- role: aerie_admin
permission:
columns: [model_id, name, parameters, required_parameters, computed_attributes_value_schema, subsystem]
columns: [model_id, name, parameter_definitions, required_parameters, computed_attribute_definitions, subsystem]
check: {}
update_permissions:
- role: aerie_admin
permission:
columns: [model_id, name, parameters, required_parameters, computed_attributes_value_schema, subsystem]
columns: [model_id, name, parameter_definitions, required_parameters, computed_attribute_definitions, subsystem]
filter: {}
delete_permissions:
- role: aerie_admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ table:
select_permissions:
- role: aerie_admin
permission:
columns: [model_id, revision, parameters]
columns: [model_id, revision, parameter_definitions]
filter: {}
- role: user
permission:
columns: [model_id, revision, parameters]
columns: [model_id, revision, parameter_definitions]
filter: {}
allow_aggregations: true
- role: viewer
permission:
columns: [model_id, revision, parameters]
columns: [model_id, revision, parameter_definitions]
filter: {}
allow_aggregations: true
update_permissions:
- role: aerie_admin
permission:
columns: [parameters]
columns: [parameter_definitions]
filter: {}
delete_permissions:
- role: aerie_admin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
table:
name: resource_type
schema: public
definition: public
select_permissions:
- role: aerie_admin
permission:
columns: [model_id, name, schema]
columns: [model_id, name, definition]
filter: {}
allow_aggregations: true
- role: user
permission:
columns: [model_id, name, schema]
columns: [model_id, name, definition]
filter: {}
allow_aggregations: true
- role: viewer
permission:
columns: [model_id, name, schema]
columns: [model_id, name, definition]
filter: {}
allow_aggregations: true
delete_permissions:
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this file need to be modifying the entries in these columns, as the entries have additional keys?

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
alter table activity_type rename column parameter_definitions to parameters;
alter table activity_type rename column computed_attribute_definitions to computed_attribute_value_schema;

alter table resource_type rename column definition to schema;
comment on column resource_type.definition is e''
'The structure of this resource type.';

alter table mission_model_parameters rename column parameter_definitions to parameters;

call migrations.mark_migration_rolled_back('26');
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
alter table activity_type rename column parameters to parameter_definitions;
alter table activity_type rename column computed_attribute_value_schema to computed_attribute_definitions;

alter table resource_type rename column schema to definition;
comment on column resource_type.definition is e''
'The definition including the structure of this resource type.';

alter table mission_model_parameters rename column parameters to parameter_definitions;

call migrations.mark_migration_applied('26');
Loading