Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • baw8330/projekt-cis-biochemie-2021-22
  • bax5890/projekt-cis-biochemie-2021-22
2 results
Select Git revision
Show changes
Commits on Source (6)
MIT License
Copyright (c) 2022 Isabelle Siebels, Sebastian David, Florian Jochens, Julius Schenk, Samuel Ockenden, Alina Molkentin, Donna Löding,
Malte Schokolowski, Katja Ehlers, Merle Stahl, Judith Große
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=========================================
D3.js is licensed under the ISC License.
For more about D3.js see: https://d3js.org/
The source code of D3.js can be found at: https://github.com/d3/d3
Copyright 2010-2021 Mike Bostock
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
......@@ -155,7 +155,7 @@ function failure(graph) {
* checks at a fixed interval whether the contents of the JSON file have changed
and reloads the program if necessary
*/
var intervalId = window.setInterval(check_if_json_changed, 500)
var intervalId = window.setInterval(check_if_json_changed, 1000)
function check_if_json_changed() {
d3.json("json_text.json").then(function(graph) {
newjson_string = JSON.stringify(graph)
......@@ -440,8 +440,7 @@ function zoom_to_graph() {
perc_y = height/(node_bounds.height+100);
zoom_perc = d3.min([perc_x, perc_y])
d3.select('svg')
.call(zoom.scaleBy, zoom_perc);
d3.select('svg').call(zoom.scaleBy, zoom_perc);
}
/**
......@@ -450,14 +449,12 @@ function zoom_to_graph() {
function reset_view() {
d3.select('svg')
.call(zoom.scaleTo, 1)
d3.select('svg')
.call(zoom.translateTo, 0.5 * width, 0.5 * height);
d3.select('svg')
.call(zoom.translateTo, 0.5 * width, 0.5 * height)
.call(zoom.scaleBy, zoom_perc);
}
/**
* save svg as png
* saves svg as png
*/
function save_svg() {
var svgString = get_svg_string(svg.node());
......@@ -469,7 +466,7 @@ function save_svg(){
};
/**
* generate svgString
* generates svgString
* @param {object} svgNode - node
*/
function get_svg_string(svgNode) {
......@@ -542,7 +539,7 @@ function get_svg_string(svgNode) {
}
/**
* convert svgString to image and export it
* converts svgString to image and export it
* @param {object} svgString - svgString
* @param {object} width - width of image
* @param {object} height - height of image
......
......@@ -171,7 +171,7 @@ function failure(graph) {
* checks at a fixed interval whether the contents of the JSON file have changed
and reloads the program if necessary
*/
var intervalId = window.setInterval(check_if_json_changed, 500)
var intervalId = window.setInterval(check_if_json_changed, 1000)
function check_if_json_changed() {
d3.json("json_text.json").then(function(graph) {
newjson_string = JSON.stringify(graph)
......@@ -475,8 +475,7 @@ function zoom_to_graph() {
perc_y = height/(node_bounds.height+100);
zoom_perc = d3.min([perc_x, perc_y])
d3.select('svg')
.call(zoom.scaleBy, zoom_perc);
d3.select('svg').call(zoom.scaleBy, zoom_perc);
}
/**
......@@ -485,14 +484,12 @@ function zoom_to_graph() {
function reset_view() {
d3.select('svg')
.call(zoom.scaleTo, 1)
d3.select('svg')
.call(zoom.translateTo, 0.5 * width, 0.5 * height);
d3.select('svg')
.call(zoom.translateTo, 0.5 * width, 0.5 * height)
.call(zoom.scaleBy, zoom_perc);
}
/**
* save svg as png
* saves svg as png
*/
function save_svg() {
var svgString = get_svg_string(svg.node());
......@@ -504,7 +501,7 @@ function save_svg(){
};
/**
* generate svgString
* generates svgString
* @param {object} svgNode - node
*/
function get_svg_string(svgNode) {
......@@ -577,7 +574,7 @@ function get_svg_string(svgNode) {
}
/**
* convert svgString to image and export it
* converts svgString to image and export it
* @param {object} svgString - svgString
* @param {object} width - width of image
* @param {object} height - height of image
......
# Projekt CiS-Projekt 2021/22
Input-Package to fetch publication information with a given url.
Input-Package um Publikationsinformationen mit von einer DOI zu holen.
## Usage/Examples
......@@ -23,21 +22,22 @@ if __name__ == "__main__":
main("https://doi.org/10.1021/acs.chemrev.8b00728")
```
The expected results of calling this methode are:
| Input-Url | Result |
Die zu erwartende Ergebnisse beim rufen der Funktion:
| Input-DOI | Ergebniss |
|-----------|-----------|
| supported & correct| A publication Instance |
| supported & uncorrect| ValueError|
| not supported | ValueError|
| Unterstützt & Korrekt| Eine Publikationsinstanz |
| Unterstützt & Falsch| ValueError|
| nicht Unterstützt | ValueError|
Supported Url are urls, which comply with the url-pattern of supported Journals.
Unterstützte DOIs sind DOIs,welche das DOI-Mustern der unterstützten Journals besitzen.
### Supported Journals:
### Unterstützte Journals:
- ACS-Journals
- (Nature-Journals)
- ACS-Journale
- (Springer-Journale)
- ~~Elsevier~~
## Testing
## Tests
``` c
python -m unittest input/test/<file.py> -v
......