René's URL Explorer Experiment


Title: Fix old SCTs that fail assertions · Issue #351 · datacamp/pythonwhat · GitHub

Open Graph Title: Fix old SCTs that fail assertions · Issue #351 · datacamp/pythonwhat

X Title: Fix old SCTs that fail assertions · Issue #351 · datacamp/pythonwhat

Description: Since pythonwhat v2.16.0, different SCT functions do some assertions and verifications to figure out whether the function is appropriately used. You can see it in the CHANGELOG here. Some of these assertions are only done for courses who...

Open Graph Description: Since pythonwhat v2.16.0, different SCT functions do some assertions and verifications to figure out whether the function is appropriately used. You can see it in the CHANGELOG here. Some of these ...

X Description: Since pythonwhat v2.16.0, different SCT functions do some assertions and verifications to figure out whether the function is appropriately used. You can see it in the CHANGELOG here. Some of these ...

Opengraph URL: https://github.com/datacamp/pythonwhat/issues/351

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix old SCTs that fail assertions","articleBody":"Since `pythonwhat v2.16.0`, different SCT functions do some assertions and verifications to figure out whether the function is appropriately used. You can see it in the CHANGELOG [here](https://github.com/datacamp/pythonwhat/blob/master/CHANGELOG.md#2160).\r\n\r\nSome of these assertions are only done for courses whose course image contains the `PYTHONWHAT_V2_ONLY` env variable (more recent courses), because otherwise these changes would break 55 exercises that contain SCTs that violate these rules:\r\n\r\n```\r\n   course_id chapter_id     id number                                                                              title\r\n1        998       2244  18929      3                                                             Loading a pickled file\r\n2        998       2284  18950      8                                  Filtering your database records using SQL's WHERE\r\n3        998       2284  18951     14                  The power of SQL lies in relationships between tables: INNER JOIN\r\n4        998       2284  19468      7                                         Customizing the Hello World of SQL Queries\r\n5        998       2284  19469      9                                            Ordering your SQL records with ORDER BY\r\n6        998       2284  19793     11                                         Pandas and The Hello World of SQL Queries!\r\n7        998       2372  20216     12            Turning a webpage into data using BeautifulSoup: getting the hyperlinks\r\n8        998       2388  20437     13                                                 Load and explore your Twitter data\r\n9        998       2388  20441     15                                              A little bit of Twitter text analysis\r\n10       998       2388  20834      3                                                       Loading and exploring a JSON\r\n11      1115       2469  21424      3                                         Filter data selected from a Table - Simple\r\n12      1115       2470  21436      3                                       Calculating a Difference between Two Columns\r\n13      1115       2470  21442     10                                    Using alias to handle same table joined queries\r\n14      1115       2471  21450      7                                                         Loading a CSV into a Table\r\n15      1115       2471  21452      9                                                        Updating individual records\r\n16      1115       2472  21463      5                                                      Reading the Data from the CSV\r\n17      1115       2472  21466      8                           Build a Query to Determine the Average Age by Population\r\n18      1115       2472  21467      9        Build a Query to Determine the Percentage of Population by Gender and State\r\n19      1115       2472  21468     10 Build a Query to Determine the Difference by State from the 2000 and 2008 Censuses\r\n20      1115       2470  33053     11                          Leveraging Functions and Group_bys with Hierarchical Data\r\n21      1531       3844  38857      8                                                                          Using zip\r\n22      1531       3845  38874      9                                                                Dict comprehensions\r\n23      1550       3936  40011      8                                                                 How is it optimal?\r\n24      1550       3939  40032      8                                             Hypothesis test on Pearson correlation\r\n25      1550       3940  40049     17                                     Is beak depth heritable at all in G. scandens?\r\n26      1550       3937  40360      4                                                      Visualizing bootstrap samples\r\n27      1550       3938  47093      3                                                   Visualizing permutation sampling\r\n28      1550       3936  63252     12                                             Linear regression on all Anscombe data\r\n29      1606       4135  42717     12            Turning a webpage into data using BeautifulSoup: getting the hyperlinks\r\n30      1606       4136  42720      3                                                       Loading and exploring a JSON\r\n31      1606       4140  42795      6                                              A little bit of Twitter text analysis\r\n32      1607       4138  42757      3                                                             Loading a pickled file\r\n33      1607       4139  42780      8                                         Customizing the Hello World of SQL Queries\r\n34      1607       4139  42781      9                                  Filtering your database records using SQL's WHERE\r\n35      1607       4139  42782     10                                            Ordering your SQL records with ORDER BY\r\n36      1639       4284  59225     10                                                                    Sunny or cloudy\r\n37      1681       4403  62438     10                                  Concatenating vertically to get MultiIndexed rows\r\n38      1681       4403  62441     13                                               Concatenating DataFrames from a dict\r\n39      1681       4403  92426      8                                        Reading multiple files to build a DataFrame\r\n40      1822       4794  51256      4                                                             Finding open triangles\r\n41      2072       5698  63534      6                                                        How many clusters of grain?\r\n42      2533       7496  86163      9                                         Encode the labels as categorical variables\r\n43      2533       7496  95226     10                                                             Counting unique labels\r\n44      3629      10390 119216      9                                                       Regex with NLTK tokenization\r\n45      3629      10390 119217     10                                                             Non-ascii tokenization\r\n46      3629      10390 119219     12                                                                  Charting practice\r\n47      3679      10556 121072      8                                                    Using regularization in XGBoost\r\n48      3679      10557 121076      3                                               Tuning the number of boosting rounds\r\n49      3679      10557 227050      6                                                                         Tuning eta\r\n50      3679      10557 227051      7                                                                   Tuning max_depth\r\n51      3679      10557 227052      8                                                            Tuning colsample_bytree\r\n52      4299      13274 151880      8                                                              Filtering on a phrase\r\n53      6221      19972 258084     11                                                                  Balancing classes\r\n54      6221      19972 258085     12                                            Comparison of Employee attrition models\r\n55      7032      27285 321296     14                                                                   Detect edges (2)\r\n```\r\n\r\nThis issue is a reminder that we have to rewrite the SCTs for these exercises because they are smelly. As soon as that is done, we can remove this `v2_only()` check and do the assertions for all SCTs, independent of the `PYTHONWHAT_V2_ONLY` env variable.\r\n\r\n### How I came up with this list\r\n\r\n- Make a branch on `pythonwhat` that does not do the `if v2_only()` check\r\n- Install this branch of pythonwhat in `docker-python-shared` (using `pip install git+...`) and tag it (with a release candidate format, as it is never the intention to deploy)\r\n- This makes the validator go through all exercises with this hypothetical shared image, and spit out the exercises where it goes wrong.\r\n- Finally, you can use [this script](https://github.com/datacamp/content-engineering-scripts/blob/master/analysis_incorrect-scts.R) to programmatically a list of exercise ids from the validator endpoint and their corresponding chapters and courses.","author":{"url":"https://github.com/filipsch","@type":"Person","name":"filipsch"},"datePublished":"2018-09-12T11:22:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/351/pythonwhat/issues/351"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a4fe7975-2cae-4cf2-544b-92d29cf775b6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCFFE:3CB44F:278135A:358F223:698DB25E
html-safe-nonce778e32ab22bb73b934b6c7a5f63d4609a13160c04e6a7516216fd214d70ea0d5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkZFOjNDQjQ0RjoyNzgxMzVBOjM1OEYyMjM6Njk4REIyNUUiLCJ2aXNpdG9yX2lkIjoiNDAyNzI4MTgwNzQ4NTI4NDk1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac21ebd1a38b3bb18e9cacb21e87d1dabdb99a5d54ab652b627b8c724d5e55bc02
hovercard-subject-tagissue:359435253
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/datacamp/pythonwhat/351/issue_layout
twitter:imagehttps://opengraph.githubassets.com/85886977aee65c20486bb47ae3aaf9d20a6e42c9f7ab5abe13b839699fd3b833/datacamp/pythonwhat/issues/351
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/85886977aee65c20486bb47ae3aaf9d20a6e42c9f7ab5abe13b839699fd3b833/datacamp/pythonwhat/issues/351
og:image:altSince pythonwhat v2.16.0, different SCT functions do some assertions and verifications to figure out whether the function is appropriately used. You can see it in the CHANGELOG here. Some of these ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefilipsch
hostnamegithub.com
expected-hostnamegithub.com
None2457fd9a1b17ca7f38c3c2653895ccb2e0dd04f18f77446a21354e9bc4b7902f
turbo-cache-controlno-preview
go-importgithub.com/datacamp/pythonwhat git https://github.com/datacamp/pythonwhat.git
octolytics-dimension-user_id6276968
octolytics-dimension-user_logindatacamp
octolytics-dimension-repository_id51361383
octolytics-dimension-repository_nwodatacamp/pythonwhat
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id51361383
octolytics-dimension-repository_network_root_nwodatacamp/pythonwhat
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release878672b82363fd98fbdc5bd0edb68e572c8a8d9b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/351#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatacamp%2Fpythonwhat%2Fissues%2F351
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatacamp%2Fpythonwhat%2Fissues%2F351
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=datacamp%2Fpythonwhat
Reloadhttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/351
Reloadhttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/351
Reloadhttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/351
datacamp https://patch-diff.githubusercontent.com/datacamp
pythonwhathttps://patch-diff.githubusercontent.com/datacamp/pythonwhat
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fdatacamp%2Fpythonwhat
Fork 31 https://patch-diff.githubusercontent.com/login?return_to=%2Fdatacamp%2Fpythonwhat
Star 74 https://patch-diff.githubusercontent.com/login?return_to=%2Fdatacamp%2Fpythonwhat
Code https://patch-diff.githubusercontent.com/datacamp/pythonwhat
Issues 34 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues
Pull requests 3 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulls
Projects 0 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/projects
Wiki https://patch-diff.githubusercontent.com/datacamp/pythonwhat/wiki
Security 0 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/security
Insights https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulse
Code https://patch-diff.githubusercontent.com/datacamp/pythonwhat
Issues https://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues
Pull requests https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulls
Projects https://patch-diff.githubusercontent.com/datacamp/pythonwhat/projects
Wiki https://patch-diff.githubusercontent.com/datacamp/pythonwhat/wiki
Security https://patch-diff.githubusercontent.com/datacamp/pythonwhat/security
Insights https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/datacamp/pythonwhat/issues/351
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/datacamp/pythonwhat/issues/351
Fix old SCTs that fail assertionshttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/351#top
enhancementhttps://github.com/datacamp/pythonwhat/issues?q=state%3Aopen%20label%3A%22enhancement%22
tech-debthttps://github.com/datacamp/pythonwhat/issues?q=state%3Aopen%20label%3A%22tech-debt%22
https://github.com/filipsch
https://github.com/filipsch
filipschhttps://github.com/filipsch
on Sep 12, 2018https://github.com/datacamp/pythonwhat/issues/351#issue-359435253
herehttps://github.com/datacamp/pythonwhat/blob/master/CHANGELOG.md#2160
this scripthttps://github.com/datacamp/content-engineering-scripts/blob/master/analysis_incorrect-scts.R
enhancementhttps://github.com/datacamp/pythonwhat/issues?q=state%3Aopen%20label%3A%22enhancement%22
tech-debthttps://github.com/datacamp/pythonwhat/issues?q=state%3Aopen%20label%3A%22tech-debt%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.