Skip to content

Commit

Permalink
changes on model files
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelaRocchetti committed Jun 27, 2024
1 parent f7987ae commit 09f8909
Show file tree
Hide file tree
Showing 23 changed files with 132 additions and 34 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
EzXML = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
OpenAPI = "d5e62ea6-ddf3-4d43-8e4c-ad5e6c8bfd7d"

[compat]
Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
IPUMS = "51d1f77e-d457-4c14-a89d-9ed71839f38d"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
8 changes: 5 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using IPUMS
using Documenter
using Revise
Revise.revise()

DocMeta.setdocmeta!(IPUMS, :DocTestSetup, :(using IPUMS); recursive=true)

Expand All @@ -17,12 +19,12 @@ makedocs(;
),
pages=[
"Home" => "index.md",
"Workflows" => "workflow.md",
"How to " => "howto.md",
"Tutorials" => "tutorials.md",
"HowTo" => "howto.md",
"Workflow" => "workflow.md",
"Examples" => "examples.md",
"Mission" => "mission.md",
"Contributing" => "contributing.md"
"References" => "references.md",
],
)

Expand Down
4 changes: 0 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
```@meta
CurrentModule = IPUMS
```

# IPUMS

Documentation for [IPUMS](https://github.com/TheCedarPrince/IPUMS.jl).
Expand Down
13 changes: 9 additions & 4 deletions src/models/model_DataExtract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@
status=nothing,
downloadLinks=nothing,
)
This function extracts data giving the status and the download download links
# Arguments
- extractDefinition::DataExtractDefinition
- number::Int64
- status::String
- downloadLinks::DataExtractDownloadLinks
- `extractDefinition::DataExtractDefinition`
- `number::Int64`
- `status::String`
- `downloadLinks::DataExtractDownloadLinks`
# Return
It returns the definition and the data with their download status and the link
"""
Base.@kwdef mutable struct DataExtract <: OpenAPI.APIModel
extractDefinition = nothing # spec type: Union{ Nothing, DataExtractDefinition }
Expand Down
5 changes: 5 additions & 0 deletions src/models/model_DataExtractDefinition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
version=nothing,
collection=nothing,
)
This function extracts data giving the data format, the time table, the breakdown and type of layout, the shape of the files, their geogrphic information, a description, the version and collection of data
# Arguments
- datasets::Dict{String, Dataset}
- timeSeriesTables::Dict{String, TimeSeriesTable}
Expand All @@ -27,6 +30,8 @@
- description::String
- version::Int64
- collection::String
# Return
The function return a new dataset
"""
Base.@kwdef mutable struct DataExtractDefinition <: OpenAPI.APIModel
datasets::Union{Nothing, Dict} = nothing # spec type: Union{ Nothing, Dict{String, Dataset} }
Expand Down
5 changes: 5 additions & 0 deletions src/models/model_DataExtractDownloadLinks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
tableData=nothing,
gisData=nothing,
)
This function extracts data giving the codebook prview, the table data and gis data
# Arguments
- codebookPreview::String
- tableData::String
- gisData::String
# Return
The function returns new extracted data
"""
Base.@kwdef mutable struct DataExtractDownloadLinks <: OpenAPI.APIModel
codebookPreview::Union{Nothing, String} = nothing
Expand Down
4 changes: 4 additions & 0 deletions src/models/model_DataExtractPost.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
geographicExtents=nothing,
description=nothing,
)
This function extracts data giving the time series table,the format of the data, the table layout, the shape of the file, its geographic extent and the description
# Arguments
- datasets::Dict{String, Dataset}
- timeSeriesTables::Dict{String, TimeSeriesTable}
- dataFormat::String
Expand All @@ -23,6 +25,8 @@
- shapefiles::Vector{String}
- geographicExtents::Vector{String}
- description::String
# Return
"""
Base.@kwdef mutable struct DataExtractPost <: OpenAPI.APIModel
datasets::Union{Nothing, Dict} = nothing # spec type: Union{ Nothing, Dict{String, Dataset} }
Expand Down
7 changes: 6 additions & 1 deletion src/models/model_DataExtractPostResponse.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated by the Julia OpenAPI Code Generator
# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.


