Comments (8)
To clarify the last point: @fblundun disabled the sync_data.py sync for PHP in case the new referer-tests.json format broke the PHP test suite
from referer-parser.
😕 I am confused. What do I need to do?
from referer-parser.
Hi @lstrojny - sorry for the confusion. Firstly, this ticket can't be done until branch feature/json-tests has been merged into master.
Looking at your tests I can see you are already testing the custom internal hosts functionality here: https://github.com/snowplow/referer-parser/blob/master/php/tests/Snowplow/RefererParser/Tests/AbstractParserTest.php#L67
The idea of the two new tests in the master copy of referer-tests.json is that they will only work if the parser has been configured with the internal hosts "www.subdomain1.snowplowanalytics.com" and "www.subdomain2.snowplowanalytics.com" - otherwise the source will incorrectly be "unknown" rather than "internal".
The versions of the Referer-Parser which have not implemented a custom list of internal hosts will not be able to successfully run the new tests. So I have edited sync_data.py so that it only copies referer-tests.json into the java-scala version. The idea is that whenever another language library implements custom lists of internal hosts, sync_data.py will be updated so that the master copy of referer-tests.json gets copied into that library's directory.
So when the new branch gets merged, you should:
- manually copy the new version of referer-parser/resources/referer-tests.json into referer-parser/php/tests/Snowplow/RefererParser/Tests/referer-tests.json
- edit AbstractParserTest.php so that the parser gets created with "www.subdomain1.snowplowanalytics.com" and "www.subdomain2.snowplowanalytics.com" in its list of internal domains so that the new tests in referer-tests.json pass
- edit sync_data.py so that automatically copies referer-parser/resources/referer-tests.json into referer-parser/php/tests/Snowplow/RefererParser/Tests/referer-tests.json
Does that make sense?
from referer-parser.
A lot, thank you! Can you ping me here again once the branch is merged?
from referer-parser.
Great! I'll do that.
from referer-parser.
@lstrojny - the branch has been merged so you should be good to go! Let me know if you need anything clarified.
from referer-parser.
Thanks for the ping, I'll have a look.
from referer-parser.
from referer-parser.
Related Issues (20)
- Investigate parsing HOT 1
- Update library to reflect changes to Google Images tracking
- PHP paid medium HOT 3
- pull in latest referrer metadata from Matomo (Piwik) HOT 1
- Move the PHP codebase to its own repository
- Move the Ruby codebase to its own repository
- Move the Python codebase to its own repository
- Move the Go codebase to its own repository
- Move the dotnet codebase to its own repository
- Move the java-scala codebase to their own repositories
- Move the nodejs codebase to its own repository
- Publish JSON referer database
- Bump js-yaml to 3.13.1 HOT 1
- referers-latest.yml on S3 is returning 404 HOT 3
- referers-latest.yaml link is broken HOT 1
- Update links to referer parser files in the README
- Add crystal library
- Missing PR Reviews in node-referer-parser since a year HOT 16
- PHP 8.1 parse_str() warning HOT 1
- Minify JSON database HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from referer-parser.