Coscine Python SDK merge requestshttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests2023-11-29T13:54:32+01:00https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/17Update for APIv22023-11-29T13:54:32+01:00RominUpdate for APIv2https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/16Dev2023-09-01T16:16:40+02:00RominDevhttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/15Fixed datetime format2023-07-10T20:59:54+02:00RominFixed datetime formatThe `xsd:dateTime` format was using `xsd:date` format, which gets rejected by Coscine (because their parser sucks I assume :skull:)
Implemented proper formatting for that type to support resources with dateTime fields. Uploading metada...The `xsd:dateTime` format was using `xsd:date` format, which gets rejected by Coscine (because their parser sucks I assume :skull:)
Implemented proper formatting for that type to support resources with dateTime fields. Uploading metadata to these resources with the python client did not work before. Now it should work.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/14Fix targetClass not contained in application profile2023-06-22T16:05:44+02:00RominFix targetClass not contained in application profile- some application profiles do not contain the targetclass property
- all application profile contain the `sh:NodeShape` property
- Therefore I replace the targetClass query with the nodeshape query in the `graph.target()` method
- Addit...- some application profiles do not contain the targetclass property
- all application profile contain the `sh:NodeShape` property
- Therefore I replace the targetClass query with the nodeshape query in the `graph.target()` method
- Additionally I've added a parameter to the `FileObject.form()` method to force the client to fetch metadata for the file whenever it creates a form for it. By default this is disabled (set to false). For some profiles the metadata served by Coscine with the resource in JSON-LD format is atm broken. So until there is a fix for that, this provides a nice and easy workaround. Just use `object.form(True)` instead of regular old `object.form()` when you are impacted by the issue.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/11Fill dataframe with raw values2023-04-03T11:46:31+02:00Niklas SiemerFill dataframe with raw valuesThe dataframe containing the `FormValue`s cannot be easily read or operated on. Therefore, I now fill the frame with the raw values.The dataframe containing the `FormValue`s cannot be easily read or operated on. Therefore, I now fill the frame with the raw values.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/8Use colorama.Fore.RESET to reset color in banner2022-10-29T06:26:42+02:00Robin Joscha SonnabendUse colorama.Fore.RESET to reset color in bannerThe banner printed when creating a `Client` uses colors, but doesn't reset the color at the end, coloring all subsequent output.
Use `colorama.Fore.RESET` to reset the color after the banner.
Fixes #21The banner printed when creating a `Client` uses colors, but doesn't reset the color at the end, coloring all subsequent output.
Use `colorama.Fore.RESET` to reset the color after the banner.
Fixes #21https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/6Fix input forms2022-09-16T18:54:59+02:00Niklas SiemerFix input formsRight now, the variables on the input forms are class variables, i.e. if they are modified the class itself is changed and this had severe side effects:
```python
from coscine import Client
c = Client('TOKEN')
obj = c.object('TestProje...Right now, the variables on the input forms are class variables, i.e. if they are modified the class itself is changed and this had severe side effects:
```python
from coscine import Client
c = Client('TOKEN')
obj = c.object('TestProject/aRes/s_random.dat')
obj.form()
print(obj.form())
```
results in duplication of all values!
This MR fixes thishttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/5Primitive unittests2022-09-09T20:40:37+02:00Niklas SiemerPrimitive unittestshttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/4Fix format code docs2022-08-26T16:22:43+02:00Charlie PauvertFix format code docsHi,
Just a few fixes (including a dead link) I stumbled upon when reading the tutorial. Nothing urgent!
Best,Hi,
Just a few fixes (including a dead link) I stumbled upon when reading the tutorial. Nothing urgent!
Best,https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/3Development2021-10-08T16:55:13+02:00RominDevelopmentHotfix 0.5.1
Fixed type hinting issue for Python versions < 3.9Hotfix 0.5.1
Fixed type hinting issue for Python versions < 3.9https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/2Development2021-09-16T10:59:01+02:00RominDevelopmentMerge version 0.5.0Merge version 0.5.0RominRominhttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/10Load metadata from coscine if not in cache2023-04-11T15:10:38+02:00Niklas SiemerLoad metadata from coscine if not in cacheCurrently, the actual metadata of a file object seems not to be loaded anywhere, except one forces it in this method. However, if the metadata is not already in the cache and I ask for it on the file object, I would expect it to be loade...Currently, the actual metadata of a file object seems not to be loaded anywhere, except one forces it in this method. However, if the metadata is not already in the cache and I ask for it on the file object, I would expect it to be loaded from coscine.
Therefore, I deleted the `return None` such that a loading is attempted.
A question on the cache:
Currently, I do not see a method to easily populate the cache with the metadata in one directory. As such, the nice `.dataframe()` method only provides a more or less empty `DataFrame` - calling the `dataframe` should ideally result in a 'get all metadata into cache and load `DataFrame` with this data' request, IMHO.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/merge_requests/9Add alternative TIMEFORMAT with milliseconds2023-01-02T15:26:36+01:00Robin Joscha SonnabendAdd alternative TIMEFORMAT with millisecondsSometimes, coscine returns datetimes with milliseconds at the end, like
endDate: "2022-01-17T11:24:09.297"
This tries parsing datetimes with an added "%.f" in the end if the default format fails.
If possible, it might be a better c...Sometimes, coscine returns datetimes with milliseconds at the end, like
endDate: "2022-01-17T11:24:09.297"
This tries parsing datetimes with an added "%.f" in the end if the default format fails.
If possible, it might be a better change to ensure all datetimes returned by the server have the same format.
Fixes #20