Expand All @@ -10,11 +10,16 @@
status=nothing,
downloadLinks=nothing,
)
This function extracts data giving a data definition,the status of the download and the link
# Arguments
- extractDefinition::DataExtractDefinition
- number::Int64
- status::String
- downloadLinks::DataExtractDownloadLinks
# Return
Returns a new table with data definition,numbers,status and the download link
"""
Base.@kwdef mutable struct DataExtractPostResponse <: OpenAPI.APIModel
extractDefinition = nothing # spec type: Union{ Nothing, DataExtractDefinition }
Expand Down
4 changes: 4 additions & 0 deletions src/models/model_DataTableFull.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
datasetName=nothing,
nVariables=nothing,
)
This function creates a table giving the nhgisCode, the description of the date, their universe and the dataset name
# Attributes
- name::String
- nhgisCode::String
- description::String
- universe::String
- sequence::Int64
- datasetName::String
- nVariables::Int64
# Return
"""
Base.@kwdef mutable struct DataTableFull <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
5 changes: 4 additions & 1 deletion src/models/model_DataTableFullVariablesInner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
name=nothing,
nhgisCode=nothing,
)
This function gives a table with the name of the data and their nhgiscode
# Attributes
- name::String
- nhgisCode::String
Retrurn
"""
Base.@kwdef mutable struct DataTableFullVariablesInner <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
2 changes: 1 addition & 1 deletion src/models/model_DataTableSimple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
description=nothing,
sequence=nothing,
)
This function returns a table with name of data, description, sequence and nhgisCode
- name::String
- nhgisCode::String
- description::String
Expand Down
4 changes: 4 additions & 0 deletions src/models/model_Dataset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
breakdownValues=nothing,
years=nothing,
)
This function creates a new data table giving geographical levels, breakdown values and years
# Arguments
- dataTables::Vector{String}
- geogLevels::Vector{String}
- breakdownValues::Vector{String}
- years::Vector{String}
"""
Base.@kwdef mutable struct Dataset <: OpenAPI.APIModel
dataTables::Union{Nothing, Vector{String}} = nothing
Expand Down
5 changes: 5 additions & 0 deletions src/models/model_DatasetFull.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
hasMultipleDataTypes=nothing,
breakdowns=nothing,
)
This function creates a dataset giving the description and the group of the data, the sequence, the geographical information and if it has multiple data types and breakdowns.
# Arguments
- name::String
- description::String
Expand All @@ -23,6 +26,8 @@
- geogLevels::Vector{DatasetFullGeogLevelsInner}
- hasMultipleDataTypes::Bool
- breakdowns::DatasetFullBreakdowns
# Return
The function returns a new table
"""
Base.@kwdef mutable struct DatasetFull <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
5 changes: 5 additions & 0 deletions src/models/model_DatasetFullBreakdowns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@
years=nothing,
geographicInstances=nothing,
)
This function creates a dataset giving the description and the type of data, the sequence, the geographical ans year information and breakdowns.
# Arguments
- name::String
- type::String
- description::String
- breakdownValues::Vector{DatasetFullBreakdownsBreakdownValuesInner}
- years::Vector{String}
- geographicInstances::Vector{DatasetFullBreakdownsBreakdownValuesInner}
# Return
The function returns a new dataset
"""
Base.@kwdef mutable struct DatasetFullBreakdowns <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
name=nothing,
description=nothing,
)
The fuction ge
- name::String
- description::String
"""
Expand Down
4 changes: 4 additions & 0 deletions src/models/model_DatasetFullGeogLevelsInner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
description=nothing,
hasGeogExtentSelection=nothing,
)
This function gives the geographical information about data
# Arguments
- name::String
- description::String
- hasGeogExtentSelection::Bool
# Return
The function return a new dataset
"""
Base.@kwdef mutable struct DatasetFullGeogLevelsInner <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
4 changes: 4 additions & 0 deletions src/models/model_DatasetSimple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
group=nothing,
sequence=nothing,
)
The fuction gives a dataset given a group, a sequence,an input and a description
# Arguments
- name::String
- description::String
- group::String
- sequence::Int64
# Return
The function returns a new dataset
"""
Base.@kwdef mutable struct DatasetSimple <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
5 changes: 4 additions & 1 deletion src/models/model_Shapefile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@
basis=nothing,
sequence=nothing,
)
This function creates a new file
# Aut
- name::String
- year::String
- geographicLevel::String
- extent::String
- basis::String
- sequence::Int64
# Return
"""
Base.@kwdef mutable struct Shapefile <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
11 changes: 9 additions & 2 deletions src/models/model_TimeSeriesTable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@
geogLevels=nothing,
years=nothing,
)
This function creates a table with geographical and time information
- geogLevels::Vector{String}
- years::Vector{String}
# Arguments
- `geogLevels::Vector{String}`
- `years::Vector{String}`
# Return
The return of the function is a table
# Example
"""
Base.@kwdef mutable struct TimeSeriesTable <: OpenAPI.APIModel
geogLevels::Union{Nothing, Vector{String}} = nothing
Expand Down
19 changes: 13 additions & 6 deletions src/models/model_TimeSeriesTableFull.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@
geogLevels=nothing,
)
- name::String
- description::String
- geographicIntegration::String
- sequence::Float32
- timeSeries::Vector{TimeSeriesTableFullTimeSeriesInner}
- geogLevels::Vector{TimeSeriesTableFullTimeSeriesInner}
This function creates a table with fixed name,description, geographical and timeline information
# Argument
- `name::String`
- `description::String`
- `geographicIntegration::String`
- `sequence::Float32`
- `timeSeries::Vector{TimeSeriesTableFullTimeSeriesInner}`
- `geogLevels::Vector{TimeSeriesTableFullTimeSeriesInner}`
# Return
The return is a new table with fixed name,description,time and geographical information of the data
# Example
"""
Base.@kwdef mutable struct TimeSeriesTableFull <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
15 changes: 12 additions & 3 deletions src/models/model_TimeSeriesTableFullTimeSeriesInner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@
sequence=nothing,
)
- name::String
- description::String
- sequence::Int64
This function takes as input the name,the description and the sequence of data e and return a new table
# Argument
- `name::String`
- `description::String`
- `sequence::Int64`
# Return
The return is a new table with fixed name and description
"""
Base.@kwdef mutable struct TimeSeriesTableFullTimeSeriesInner <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
Loading

0 comments on commit 09f8909

Please sign in to comment.