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

Replace licensed datasets by sample datasets #841

Merged
merged 13 commits into from
Mar 6, 2024
Merged

Conversation

bchapuis
Copy link
Member

@bchapuis bchapuis commented Mar 5, 2024

No description provided.

double lon = Double.parseDouble(reader.getAttributeValue(null, ATTRIBUTE_NAME_LONGITUDE));
var latAttribute = reader.getAttributeValue(null, ATTRIBUTE_NAME_LATITUDE);
var lonAttribute = reader.getAttributeValue(null, ATTRIBUTE_NAME_LONGITUDE);
var latValue = latAttribute != null ? Double.parseDouble(latAttribute) : Double.NaN;

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
var latAttribute = reader.getAttributeValue(null, ATTRIBUTE_NAME_LATITUDE);
var lonAttribute = reader.getAttributeValue(null, ATTRIBUTE_NAME_LONGITUDE);
var latValue = latAttribute != null ? Double.parseDouble(latAttribute) : Double.NaN;
var lonValue = lonAttribute != null ? Double.parseDouble(lonAttribute) : Double.NaN;

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
/** {@inheritDoc} */
@Override
public void accept(Change change) {
switch (change.getType()) {

Check warning

Code scanning / CodeQL

Missing enum case in switch Warning

Switch statement does not have a case for
MODIFY
.
.build();
var topDocs = searcher.search(geonamesQuery, 2);
assertEquals(2, topDocs.totalHits.value);
var doc0 = searcher.doc(topDocs.scoreDocs[0].doc);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
IndexSearcher.doc
should be avoided because it has been deprecated.
assertEquals(2, topDocs.totalHits.value);
var doc0 = searcher.doc(topDocs.scoreDocs[0].doc);
assertEquals("Yverdon-les-bains", doc0.getField("name").stringValue());
var doc1 = searcher.doc(topDocs.scoreDocs[1].doc);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
IndexSearcher.doc
should be avoided because it has been deprecated.
Copy link

sonarcloud bot commented Mar 6, 2024

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@bchapuis bchapuis merged commit 20fc9ae into main Mar 6, 2024
9 checks passed
@bchapuis bchapuis deleted the remove-test-data branch March 6, 2024 16:55
@CalvinKirs CalvinKirs self-requested a review March 14, 2024 03:14
https://github.com/protomaps/PMTiles
The copied files are located in:
- baremaps-core/src/test/resources/pmtiles/

This product includes code derived from pyosmium.
BSD 2-Clause "Simplified" License.
Please visit the following URL for the full text of the pyosmium license:
https://github.com/osmcode/pyosmium/blob/master/LICENSE.TXT
The derived files are:
- baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/apache/incubator-baremaps/blob/main/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java#L40-L43

In general, we need to preserve the Pyosmium license header. If we modify it, we can also add the Apache license header.

Here is a good example. https://issues.apache.org/jira/browse/LEGAL-626

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the example. Yes, we can add the BSD license in the header. Pyosmium does not include a license headers in the python files, hence my original choice of referencing the license in the NOTICE file and in the javadoc.

Comment on lines +55 to 57
Apache License 2.0.
Please visit the following URL for the full text of the Planetiler license:
https://github.com/onthegomap/planetiler/blob/main/LICENSE
Copy link
Member

Choose a reason for hiding this comment

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

If a dependency uses the Apache License 2.0 (AL2) and includes a NOTICE file, we need to add the corresponding NOTICE file here.

https://github.com/onthegomap/planetiler/blob/main/NOTICE

Copy link
Member

Choose a reason for hiding this comment

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

It depends on the specific license terms, but so far it seems that only the AL2 requires this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Notice that we don't include planetiler which has GPL dependencies, we only integrated a data structure. Therefore, I'm tempted to say that we don't need to include the content of their NOTICE file.

@CalvinKirs
Copy link
Member

I can make some changes later and create a PR. We can discuss it on the new PR, which might be clearer.

@CalvinKirs
Copy link
Member

Overall, it shouldn't take too long to get from DISCLAIMER-WIP to DISCLAIMER. Thank you:)

@bchapuis
Copy link
Member Author

Thanks a lot, continuing the discussion in a new PR is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants