Skip to content

Commit

Permalink
more test cleanup and release prep
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulbot committed Mar 25, 2024
1 parent 0d264e7 commit 3d0792a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,32 @@ metadata = extract(url="https://my.awesome.news/story-path",
html_text="<html><head><title>my webpage ... </html>")
```

Development
-----------

Distribution
------------
If you are interested in adding code to this module, first clone the GitHub repository.

### Installing

* `flit install`
* `pre-commit install`

### Testing

`pytest`

### Distributing a New Version

### Prep Release
1. Run `pytest` to make sure all the test pass
2. Update the version number in `mcmetadata/__init__.py`
3. Make a brief note in the version history section below about the changes
2. Update the version number in `pyproject.toml`
3. Make a brief note in the `CHANGELOG.md` about what changes
4. Commit the changes
5. Tag the commit with a semantic version number - 'v*.*.*'
5. Tag the commit with a semantic version number - `v*.*.*`
6. Push to repo to GitHub
7. Run `flit build` to create an install package
8. Run `flit publish` to upload it to PyPI

### Manual Release

1. Run `python setup.py sdist` to create an installation package
2. Run `twine upload --repository-url https://test.pypi.org/legacy/ dist/*` to upload it to PyPI's test platform
3. Run `twine upload dist/*` to upload it to PyPI

### Test Cache
#### Test Cache

Test are run against fixtures by default. This can be changed with the use of '--use-cache=False' when running tests.
When adding new tests, re-run 'scripts/get-test-web-content.py'
Expand Down
2 changes: 1 addition & 1 deletion mcmetadata/test/test_titles.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_pt_empty_h1(self):
def test_pt_home_in_title_word(self):
# we try to remove "home" from titles, but "homem" is a PT word so make sure we don't remove that
self._fetch_and_validate(
"https://radioalianca.com.br/plantao/homem-de-24-anos-e-morto-por-golpes-de-faca-em-concordia-na-noite-de-quarta-feira",
"https://web.archive.org/web/20230115021305/https://radioalianca.com.br/plantao/homem-de-24-anos-e-morto-por-golpes-de-faca-em-concordia-na-noite-de-quarta-feira",
"Homem de 24 anos é morto por golpes de faca em Concórdia na noite de quarta-feira"
)

Expand Down

0 comments on commit 3d0792a

Please sign in to comment.